@import url('./variables.css');

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* Container & Grids */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.flex {
  display: flex;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* ==========================================================================
   Premium Navigation (Sticky Header)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all var(--transition-normal);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-md);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: scale(1.05);
}

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

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ==========================================================================
   Hero & Interactive Search Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 0 7rem;
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.08), transparent 50%),
              radial-gradient(circle at bottom left, rgba(29, 78, 216, 0.05), transparent 50%);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.badge-live {
  background: var(--success-light);
  color: var(--success);
}

.badge-live .dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Glass Search Widget */
.search-widget {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-premium);
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
  position: relative;
}

.search-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.tab-btn:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text-main);
}

.search-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 1rem;
  align-items: flex-end;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper svg {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  pointer-events: none;
}

.form-control {
  width: 100%;
  height: 52px;
  padding: 0 1rem 0 2.75rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-primary {
  height: 52px;
  padding: 0 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  opacity: 0.95;
}

/* Autocomplete suggestions */
.suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-hover);
}

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

.suggestion-item:hover {
  background: var(--surface-hover);
}

.train-number {
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.train-name {
  font-weight: 500;
  font-size: 0.95rem;
}

/* ==========================================================================
   UI Components & Cards
   ========================================================================== */
.section {
  padding: 5rem 0;
}

.section-bg {
  background-color: var(--surface-hover);
}

.section-header {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-size: 2.25rem;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Train Info Card */
.train-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.train-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.train-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.train-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.route-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.route-arrow {
  color: var(--accent);
  font-weight: bold;
}

.classes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.class-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  color: var(--text-muted);
}

.class-tag.available {
  background: var(--success-light);
  color: var(--success);
}

.class-tag.rac {
  background: var(--warning-light);
  color: var(--warning);
}

.class-tag.wl {
  background: var(--danger-light);
  color: var(--danger);
}

.train-card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--surface-hover);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.days-run {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.2rem;
}

.day {
  opacity: 0.3;
}

.day.active {
  opacity: 1;
  color: var(--primary);
  font-weight: 700;
}

.btn-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-link:hover {
  color: var(--accent);
}

/* Feature/Guide Cards */
.guide-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.guide-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.guide-icon-wrapper {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin: 1.5rem 1.5rem 0;
}

.guide-icon-wrapper svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.guide-content {
  padding: 1.5rem;
}

.guide-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.guide-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Dashboard Gauges & Stats */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.stat-count {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Informational UI & Tables
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.custom-table th {
  background-color: var(--surface-hover);
  padding: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--surface-border);
}

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

.custom-table tbody tr:hover {
  background-color: var(--surface-hover);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

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

.breadcrumbs .separator {
  opacity: 0.5;
}

/* ==========================================================================
   FAQ Accordions
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
  fill: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  fill: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  background: var(--surface-hover);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Blog & Layout Overlays
   ========================================================================== */
.blog-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-img-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: var(--surface-hover);
  overflow: hidden;
}

.blog-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-img-wrapper img {
  transform: scale(1.05);
}

.blog-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.blog-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-hover);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Single Blog Setup */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.article-featured-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.article-body h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
}

.article-body h3 {
  font-size: 1.35rem;
  margin: 1.5rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style: disc;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.author-box {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--primary);
  flex-shrink: 0;
}

.author-details h4 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

/* Sticky Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: block;
  padding: 0.2rem 0;
}

.toc-link:hover {
  color: var(--primary);
  padding-left: 4px;
}

/* ==========================================================================
   AdSense Placeholders (High Trust UI Design)
   ========================================================================== */
.ad-slot {
  width: 100%;
  background: var(--surface-hover);
  border: 1px dashed var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.ad-slot::before {
  content: 'Advertisement';
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  opacity: 0.6;
  position: absolute;
  top: 4px;
  left: 10px;
}

.ad-placeholder-box {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Modals, Toasts & Loading State Skeletons
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.toast {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slideInRight var(--transition-normal);
}

.toast.success { border-color: var(--success); }
.toast.warning { border-color: var(--warning); }
.toast.danger { border-color: var(--danger); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-hover) 25%, var(--surface-border) 50%, var(--surface-hover) 75%);
  background-size: 200% 100%;
  animation: loadingSkeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes loadingSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scroll to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

/* Cookie Popup */
.cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem 0;
  box-shadow: var(--glass-shadow);
  z-index: 9990;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.cookie-popup.show {
  transform: translateY(0);
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.site-footer {
  background-color: var(--secondary);
  color: var(--text-inverse);
  padding: 5rem 0 2rem;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand .logo-link {
  color: white;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--transition-fast);
}

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

.footer-title {
  font-size: 1.15rem;
  color: white;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.newsletter-form .form-control {
  background: var(--secondary-light);
  border-color: transparent;
  color: white;
}

.newsletter-form .form-control:focus {
  border-color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--secondary-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a:hover {
  color: white;
}

/* Disclaimers Box */
.official-disclaimer {
  background: rgba(245, 158, 11, 0.05);
  border-left: 3px solid var(--warning);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  line-height: 1.4;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .search-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    clip-path: circle(0% at top right);
    transition: clip-path var(--transition-normal);
  }
  
  .nav-menu.open {
    clip-path: circle(150% at top right);
  }

  .menu-toggle {
    display: flex;
  }

  .search-form-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats-grid {
    margin-top: 2rem;
  }
}
