/**
 * Cairo UI/UX Pro Max Stylesheet for Satellite TV Engine
 * تصميم احترافي متجاوب بالكامل يدعم الموبايل والديسكتوب بنظام البطاقات والجداول
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand & Color Tokens */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-dark: #075985;
  --primary-light: #e0f2fe;
  --primary-subtle: #f0f9ff;
  
  --signal-green: #059669;
  --signal-green-light: #ecfdf5;
  --signal-green-border: #a7f3d0;
  
  --accent-amber: #d97706;
  --accent-amber-light: #fef3c7;
  
  --dark-navy: #0b1329;
  --dark-surface: #131d36;
  --dark-card: #18233f;
  
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-muted: #f1f5f9;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  /* Radii & Shadows */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  
  /* Typography & Layout */
  --font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1140px;
  --touch-target: 44px;
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: #f8fafc;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Accessibility Focus Rings */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* SVG Vector Icon Utility */
.svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   Header & Mobile Navigation
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

/* Header Live Search */
.header-search {
  position: relative;
  flex: 1;
  max-width: 440px;
  display: none;
}

@media (min-width: 768px) {
  .header-search {
    display: block;
  }
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.header-search input,
.hero-search-box input {
  width: 100%;
  height: 44px;
  padding: 0 2.75rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.header-search input:focus,
.hero-search-box input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.search-icon-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Mobile Search Button in Header */
.mobile-search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  border: none;
}

@media (min-width: 768px) {
  .mobile-search-trigger {
    display: none;
  }
}

/* Header Navigation Links */
.header-nav {
  display: none;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 992px) {
  .header-nav {
    display: flex;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  min-height: 40px;
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.nav-link-admin {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-size: 0.85rem;
}

/* Horizontal Sub-Navigation Bar (Satellites & Categories Scroll on Mobile) */
.sub-nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.sub-nav-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.sub-nav-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.sub-nav-chip {
  text-decoration: none;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  min-height: 36px;
  flex-shrink: 0;
}

.sub-nav-chip:hover,
.sub-nav-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Breadcrumbs */
.breadcrumbs-nav {
  padding: 0.75rem 0;
  font-size: 0.85rem;
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.breadcrumbs-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
}

.breadcrumbs-list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs-list a:hover {
  text-decoration: underline;
}

.breadcrumbs-list li::after {
  content: "/";
  color: var(--border-dark);
  font-size: 0.8rem;
}

.breadcrumbs-list li:last-child {
  color: var(--text-main);
  font-weight: 700;
}

.breadcrumbs-list li:last-child::after {
  content: "";
}

/* Main Content Wrapper */
.main-wrapper {
  flex: 1;
  padding: 1.25rem 0 3rem;
}

/* Cards & Containers */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .card {
    padding: 1.75rem;
  }
}

/* Section Title */
.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.4rem;
  }
}

.section-title .svg-icon {
  color: var(--primary);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ==========================================================================
   DIRECT ANSWER CARD (Featured Snippet Telecom Widget)
   ========================================================================== */
.direct-answer-card {
  background: linear-gradient(135deg, #0b1329 0%, #162447 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1.25rem 0 1.75rem;
  box-shadow: 0 12px 28px -4px rgba(11, 19, 41, 0.25);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
  .direct-answer-card {
    padding: 1.75rem 2rem;
  }
}

.direct-answer-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.dac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dac-badge-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dac-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e0f2fe;
}

.dac-satellite {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* DAC 4-Element Grid */
.dac-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .dac-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.dac-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
  transition: background 0.2s;
}

.dac-cell-label {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dac-cell-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.dac-cell-value.freq { color: #38bdf8; font-family: monospace; }
.dac-cell-value.pol { color: #fbbf24; }
.dac-cell-value.sr { color: #ffffff; font-family: monospace; }
.dac-cell-value.fec { color: #6ee7b7; }

/* DAC Action Bar with 48px Touch Copy Button */
.dac-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.btn-copy {
  background: var(--primary);
  color: #ffffff;
  border: none;
  min-height: 46px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  width: 100%;
}

@media (min-width: 640px) {
  .btn-copy {
    width: auto;
  }
}

.btn-copy:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-copy:active {
  transform: scale(0.98);
}

.btn-copy.copied {
  background: var(--signal-green);
}

.dac-tip {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Channel Page Header & Metadata
   ========================================================================== */
.channel-title-bar {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .channel-title-bar {
    align-items: center;
    gap: 1.25rem;
  }
}

.channel-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .channel-logo-img {
    width: 80px;
    height: 80px;
  }
}

.channel-title-text h1 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .channel-title-text h1 {
    font-size: 1.85rem;
  }
}

.channel-meta-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  min-height: 28px;
}

.badge-green {
  background: var(--signal-green-light);
  border-color: var(--signal-green-border);
  color: var(--signal-green);
}

.badge-blue {
  background: var(--primary-light);
  border-color: #bae6fd;
  color: var(--primary-dark);
}

.badge-amber {
  background: var(--accent-amber-light);
  border-color: #fde68a;
  color: var(--accent-amber);
}

/* ==========================================================================
   ADAPTIVE FREQUENCY PRESENTATION (Cards for Mobile, Table for Desktop)
   ========================================================================== */

/* 1. Mobile Frequency Cards (<= 768px) */
.mobile-freq-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 769px) {
  .mobile-freq-cards-list {
    display: none; /* Hide on desktop */
  }
}

.freq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: border-color 0.2s ease;
}

.freq-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border);
}

.freq-card-sat {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.freq-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.freq-card-num {
  font-size: 1.85rem;
  font-weight: 900;
  font-family: monospace;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.freq-card-pol {
  font-size: 0.95rem;
  font-weight: 800;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.freq-card-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--surface-alt);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  text-align: center;
}

.fcm-item span {
  display: block;
}

.fcm-item .label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.fcm-item .value {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.freq-card-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

/* 2. Desktop Semantic Table (> 768px) */
.desktop-table-wrapper {
  display: none;
}

@media (min-width: 769px) {
  .desktop-table-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}

.data-table th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--primary-subtle);
}

.freq-num-badge {
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--primary-dark);
  font-family: monospace;
}

/* ==========================================================================
   Receiver Setup Timeline (How-to Guide)
   ========================================================================== */
.timeline-guide {
  list-style: none;
  position: relative;
  padding: 0.5rem 0;
  margin: 1rem 0;
}

.timeline-guide::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  right: 18px;
  width: 2px;
  background: var(--border);
}

.timeline-step {
  position: relative;
  padding-right: 3.25rem;
  margin-bottom: 1.25rem;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  right: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--primary-light);
  z-index: 2;
}

.timeline-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
  font-weight: 500;
}

.timeline-text strong {
  color: var(--primary-dark);
  font-weight: 800;
}

/* ==========================================================================
   FAQ Accordion (Semantic, Accessible details/summary)
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-alt);
  user-select: none;
  min-height: 52px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  color: var(--text-dim);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-body {
  padding: 1.15rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ==========================================================================
   Related Channels Grid
   ========================================================================== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 992px) {
  .related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.channel-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  min-height: 72px;
}

.channel-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.channel-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.channel-card-info h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.channel-card-info p {
  font-size: 0.78rem;
  color: var(--primary-dark);
  font-weight: 700;
  font-family: monospace;
  margin-top: 0.15rem;
}

/* ==========================================================================
   Live Search Results & Mobile Modal
   ========================================================================== */
.live-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.live-search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.15s;
  min-height: 52px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item:focus {
  background: var(--primary-light);
}

.sri-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sri-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #fff;
  border: 1px solid var(--border);
}

.sri-title {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.2;
}

.sri-freq {
  font-family: monospace;
  font-weight: 900;
  color: var(--primary-dark);
  font-size: 0.95rem;
  background: var(--primary-light);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-xs);
}

.search-highlight {
  background-color: #fef08a;
  color: #854d0e;
  font-weight: 900;
  padding: 0 2px;
  border-radius: 2px;
}

/* Mobile Search Modal Overlay */
.mobile-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  padding: 1rem;
}

.mobile-search-modal.active {
  display: flex;
  flex-direction: column;
}

.msm-content {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-xl);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.msm-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.msm-close-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   Home Hero Section
   ========================================================================== */
.home-hero {
  background: linear-gradient(135deg, #075985 0%, #0284c7 100%);
  color: #ffffff;
  padding: 2.25rem 1.25rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .home-hero {
    padding: 3rem 2rem;
  }
}

.home-hero h1 {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

@media (min-width: 640px) {
  .home-hero h1 {
    font-size: 2.25rem;
  }
}

.home-hero p {
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 620px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.hero-search-box {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.hero-search-box input {
  height: 48px;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Filter Chips Group */
.filter-chips-section {
  margin-bottom: 1.5rem;
}

.fcs-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fcs-chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Zero-CLS Defensive Ad Containers
   ========================================================================== */
.ad-slot-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.75rem auto;
  position: relative;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  overflow: hidden;
  contain: layout style;
  text-align: center;
}

.ad-top-banner {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
}
@media (max-width: 768px) {
  .ad-top-banner {
    max-width: 300px;
    min-height: 250px;
  }
}

.ad-in-content,
.ad-post-table {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
}
@media (max-width: 480px) {
  .ad-in-content,
  .ad-post-table {
    max-width: 300px;
    min-height: 250px;
  }
}

.ad-multiplex {
  width: 100%;
  max-width: 728px;
  min-height: 350px;
}

.ad-skeleton-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  width: 100%;
  height: 100%;
}

.ad-skeleton-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  background: #e2e8f0;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.ad-skeleton-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0b1329;
  color: #94a3b8;
  padding: 2.5rem 0 calc(2rem + env(safe-area-inset-bottom));
  font-size: 0.9rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: #38bdf8;
}
