/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  --white: #FFFFFF;
  --navy: #1B2A4A;
  --navy-light: #2D4166;
  --adriatic: #3A7CA5;
  --adriatic-light: #5BA4D9;
  --adriatic-pale: #D6EAF5;
  --sand: #F5E6D3;
  --sand-light: #FAF3EB;
  --sand-dark: #D4C4AE;
  --text: #1B2A4A;
  --text-light: #5A6B80;
  --border: #E8DDD0;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', 'Georgia', serif;
  --max-w: 1280px;
  --gap: 2rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--adriatic); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--navy); }

/* ---- HEADER ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.logo span { color: var(--adriatic); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--adriatic);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--adriatic); }

/* Burger */
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.3s; }

/* ---- HERO ---- */
.hero-article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}
.hero-category {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--adriatic);
  margin-bottom: 1.5rem;
  display: inline-block;
  border-bottom: 2px solid var(--adriatic);
  padding-bottom: 4px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  max-width: 800px;
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-light);
  max-width: 650px;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.hero-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 400;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: inline-block;
}

/* ---- ARTICLE LAYOUT ---- */
.article-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.article-main { max-width: 780px; }
.article-main p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.article-main h2 {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
}
.article-main h3 {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--navy-light);
  margin: 2rem 0 0.75rem;
}

/* Sidebar rail */
.article-rail {
  display: none;
}

/* ---- VISUAL BLOCKS ---- */
.pull-quote {
  border-left: 4px solid var(--adriatic);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--sand-light);
  border-radius: 0 8px 8px 0;
}
.pull-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--navy);
  margin: 0;
}
.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-light);
}

.highlight-box {
  background: linear-gradient(135deg, var(--adriatic-pale), var(--sand-light));
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
}
.highlight-box h3 {
  font-family: var(--font-display);
  color: var(--navy);
  margin-top: 0;
}

.tip-card {
  background: var(--navy);
  color: var(--white);
  padding: 1.75rem;
  border-radius: 12px;
  margin: 2rem 0;
}
.tip-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--sand);
}
.tip-card p { color: rgba(255,255,255,0.85); margin: 0; }

.image-block {
  margin: 2.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.image-block img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.image-block figcaption {
  font-size: 0.8rem;
  color: var(--text-light);
  padding: 0.75rem 0;
  font-style: italic;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27,42,74,0.1);
}
.card-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--adriatic);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.card p { font-size: 0.95rem; color: var(--text-light); margin: 0; }

.divider {
  width: 60px; height: 3px;
  background: var(--adriatic);
  margin: 3rem 0;
  border-radius: 2px;
}

.wide-banner {
  background: var(--sand);
  padding: 3rem 1.5rem;
  margin: 3rem -1.5rem;
  text-align: center;
}
.wide-banner h2 {
  font-family: var(--font-display);
  color: var(--navy);
  margin-bottom: 1rem;
}
.wide-banner p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-light);
}

/* Rail tip (sidebar) */
.rail-tip {
  background: var(--sand-light);
  border-left: 3px solid var(--adriatic);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.5rem;
}
.rail-tip h5 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.rail-tip p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.55;
}
.rail-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--navy);
  padding: 1.25rem;
  border-top: 2px solid var(--adriatic);
  border-bottom: 2px solid var(--adriatic);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.rail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--adriatic);
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

/* ---- NEWSLETTER ---- */
.newsletter-section {
  background: var(--navy);
  padding: 3.5rem 1.5rem;
  text-align: center;
  margin: 3rem 0 0;
}
.newsletter-section h2 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}
.newsletter-section p {
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input[type="email"]:focus { border-color: var(--adriatic-light); }
.newsletter-form button {
  padding: 14px 24px;
  background: var(--adriatic);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  min-height: 48px;
}
.newsletter-form button:hover { background: var(--adriatic-light); }

/* ---- ARTICLE CARDS (list) ---- */
.articles-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.articles-grid h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--adriatic);
  display: inline-block;
}
.ag-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.ag-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  background: var(--white);
}
.ag-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(27,42,74,0.08);
}
.ag-item img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.ag-item-body { padding: 1.5rem; }
.ag-item-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--adriatic);
  font-weight: 600;
}
.ag-item h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0.5rem 0;
  line-height: 1.3;
}
.ag-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}
.ag-item .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--adriatic);
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 3rem 1.5rem 2rem;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--white);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.8rem; }
.footer-links a:hover { color: var(--white); }
.footer-disclaimer {
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  max-width: 700px;
}
.footer-copy {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* ---- COOKIE BANNER ---- */
#cookie-toggle { display: none; }
.cookie-banner {
  position: fixed;
  bottom: 1rem; right: 1rem;
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 360px;
  z-index: 999;
  font-size: 0.85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transition: opacity 0.3s, transform 0.3s;
}
#cookie-toggle:checked ~ .cookie-banner {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.cookie-banner p { margin-bottom: 1rem; line-height: 1.5; color: rgba(255,255,255,0.8); }
.cookie-banner a { color: var(--adriatic-light); }
.cookie-btns { display: flex; gap: 0.75rem; }
.cookie-btns label,
.cookie-btns a.cb-decline {
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.cookie-btns label {
  background: var(--adriatic);
  color: var(--white);
  flex: 1;
}
.cookie-btns label:hover { background: var(--adriatic-light); }
.cookie-btns a.cb-decline {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  flex: 1;
}
.cookie-btns a.cb-decline:hover { background: rgba(255,255,255,0.15); }

/* ---- LEGAL PAGES ---- */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 2rem;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}
.legal-page p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* ---- SUCCESS PAGE ---- */
.success-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}
.success-icon {
  width: 80px; height: 80px;
  background: var(--adriatic-pale);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2rem;
}
.success-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.success-page p {
  color: var(--text-light);
  margin-bottom: 2rem;
}
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--adriatic);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background 0.3s;
  min-height: 48px;
}
.btn-primary:hover { background: var(--adriatic-light); color: var(--white); }

/* ---- 404 ---- */
.error-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}
.error-page .e404 {
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 900;
  color: var(--adriatic-pale);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.error-page p {
  color: var(--text-light);
  margin-bottom: 2rem;
}
.error-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.error-links a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--adriatic);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.7s ease-out forwards;
}
.fade-up-d1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-d2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-d3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-d4 { animation-delay: 0.4s; opacity: 0; }

/* Inline category tags */
.cat-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--adriatic-pale);
  color: var(--adriatic);
}
.cat-tag--sand { background: var(--sand); color: var(--navy); }
.cat-tag--navy { background: var(--navy); color: var(--white); }

/* ---- RESPONSIVE ---- */
@media (min-width: 640px) {
  .hero-title { font-size: 3.4rem; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .ag-list { grid-template-columns: 1fr 1fr; }
  .ag-item { flex-direction: row; }
  .ag-item img { width: 200px; aspect-ratio: 1; }
  .newsletter-form { flex-direction: row; }
  .newsletter-form input[type="email"] { flex: 1; }
  .error-links { flex-direction: row; gap: 1.5rem; }
}

@media (min-width: 960px) {
  .header-inner { padding: 1rem 2.5rem; }
  .hero-article { padding: 5rem 2.5rem 2.5rem; }
  .hero-title { font-size: 3.8rem; }
  .article-body {
    grid-template-columns: 1fr 260px;
    gap: 3rem;
    padding: 2.5rem;
  }
  .article-rail { display: block; position: sticky; top: 100px; align-self: start; }
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
  .ag-list { grid-template-columns: 1fr 1fr 1fr; }
  .ag-item { flex-direction: column; }
  .ag-item img { width: 100%; aspect-ratio: 16/10; }
  .wide-banner { margin: 3rem -2.5rem; padding: 4rem 2.5rem; }
  .footer-top { flex-direction: row; justify-content: space-between; align-items: center; }
  .burger { display: none !important; }
}

@media (min-width: 1200px) {
  .hero-title { font-size: 4.2rem; }
  .article-body { grid-template-columns: 1fr 300px; }
}

@media (max-width: 959px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.active { display: flex; }
  .burger { display: block; }
}
