/*
Theme Name: AAutomobiles
Theme URI: https://aautomobiles.in
Author: Amol Rajendra Pawar
Author URI: https://aautomobiles.in/about
Description: Premium automotive theme for AatoMobiles.in — India's most trusted Hindi automotive resource. Inspired by CarDekho, ZigWheels, TopGear & MotorTrend. Mobile-first, SEO-optimized, Core Web Vitals ready, AdSense-optimized, EEAT-compliant.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aautomobiles
Tags: one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, blog, news, automotive
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — PREMIUM AUTOMOTIVE PALETTE
   Inspired by: CarDekho, TopGear, MotorTrend
   ============================================================ */
:root {
  /* Primary Colors */
  --primary-900: #070F1E;
  --primary-800: #0B1D3A;
  --primary-700: #112B52;
  --primary-600: #1B3A5C;
  --primary-500: #24537E;
  --primary-400: #3A6FA0;
  --primary-300: #6A9BC7;
  --primary-200: #A8C8E4;
  --primary-100: #D6E6F3;
  --primary-50: #EBF3FA;
  
  /* Accent — Bold Red (Automotive Energy) */
  --accent-700: #B71C2E;
  --accent-600: #D32F44;
  --accent-500: #E63946;
  --accent-400: #EF5B6A;
  --accent-300: #F58993;
  --accent-200: #FBB4BA;
  --accent-100: #FDDDE0;
  --accent-50: #FEF2F3;
  
  /* Gold — Premium Touch */
  --gold-600: #B8952F;
  --gold-500: #D4A843;
  --gold-400: #E0BF6B;
  --gold-300: #ECD48F;
  
  /* Neutrals */
  --gray-950: #0F1117;
  --gray-900: #1A1D26;
  --gray-800: #2D3139;
  --gray-700: #4A4F5A;
  --gray-600: #6C757D;
  --gray-500: #8B95A2;
  --gray-400: #A0AAB6;
  --gray-300: #C4CCD6;
  --gray-200: #E2E7EC;
  --gray-100: #EDF0F4;
  --gray-50: #F5F7F9;
  
  /* Semantic */
  --bg-body: #F5F7FA;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-dark: #0B1D3A;
  --text-primary: #1A1D26;
  --text-secondary: #4A4F5A;
  --text-muted: #6C757D;
  --text-light: #8B95A2;
  --text-white: #FFFFFF;
  --border-color: #E2E7EC;
  --border-light: #F0F2F5;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(11,29,58,0.04);
  --shadow-sm: 0 1px 4px rgba(11,29,58,0.06);
  --shadow-md: 0 4px 12px rgba(11,29,58,0.08);
  --shadow-lg: 0 8px 30px rgba(11,29,58,0.10);
  --shadow-xl: 0 20px 60px rgba(11,29,58,0.12);
  --shadow-2xl: 0 30px 80px rgba(11,29,58,0.16);
  --shadow-accent: 0 4px 20px rgba(230,57,70,0.25);
  --shadow-card: 0 2px 8px rgba(11,29,58,0.06), 0 8px 24px rgba(11,29,58,0.04);
  --shadow-card-hover: 0 8px 30px rgba(11,29,58,0.12), 0 2px 8px rgba(11,29,58,0.06);
  
  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-heading: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  --font-body: 'Inter', 'Noto Sans Devanagari', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);
  
  /* Layout */
  --container-max: 1240px;
  --content-max: 780px;
  --header-height: 72px;
  --topbar-height: 40px;
}

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

html { 
  scroll-behavior: smooth; 
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-500); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-700); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress-bar {
  position: fixed; top: 0; left: 0; width: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-500), var(--gold-500));
  z-index: 10001; transition: width 50ms linear;
  opacity: 0;
}
body.singular .reading-progress-bar { opacity: 1; }

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  background: var(--primary-900);
  color: var(--gray-400);
  font-size: 12px;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.top-bar .container {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.top-bar-left { display: flex; align-items: center; gap: 20px; }
.top-bar-date { font-weight: 500; color: var(--gray-400); }
.top-bar-right { display: flex; align-items: center; gap: 16px; }
.top-bar a { color: var(--gray-400); font-size: 12px; }
.top-bar a:hover { color: var(--gold-400); }
.top-bar-social { display: flex; gap: 12px; align-items: center; }
.top-bar-social a { opacity: 0.7; transition: opacity var(--transition-fast); }
.top-bar-social a:hover { opacity: 1; color: var(--text-white); }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--bg-white);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.site-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-800);
  letter-spacing: -0.5px;
}
.site-logo-text span {
  color: var(--accent-500);
}

/* Primary Nav */
.primary-nav { display: flex; align-items: center; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; }
.primary-nav li { position: relative; }
.primary-nav a {
  display: flex; align-items: center;
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav li.current-menu-item > a {
  color: var(--accent-500);
  background: var(--accent-50);
}
.primary-nav .sub-menu {
  position: absolute; top: 100%; left: 0;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  padding: 8px;
  min-width: 220px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-base);
  z-index: 100;
}
.primary-nav li:hover > .sub-menu {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

/* Nav Actions */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-search-btn, .nav-menu-toggle {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.nav-search-btn:hover, .nav-menu-toggle:hover {
  background: var(--gray-100);
  color: var(--primary-800);
}

/* Hamburger */
.hamburger { width: 22px; height: 16px; position: relative; }
.hamburger span {
  display: block; position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: all var(--transition-base);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 7px; }
.hamburger span:nth-child(3) { bottom: 0; }
.nav-menu-toggle.active .hamburger span:nth-child(1) { transform: rotate(45deg); top: 7px; }
.nav-menu-toggle.active .hamburger span:nth-child(2) { opacity: 0; }
.nav-menu-toggle.active .hamburger span:nth-child(3) { transform: rotate(-45deg); bottom: 7px; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(11,29,58,0.85);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all var(--transition-slow);
}
.search-overlay.active { opacity: 1; visibility: visible; }
.search-overlay-close {
  position: absolute; top: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-white); background: rgba(255,255,255,0.1);
  transition: background var(--transition-fast);
}
.search-overlay-close:hover { background: rgba(255,255,255,0.2); }
.search-overlay-inner { text-align: center; width: 100%; max-width: 640px; padding: 0 24px; }
.search-overlay-label { display: block; color: var(--gray-400); font-size: 14px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; font-weight: 600; }
.search-overlay-form { position: relative; }
.search-overlay-input {
  width: 100%; padding: 20px 60px 20px 24px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-xl);
  color: var(--text-white); font-size: 18px;
  outline: none; transition: all var(--transition-base);
}
.search-overlay-input::placeholder { color: var(--gray-500); }
.search-overlay-input:focus { border-color: var(--accent-500); background: rgba(255,255,255,0.15); }
.search-overlay-submit {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-white); background: var(--accent-500);
  transition: background var(--transition-fast);
}
.search-overlay-submit:hover { background: var(--accent-600); }

/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav {
  position: fixed; top: calc(var(--topbar-height) + var(--header-height)); left: 0; right: 0; bottom: 0;
  background: var(--bg-white);
  z-index: 998;
  overflow-y: auto;
  padding: 20px;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}
.mobile-nav.active { transform: translateX(0); }
.mobile-nav-search {
  position: relative; margin-bottom: 20px;
}
.mobile-nav-search input {
  width: 100%; padding: 14px 16px; padding-right: 50px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px; outline: none;
  transition: border-color var(--transition-fast);
}
.mobile-nav-search input:focus { border-color: var(--accent-500); }
.mobile-nav-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  padding: 10px 16px; background: var(--accent-500); color: var(--text-white);
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
}
.mobile-nav ul { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav a {
  display: block; padding: 14px 16px;
  font-size: 16px; font-weight: 500; color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.mobile-nav a:hover { background: var(--primary-50); color: var(--accent-500); }
.mobile-nav .sub-menu { margin-left: 16px; }
.mobile-nav .sub-menu a { font-size: 14px; padding: 10px 16px; color: var(--text-secondary); }

/* ============================================================
   HERO SLIDER — Inspired by TopGear / CarDekho
   ============================================================ */
.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 40px;
}
.hero-slider-track {
  display: flex; transition: transform 0.6s var(--ease-out);
}
.hero-slide {
  min-width: 100%; position: relative;
  aspect-ratio: 21/9;
  overflow: hidden;
}
.hero-slide-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 6s ease-out;
}
.hero-slide:hover .hero-slide-bg { transform: scale(1.03); }
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(11,29,58,0.88) 0%, rgba(11,29,58,0.4) 60%, transparent 100%);
}
.hero-slide-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 48px;
  max-width: 680px;
}
.hero-slide-cat {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-500);
  color: var(--text-white);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}
.hero-slide-cat a { color: var(--text-white); }
.hero-slide-title {
  font-family: var(--font-heading);
  font-size: 32px; font-weight: 700;
  color: var(--text-white);
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero-slide-title a { color: var(--text-white); }
.hero-slide-title a:hover { color: var(--gold-400); }
.hero-slide-meta {
  display: flex; align-items: center; gap: 16px;
  color: var(--gray-300); font-size: 13px;
}
.hero-slide-meta svg { width: 14px; height: 14px; opacity: 0.7; }

/* Slider Controls */
.hero-slider-dots {
  position: absolute; bottom: 20px; right: 48px;
  display: flex; gap: 8px; z-index: 10;
}
.hero-slider-dot {
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.35);
  transition: all var(--transition-base);
  cursor: pointer;
}
.hero-slider-dot.active {
  background: var(--accent-500);
  width: 28px;
}
.hero-slider-arrows {
  position: absolute; top: 50%; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 16px;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}
.hero-slider-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-white);
  pointer-events: all;
  transition: all var(--transition-fast);
  opacity: 0;
}
.hero-slider:hover .hero-slider-arrow { opacity: 1; }
.hero-slider-arrow:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   DAILY QUOTE WIDGET — Premium Touch
   ============================================================ */
.daily-quote-section {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.daily-quote-section::before {
  content: '';
  position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(230,57,70,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.daily-quote-section::after {
  content: '\201C';
  position: absolute; top: -10px; left: 24px;
  font-size: 140px; font-family: Georgia, serif;
  color: rgba(255,255,255,0.04);
  line-height: 1;
}
.daily-quote-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.daily-quote-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--accent-500);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-white);
}
.daily-quote-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-400);
}
.daily-quote-text {
  font-size: 18px; font-style: italic;
  color: var(--gray-200);
  line-height: 1.6;
  position: relative; z-index: 1;
  max-width: 900px;
}
.daily-quote-author {
  margin-top: 12px;
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 500;
  position: relative; z-index: 1;
}
.daily-quote-author strong { color: var(--gold-400); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
}
.section-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  color: var(--primary-800);
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: '';
  width: 4px; height: 24px;
  background: var(--accent-500);
  border-radius: 2px;
}
.section-view-all {
  font-size: 13px; font-weight: 600;
  color: var(--accent-500);
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-200);
  transition: all var(--transition-fast);
}
.section-view-all:hover {
  background: var(--accent-500);
  color: var(--text-white);
  border-color: var(--accent-500);
}

/* ============================================================
   ARTICLE CARDS — Premium Grid
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

.article-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.article-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.article-card:hover .article-card-image img { transform: scale(1.05); }
.article-card-category {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px;
  background: var(--accent-500);
  color: var(--text-white);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: var(--radius-full);
  z-index: 2;
}
.article-card-category a { color: var(--text-white); }
.article-card-body { padding: 20px 22px 22px; }
.article-card-title {
  font-family: var(--font-heading);
  font-size: 17px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-title a { color: inherit; }
.article-card-title a:hover { color: var(--accent-500); }
.article-card-excerpt {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.article-card-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--text-light);
}
.article-card-meta svg { width: 14px; height: 14px; opacity: 0.6; }
.article-card-meta-item {
  display: flex; align-items: center; gap: 5px;
}

/* Featured / First Card (larger) */
.article-card.featured-card {
  grid-column: 1 / -1;
}
.article-card.featured-card .article-card-image { aspect-ratio: 21/9; }
.article-card.featured-card .article-card-title { font-size: 24px; -webkit-line-clamp: 3; }
.article-card.featured-card .article-card-body { padding: 28px 30px 30px; }

/* ============================================================
   TOOLS SECTION
   ============================================================ */
.tools-section {
  margin-bottom: 48px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.tool-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
}
.tool-card:hover {
  border-color: var(--accent-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-600);
}
.tool-card-text {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
}
.tool-card:hover .tool-card-text { color: var(--accent-500); }

/* ============================================================
   ADSENSE PLACEHOLDERS
   ============================================================ */
.ad-slot {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  min-height: 90px;
  margin-bottom: 28px;
}
.ad-slot-sidebar {
  min-height: 250px;
  margin-bottom: 24px;
}
.ad-slot-inline {
  min-height: 100px;
  margin: 32px 0;
  text-align: center;
}

/* ============================================================
   SINGLE ARTICLE — EEAT Premium Layout
   ============================================================ */
.article-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}
.article-content-area { min-width: 0; }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--accent-500); }
.breadcrumb-sep { color: var(--gray-300); }

/* Article Header */
.article-header {
  margin-bottom: 28px;
}
.article-title {
  font-family: var(--font-heading);
  font-size: 32px; font-weight: 800;
  color: var(--primary-900);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}
.article-meta-bar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.article-meta-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--text-muted);
}
.article-meta-item svg { width: 16px; height: 16px; opacity: 0.6; }
.article-meta-item a { color: var(--text-secondary); font-weight: 600; }
.article-meta-item a:hover { color: var(--accent-500); }
.article-category-tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--accent-50);
  color: var(--accent-600);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: var(--radius-full);
}

/* Featured Image */
.article-featured-image {
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.article-featured-image img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
}

/* Article Body */
.article-body {
  max-width: var(--content-max);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-primary);
}
.article-body h2 {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700;
  color: var(--primary-800);
  margin: 36px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--accent-500);
}
.article-body h3 {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  color: var(--primary-800);
  margin: 28px 0 12px;
}
.article-body h4 {
  font-size: 18px; font-weight: 700;
  color: var(--primary-700);
  margin: 24px 0 10px;
}
.article-body p {
  margin-bottom: 18px;
}
.article-body ul, .article-body ol {
  margin-bottom: 18px;
  padding-left: 24px;
}
.article-body li {
  margin-bottom: 8px;
  list-style: disc;
}
.article-body ol li { list-style: decimal; }
.article-body blockquote {
  border-left: 4px solid var(--accent-500);
  background: var(--accent-50);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-body img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}
.article-body a { color: var(--accent-500); text-decoration: underline; text-decoration-color: rgba(230,57,70,0.3); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--accent-500); }
.article-body table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.article-body th, .article-body td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.article-body th {
  background: var(--primary-50);
  font-weight: 700; color: var(--primary-800);
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
}
.article-body tr:hover td { background: var(--gray-50); }

/* Key Takeaways Box */
.key-takeaways-box {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 100%);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 28px;
  border-left: 4px solid var(--accent-500);
}
.key-takeaways-box h3 {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.key-takeaways-box ul {
  padding-left: 20px;
}
.key-takeaways-box li {
  list-style: none;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
  font-size: 15px; color: var(--text-secondary);
}
.key-takeaways-box li::before {
  content: '\2713';
  position: absolute; left: 0; color: var(--accent-500);
  font-weight: 700;
}

/* Sources Box */
.sources-box {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-top: 32px;
  border: 1px solid var(--border-light);
}
.sources-box h3 {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sources-box ol {
  padding-left: 20px;
  counter-reset: source-counter;
}
.sources-box li {
  list-style: none;
  padding-left: 28px;
  position: relative;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}
.sources-box li::before {
  counter-increment: source-counter;
  content: '[' counter(source-counter) ']';
  position: absolute; left: 0; font-weight: 700;
  color: var(--primary-600);
}
.sources-box a { color: var(--primary-600); }

/* FAQ Section */
.faq-section {
  margin-top: 40px;
  border-top: 2px solid var(--border-light);
  padding-top: 32px;
}
.faq-section-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 20px;
}
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  font-weight: 600; font-size: 15.5px;
  color: var(--text-primary);
  cursor: pointer;
  background: var(--bg-white);
  transition: background var(--transition-fast);
}
.faq-question:hover { background: var(--gray-50); }
.faq-question svg {
  width: 20px; height: 20px; color: var(--text-muted);
  transition: transform var(--transition-base);
  flex-shrink: 0; margin-left: 12px;
}
.faq-item.active .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}
.faq-answer-inner {
  padding: 0 22px 18px;
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.7;
}

/* Author Box — EEAT Critical */
.author-box {
  display: flex; gap: 20px;
  padding: 28px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin: 40px 0;
}
.author-box-avatar {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 3px solid var(--accent-100);
}
.author-box-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.author-box-info { flex: 1; }
.author-box-name {
  font-family: var(--font-heading);
  font-size: 17px; font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 4px;
}
.author-box-role {
  font-size: 13px; color: var(--accent-500);
  font-weight: 600; margin-bottom: 8px;
}
.author-box-bio {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.6;
}

/* Related Posts */
.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border-light);
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.related-post-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}
.related-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.related-post-card img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
}
.related-post-card-body { padding: 16px; }
.related-post-card-title {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-post-card-title a { color: inherit; }
.related-post-card-title a:hover { color: var(--accent-500); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.article-sidebar { position: sticky; top: calc(var(--topbar-height) + var(--header-height) + 20px); align-self: start; }
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}
.sidebar-widget-title {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-500);
}
.sidebar-popular-list { display: flex; flex-direction: column; gap: 14px; }
.sidebar-popular-item {
  display: flex; gap: 12px; align-items: flex-start;
}
.sidebar-popular-num {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 800;
  color: var(--primary-600);
}
.sidebar-popular-item:nth-child(-n+3) .sidebar-popular-num {
  background: var(--accent-500); color: var(--text-white);
}
.sidebar-popular-title {
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-popular-title a { color: inherit; }
.sidebar-popular-title a:hover { color: var(--accent-500); }
.sidebar-widget ul { display: flex; flex-direction: column; gap: 8px; }
.sidebar-widget li a {
  display: block; padding: 8px 0;
  font-size: 14px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--transition-fast);
}
.sidebar-widget li a:hover { color: var(--accent-500); }

/* Table of Contents Widget */
.toc-widget ul { counter-reset: toc-counter; }
.toc-widget li {
  counter-increment: toc-counter;
}
.toc-widget li a::before {
  content: counter(toc-counter) '. ';
  color: var(--accent-500); font-weight: 700;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 40px 0;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}
.pagination a:hover {
  background: var(--primary-50); border-color: var(--primary-300);
  color: var(--primary-700);
}
.pagination .current {
  background: var(--accent-500); color: var(--text-white); border-color: var(--accent-500);
}

/* ============================================================
   FOOTER — Premium Dark
   ============================================================ */
.site-footer {
  background: var(--primary-900);
  color: var(--gray-400);
  margin-top: 60px;
}
.footer-main {
  padding: 56px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 800;
  color: var(--text-white);
  margin-bottom: 14px;
}
.footer-logo span { color: var(--accent-500); }
.footer-about-text {
  font-size: 14px; line-height: 1.7;
  color: var(--gray-400);
  margin-bottom: 18px;
}
.footer-social {
  display: flex; gap: 10px;
}
.footer-social a {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition-fast);
}
.footer-social a:hover {
  background: var(--accent-500); color: var(--text-white);
  transform: translateY(-2px);
}
.footer-col-title {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700;
  color: var(--text-white);
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 12px;
}
.footer-col-title::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 30px; height: 2px;
  background: var(--accent-500);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li a {
  font-size: 14px; color: var(--gray-400);
  display: flex; align-items: center; gap: 8px;
  transition: all var(--transition-fast);
}
.footer-col li a::before {
  content: '\203A';
  color: var(--accent-500); font-weight: 700; font-size: 16px;
}
.footer-col li a:hover { color: var(--text-white); transform: translateX(4px); }

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  color: var(--gray-500);
}
.footer-copyright a { color: var(--gray-400); }
.footer-copyright a:hover { color: var(--accent-400); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--gray-500); font-size: 13px; }
.footer-bottom-links a:hover { color: var(--text-white); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent-500);
  color: var(--text-white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-accent);
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition-base);
  z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-600); transform: translateY(-3px); }

/* ============================================================
   PAGE TEMPLATE
   ============================================================ */
.page-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 20px;
}
.page-title {
  font-family: var(--font-heading);
  font-size: 36px; font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 12px;
}
.page-content {
  font-size: 17px; line-height: 1.85;
  color: var(--text-primary);
}
.page-content h2 {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700; color: var(--primary-800);
  margin: 36px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--accent-500);
}
.page-content h3 {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700; color: var(--primary-800);
  margin: 28px 0 12px;
}
.page-content p { margin-bottom: 18px; }
.page-content ul, .page-content ol {
  margin-bottom: 18px; padding-left: 24px;
}
.page-content li { margin-bottom: 8px; list-style: disc; }
.page-content ol li { list-style: decimal; }

/* ============================================================
   ARCHIVE / CATEGORY
   ============================================================ */
.archive-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}
.archive-title {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 800;
  color: var(--primary-800);
}
.archive-description {
  font-size: 15px; color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}
.error-404-title {
  font-family: var(--font-heading);
  font-size: 120px; font-weight: 900;
  color: var(--primary-100);
  line-height: 1;
}
.error-404-subtitle {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700;
  color: var(--primary-800);
  margin: 16px 0 8px;
}
.error-404-text {
  font-size: 16px; color: var(--text-muted);
  margin-bottom: 32px;
}
.error-404-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: var(--accent-500);
  color: var(--text-white);
  font-weight: 700; font-size: 15px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.error-404-btn:hover { background: var(--accent-600); color: var(--text-white); transform: translateY(-2px); box-shadow: var(--shadow-accent); }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-results-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 28px;
}
.search-results-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  color: var(--primary-800);
}

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */
@media (max-width: 1024px) {
  .article-wrapper {
    grid-template-columns: 1fr;
  }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --topbar-height: 36px;
  }
  
  .top-bar-left { gap: 12px; }
  .top-bar-right { gap: 10px; }
  .primary-nav { display: none; }
  .nav-menu-toggle { display: flex; }
  
  .hero-slide { aspect-ratio: 16/9; }
  .hero-slide-content { padding: 24px; }
  .hero-slide-title { font-size: 22px; }
  .hero-slider-arrows { display: none; }
  .hero-slider-dots { right: 24px; bottom: 16px; }
  
  .articles-grid { grid-template-columns: 1fr; gap: 20px; }
  .article-card.featured-card .article-card-title { font-size: 20px; }
  
  .daily-quote-section { padding: 24px; margin-left: -20px; margin-right: -20px; border-radius: 0; }
  .daily-quote-text { font-size: 16px; }
  
  .article-title { font-size: 24px; }
  .article-meta-bar { gap: 12px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 21px; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-bottom-links { justify-content: center; }
  
  .section-title { font-size: 18px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-slide-title { font-size: 18px; }
  .hero-slide-content { padding: 20px; }
  .article-card-body { padding: 16px; }
  .tools-grid { grid-template-columns: 1fr; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; text-align: center; align-items: center; }
}

/* ============================================================
   CALCULATOR PAGE STYLES (Plugin integration)
   ============================================================ */
.aauto-calc-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  margin: 24px 0;
}
.aauto-calc-wrapper label {
  font-weight: 600; color: var(--text-primary); font-size: 14px;
}
.aauto-calc-wrapper input, .aauto-calc-wrapper select {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px; outline: none;
  transition: border-color var(--transition-fast);
  margin-bottom: 16px;
}
.aauto-calc-wrapper input:focus, .aauto-calc-wrapper select:focus {
  border-color: var(--accent-500);
}
.aauto-calc-wrapper button {
  padding: 12px 24px;
  background: var(--accent-500);
  color: var(--text-white);
  font-weight: 700; border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.aauto-calc-wrapper button:hover { background: var(--accent-600); }
.aauto-calc-result {
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 16px;
  font-weight: 600; color: var(--primary-800);
}
