/* Стрелки, точки, крестики и прочие символы — системным шрифтом устройства.
   Иначе ради одного «→» или «↗» браузер качает наборы Roboto math/symbols (~60 КБ на каждой странице). */
@font-face {
  font-family: 'XabSym';
  src: local('Segoe UI Symbol'), local('Segoe UI'), local('Apple Symbols'), local('Arial'), local('Helvetica Neue'),
       local('Roboto'), local('Noto Sans'), local('Noto Sans Symbols'), local('DejaVu Sans');
  unicode-range: U+2022, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+2B00-2BFF;
}

/* ==========================================================================
   Fastnews - Premium Custom CSS Stylesheet (Light & Dark Theme)
   Designed with high-end glassmorphism, responsive grid, and fluid micro-animations.
   ========================================================================== */

/* --- Modern Styling Tokens --- */
:root {
  /* Dark Theme Palette (Default) - Premium Space Deep Obsidian & Indigo Neon */
  --bg-color: #070a13;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --card-bg: #111827;
  --border-color: #1f2937;
  --primary-color: #3b82f6;
  --primary-hover: #60a5fa;
  --accent-color: #60a5fa;
  --header-bg: rgba(17, 24, 39, 0.85);
  --footer-bg: #090d16;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 8px -1px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 20px 25px -5px rgba(59, 130, 246, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

body.light-theme {
  /* Light Theme Palette - Elegant Slate & Warm Indigo */
  --bg-color: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-color: #3b82f6;
  --header-bg: rgba(255, 255, 255, 0.85);
  --footer-bg: #f1f5f9;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

body.dark-theme {
  /* Explicit Dark Theme */
  --bg-color: #070a13;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --card-bg: #111827;
  --border-color: #1f2937;
  --primary-color: #3b82f6;
  --primary-hover: #60a5fa;
  --accent-color: #60a5fa;
  --header-bg: rgba(17, 24, 39, 0.85);
  --footer-bg: #090d16;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 8px -1px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 20px 25px -5px rgba(59, 130, 246, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  body:not(.light-theme) {
    --bg-color: #070a13;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: #111827;
    --border-color: #1f2937;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --accent-color: #60a5fa;
    --header-bg: rgba(17, 24, 39, 0.85);
    --footer-bg: #090d16;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 8px -1px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 20px 25px -5px rgba(59, 130, 246, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  }
}

/* --- Global Reset & Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'XabSym', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease;
  position: relative;
}

a:hover {
  color: var(--primary-hover);
}

/* --- Floating Glassmorphic Header --- */
.site-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-color) 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.2s ease;
  white-space: nowrap;
}

.logo:hover {
  transform: scale(1.02);
}

/* --- Search Form --- */
.header-search {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--header-bg);
    padding: 0 1.5rem;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-search.active {
    display: flex;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.25rem 0.5rem 0.25rem 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.5rem;
    width: 100%;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.search-button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: var(--primary-color);
}

.mobile-search-close {
    display: block;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Header Actions (Icons, Buttons) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.icon-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.telegram-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.telegram-icon-link:hover {
    transform: translateY(-2px) scale(1.1);
}

.lang-dropdown-wrapper {
    position: relative;
    margin-right: 0.25rem;
}

.lang-dropdown-select {
    appearance: none;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.4rem 1.8rem 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364748b%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.lang-dropdown-select:hover, .lang-dropdown-select:focus {
    border-color: var(--primary-color);
}

.search-toggle-btn {
    display: flex;
}

/* Install Guide Pages */
.install-guide-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}
.guide-header {
    text-align: center;
    margin-bottom: 3rem;
}
.guide-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.guide-steps {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.step-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
}
.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.step-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.step-card ol {
    padding-left: 1.5rem;
}
.step-card li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}
.step-card .hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}
.auto-install-section {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(37,99,235,0.1));
    border-radius: 16px;
    border: 1px dashed var(--primary-color);
}
.main-install-btn {
    margin-top: 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.main-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* --- Main Layout --- */
main {
  flex: 1;
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* --- Premium Breadcrumbs --- */
.breadcrumbs {
  margin-bottom: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--card-bg);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.breadcrumbs ol {
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumbs span {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 0.6rem;
}

.breadcrumbs li[aria-current="page"] {
  color: var(--text-color);
  font-weight: 600;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Responsive News Grid --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.2rem;
}

.news-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.news-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.news-card:hover::after {
  opacity: 1;
}

.news-card-img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background-color: #000;
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
  opacity: 0.95;
}

.news-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.news-card-title a {
  color: var(--text-color);
  transition: color 0.2s ease;
}

.news-card-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.news-card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-card-meta::before {
  content: '📅';
  font-size: 0.9rem;
}

.news-card-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-readmore {
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.news-card:hover .news-card-readmore {
  gap: 0.5rem;
  color: var(--primary-hover);
}

/* --- Elegant Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4rem;
  gap: 0.6rem;
}

.pagination a, .pagination span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pagination a:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.pagination .current {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* --- Premium Article Design --- */
.post-container {
  max-width: 820px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  color: var(--text-color);
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-image-container {
  margin: 2.2rem 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.post-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.post-image-container:hover .post-image {
  transform: scale(1.01);
}

.post-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-color);
}

.post-content p {
  margin-bottom: 1.8rem;
}

.post-content h2, .post-content h3 {
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.post-content h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.post-content h3 {
  font-size: 1.45rem;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.8rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.6rem;
}

/* Blockquote & Lists Decoration */
.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 0.5rem 1.5rem;
  margin: 1.8rem 0;
  color: var(--text-muted);
  font-style: italic;
  background-color: var(--footer-bg);
  border-radius: 0 12px 12px 0;
}

/* Image Details Callout Link */
.image-seo-link {
  display: block;
  text-align: center;
  margin-top: 3.5rem;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-seo-link a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.image-seo-link:hover {
  border-color: var(--primary-color);
  background-color: var(--footer-bg);
  transform: translateY(-2px);
}

/* --- Dedicated Image Page Layout --- */
.image-page-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.image-page-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.image-page-img {
  max-width: 100%;
  height: auto;
  max-height: 600px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  margin-bottom: 2.5rem;
  object-fit: contain;
}

.image-page-desc {
  max-width: 700px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  text-align: left;
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.back-to-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  background-color: var(--primary-color);
  color: #ffffff !important;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-post:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
  text-decoration: none;
}

/* --- Pages & Glass Panels --- */
.page-container {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-title {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.archive-list ul {
    list-style: none;
    padding: 0;
}

.archive-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archive-list li:last-child {
    border-bottom: none;
}

.archive-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.archive-list a:hover {
    color: #fff;
}

.archive-list .count {
    color: var(--text-color);
    opacity: 0.7;
}

/* --- Premium Clean Footer --- */
footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  main {
    margin: 1.5rem auto;
  }
  
  .post-title {
    font-size: 2rem;
    letter-spacing: -0.02em;
  }
  
  .image-page-title {
    font-size: 1.7rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  
  .theme-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* --- Styled Language Switcher --- */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-switcher a {
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.light-theme .lang-switcher a,
:root:not(.dark-theme) .lang-switcher a {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.lang-switcher a:hover {
  color: var(--text-color);
  border-color: rgba(255, 255, 255, 0.3);
}

.light-theme .lang-switcher a:hover,
:root:not(.dark-theme) .lang-switcher a:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

.lang-switcher a.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  border: none;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* --- Telegram Subscribe Button --- */
.telegram-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #2AABEE; /* Official Telegram blue */
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(42, 171, 238, 0.3);
  transition: all 0.3s ease;
  margin-right: 1rem;
}

.telegram-subscribe-btn:hover {
  background-color: #229ED9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 171, 238, 0.4);
  color: #ffffff;
}

.telegram-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

@media (max-width: 768px) {
  .telegram-subscribe-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
  }
}

/* --- Audio Player Widget --- */
.audio-player-widget {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-start;
}

.btn-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.btn-audio:hover {
  border-color: var(--primary-color);
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.btn-icon {
  font-size: 1.1rem;
}

/* --- Social Share Buttons --- */
.share-block {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.share-block-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  color: #fff;
}

.share-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-telegram { background-color: #0088cc; }
.share-viber { background-color: #7360f2; }
.share-whatsapp { background-color: #25D366; }
.share-facebook { background-color: #1877F2; }
.share-native { 
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%); 
  border: none;
  cursor: pointer;
}


/* ==========================================================================
   Responsive Mobile Header Optimization
   ========================================================================== */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    text-align: center;
  }

  header {
    padding: 0.6rem 0;
  }

  .header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    margin-top: 0.2rem;
  }

  .lang-switcher {
    justify-content: center;
  }

  /* Hide verbose text inside button tags on mobile */
  .theme-toggle span,
  .telegram-subscribe-btn span,
  .pwa-install-btn span {
    display: none !important;
  }

  .telegram-subscribe-btn {
    padding: 0.5rem !important;
    margin-right: 0 !important;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(42, 171, 238, 0.2);
  }

  .telegram-icon {
    margin-right: 0 !important;
    width: 1.1rem;
    height: 1.1rem;
  }

  .pwa-install-btn {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.8rem !important;
    border-radius: 9999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a855f7, #6366f1) !important;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.2) !important;
  }

  .theme-toggle {
    padding: 0.5rem !important;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color) !important;
  }
  
  .header-links {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
  }
  
  .archive-link {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
  }
}

/* --- Categories Bar & Pills --- */
.categories-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem 1.5rem 0.2rem;
  margin: 1.5rem 0;
  max-width: 1100px;
  width: 100%;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -webkit-overflow-scrolling: touch;
}
.categories-bar::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

@media (pointer: fine) {
  .categories-bar {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.25) transparent;
    padding-bottom: 0.8rem;
    user-select: none;
  }
  .categories-bar::-webkit-scrollbar {
    display: block;
    height: 5px;
  }
  .categories-bar::-webkit-scrollbar-track {
    background: transparent;
  }
  .categories-bar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    transition: background 0.3s ease;
  }
  .categories-bar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
  }
}

.category-pill {
  padding: 0.5rem 1.2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
  display: inline-flex;
  align-items: center;
}
.category-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.category-pill.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* --- Category Badge on Cards --- */
.category-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.dark-theme .category-badge {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Interactive Calendar Archive Styles --- */
.archive-header-block {
  text-align: center;
  margin-bottom: 2.5rem;
}

.archive-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.archive-empty-warning {
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 2.5rem;
  border-radius: 16px;
}

.warning-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.archive-calendar-card {
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

.calendar-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.calendar-nav-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.calendar-nav-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.calendar-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-color) 40%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.calendar-day-blank {
  aspect-ratio: 1/1;
}

.calendar-day-today {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.calendar-day:not(.calendar-day-active):not(.calendar-day-blank) {
  opacity: 0.5;
  cursor: default;
}

.calendar-day-active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff !important;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  opacity: 1 !important;
}

.calendar-day-active:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
}

.calendar-day-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  border: 1.5px solid #ffffff;
}

.dark-theme .calendar-day-badge {
  border: 1.5px solid #111827;
}

/* Quick Stats Panel */
.archive-stats {
  max-width: 650px;
  margin: 0 auto;
  padding: 1.8rem;
  border-radius: 20px;
}

.archive-stats h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-color);
}

.archive-recent-links {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.archive-recent-links h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.recent-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.recent-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: all 0.25s ease;
}

.recent-badge-pill:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.count-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.dark-theme .count-badge {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

/* Dots and limits in pagination */
.pagination span.dots {
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-weight: 600;
  user-select: none;
}

@media (max-width: 480px) {
  .calendar-days-grid {
    gap: 4px;
  }
  .calendar-day {
    border-radius: 8px;
    font-size: 0.85rem;
  }
  .archive-calendar-card {
    padding: 1.2rem;
  }
  .calendar-title {
    font-size: 1.15rem;
  }
  .calendar-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* --- Mobile Header & Responsive Styles --- */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  /* Desktop search is hidden on mobile until active */
  .header-search {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--header-bg);
    padding: 0 1rem;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .header-search.active {
    display: flex;
  }

  .search-form {
    width: 100%;
    max-width: 100%;
  }

  .mobile-search-close {
    display: block;
  }

  .search-toggle-btn {
    display: flex;
  }

  .lang-dropdown-select {
    padding: 0.3rem 1.4rem 0.3rem 0.6rem;
    font-size: 0.75rem;
    background-position: right 4px center;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .telegram-icon-link {
    width: 36px;
    height: 36px;
  }

  .telegram-icon-link svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 400px) {
    /* Super small screens */
    .header-actions {
        gap: 0.25rem;
    }
    .logo {
        font-size: 1.1rem;
    }
}

/* Category Badge Link Styling */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background-color: var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-badge:hover {
    background-color: var(--primary-color);
    color: #ffffff !important;
    text-decoration: none;
}

/* --- Inline Article Images --- */
.article-inline-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.article-inline-image:hover {
  transform: scale(1.02);
}

/* --- Inline Article Videos --- */
.video-container {
  margin: 2.2rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  aspect-ratio: 16/9;
  background-color: #000;
}

.article-inline-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Premium Glassmorphic Gallery Carousel --- */
.post-gallery-section {
  margin: 4rem 0;
  padding: 2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.dark-theme .post-gallery-section {
  background: rgba(0, 0, 0, 0.2);
}

.gallery-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-slider-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 12px;
}

.gallery-slides-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide.active {
  opacity: 1;
  z-index: 2;
}

.gallery-image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-slide.active img {
  transform: scale(1);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.arrow-left {
  left: 20px;
}

.arrow-right {
  right: 20px;
}

.gallery-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.gallery-dot.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  border: none;
}

@media (max-width: 768px) {
  .gallery-slider-wrapper {
    height: 350px;
  }
  .gallery-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .arrow-left {
    left: 10px;
  }
  .arrow-right {
    right: 10px;
  }
  .post-gallery-section {
    padding: 1rem;
    margin: 2.5rem 0;
  }
}


/* --- Block 2: Hero Grid Reorganization --- */

.news-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

/* Hero Card */
.hero-card {
  position: relative;
  width: 100%;
  height: 420px;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  background: linear-gradient(135deg, #2a2a35, #1a1a24); /* Fallback gradient */
}

.hero-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  z-index: 2;
}

.hero-card-content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  color: #fff;
}

.hero-card-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  color: #fff;
}
.hero-card-title a {
  color: #fff;
  text-decoration: none;
}
.hero-card-title a:hover {
  text-decoration: underline;
}

.hero-card-meta {
  font-size: 0.9rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Featured Row (2 columns) */
.featured-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.featured-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.featured-card:hover {
  transform: translateY(-4px);
}

.featured-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.featured-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.featured-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.featured-title a {
  color: var(--text-color);
  text-decoration: none;
}
.featured-title a:hover {
  color: var(--primary-color);
}
.featured-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Sub Row (3 columns) */
.sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

.sub-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: background-color 0.2s ease;
}
.sub-card:hover {
  background-color: var(--border-color);
}

.sub-img-wrapper {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}
.sub-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sub-content {
  flex-grow: 1;
}
.sub-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.sub-title a {
  color: var(--text-color);
  text-decoration: none;
}
.sub-title a:hover {
  color: var(--primary-color);
}
.sub-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3rem 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}
.section-divider-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}
.section-divider-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}
.section-divider-link:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .sub-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-card {
    height: 280px;
    max-height: 280px;
  }
  .hero-card-content {
    padding: 1.25rem;
  }
  .hero-card-title {
    font-size: 1.4rem;
  }

  .featured-row {
    grid-template-columns: 1fr;
  }

  .sub-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-card {
    height: 240px;
    max-height: 240px;
  }
}

/* --- Video Landing Page Responsive Layout --- */
.video-page-container {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  .video-page-container {
    padding: 0;
    max-width: 100%;
  }

  .video-hero-wrapper {
    border-radius: 8px;
    margin-bottom: 1.2rem !important;
  }

  .video-page-title {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1.2rem !important;
  }

  .video-short-desc,
  .key-moments-block,
  .video-faq-block {
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
  }
}

/* ===== Авторы: подпись под заголовком, блок «Об авторе», страницы авторов ===== */
.author-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), #4facfe);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--card-bg, #1e1e1e);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-avatar-sm { width: 36px; height: 36px; font-size: 0.8rem; }
.author-avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.author-avatar-xl { width: 140px; height: 140px; font-size: 2.6rem; }

.post-byline { display: flex; align-items: center; gap: 0.6rem; margin: 0.75rem 0 0.35rem; font-size: 0.95rem; color: var(--text-muted); }
.post-byline-avatars { display: inline-flex; }
.post-byline-avatars .author-avatar + .author-avatar { margin-left: -10px; }
.post-byline-name { color: var(--title-color); font-weight: 600; text-decoration: none; }
.post-byline-name:hover { color: var(--primary-color); }

.author-avatar-md { width: 44px; height: 44px; font-size: 0.95rem; }
.author-box { margin: 1.5rem 0 2rem; padding: 0.9rem 1.1rem; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; }
.author-box-list { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }
.author-box-item { display: flex; gap: 0.7rem; align-items: center; text-decoration: none; min-width: 0; }
.author-box-body { display: flex; flex-direction: column; min-width: 0; }
.author-box-name { font-size: 1rem; font-weight: 700; color: var(--title-color); line-height: 1.25; }
.author-box-item:hover .author-box-name { color: var(--primary-color); }
.author-box-role { font-size: 0.85rem; color: var(--text-muted); line-height: 1.3; }
.author-box-editor { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px dashed var(--border-color); font-size: 0.85rem; color: var(--text-muted); }
.author-box-editor a { color: var(--text-color); }
.author-box-sep { margin: 0 0.35rem; opacity: 0.6; }
.author-box-bio { margin: 0.4rem 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--text-color); }

.author-page-head { display: flex; gap: 1.75rem; align-items: center; margin-bottom: 2rem; }
.author-page-head h1 { margin: 0 0 0.3rem; }
.author-page-role { color: var(--primary-color); font-weight: 600; }
.author-page-expertise { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.author-page-expertise span { font-size: 0.82rem; padding: 0.25rem 0.65rem; border-radius: 999px; border: 1px solid var(--border-color); color: var(--text-muted); }
.author-page-bio { line-height: 1.75; margin-bottom: 1.5rem; }
.author-page-contact { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 2rem; }
.author-page-contact a { color: var(--primary-color); }
@media (max-width: 640px) {
    .author-page-head { flex-direction: column; text-align: center; gap: 1rem; }
    .author-page-expertise { justify-content: center; }
    .author-box { padding: 0.8rem 0.9rem; }
}
.author-page-bio p { margin: 0 0 0.9rem; }
.author-page-bio p:last-child { margin-bottom: 0; }

/* ===== «Версии расходятся» ===== */
.versions-block { margin: 2.5rem 0; padding: 1.25rem 1.4rem; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--border-color); border-left: 4px solid #f59e0b; }
.versions-title { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; font-size: 1.2rem; color: var(--title-color); }
.versions-title svg { color: #f59e0b; flex-shrink: 0; }
.versions-dispute + .versions-dispute { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px dashed var(--border-color); }
.versions-topic { font-weight: 700; color: var(--title-color); margin-bottom: 0.75rem; }
.versions-claims { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.versions-claim { padding: 0.85rem 1rem; border-radius: 10px; border: 1px solid var(--border-color); background: rgba(245, 158, 11, 0.04); display: flex; flex-direction: column; }
.versions-party { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #f59e0b; margin-bottom: 0.35rem; }
.versions-text { margin: 0 0 0.6rem; line-height: 1.55; color: var(--text-color); flex: 1; }
.versions-source { font-size: 0.82rem; color: var(--text-muted); text-decoration: none; word-break: break-all; }
.versions-source:hover { color: var(--primary-color); }
.versions-agree { margin-top: 0.8rem; font-size: 0.93rem; line-height: 1.5; color: var(--text-color); }
.versions-note { margin: 1rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
@media (max-width: 640px) { .versions-block { padding: 1rem; } }

/* ===== Статичные страницы: один горизонтальный отступ (у main), без «змейки» из вложенных контейнеров ===== */
.page-container:not(.glass-panel) { padding-left: 0 !important; padding-right: 0 !important; }
.page-container.glass-panel { max-width: 1100px !important; }
@media (max-width: 768px) {
  main { padding: 0 1rem; }
  .page-container { margin-top: 0.5rem !important; }
  .page-container.glass-panel { padding: 1.25rem 1rem !important; }
  .glass-panel { padding: 1.1rem; }
  .glass-panel .glass-panel,
  .page-container.glass-panel .glass-panel { padding: 1rem !important; }
  .info-content-card { padding: 0 !important; }
  .info-content-card ul, .info-content-card ol { padding-left: 1.1rem; }
  .manifesto-card, .hub-card, .team-card { padding: 1rem !important; }
}
@media (max-width: 768px) {
  /* Внешняя панель-обёртка на телефоне не нужна: карточки внутри уже в рамках */
  .page-container.glass-panel { background: transparent !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; padding: 0.5rem 0 1rem !important; }
}

/* Страница рубрики: «Рубрику ведут» */
.rubric-authors { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: -0.5rem 0 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.rubric-author { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-color); text-decoration: none; }
.rubric-author:hover { color: var(--primary-color); }
