/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --primary: #1a3a6b;
  --accent: #00a8a8;
  --bg: #f0f4ff;
  --bg2: #e8eef8;
  --text: #1a1a2e;
  --white: #ffffff;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(26,58,107,.10);
  --font-h: 'Merriweather', serif;
  --font-b: 'Source Sans 3', sans-serif;
  --max-w: 860px;
}

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-b); color: var(--text); background: var(--bg); line-height: 1.75; font-size: 1.05rem; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
a { display: inline-block; text-align: center; color: var(--primary); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--accent); }

/* HEADER */
header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { font-family: var(--font-h); font-size: 1.4rem; font-weight: 700; color: var(--primary); letter-spacing: -.5px; }
.logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 1.2rem; list-style: none; flex-wrap: wrap; }
.nav-links a { font-size: .92rem; color: var(--text); padding: .3rem .5rem; border-radius: var(--radius); }
.nav-links a:hover { color: var(--accent); background: var(--bg2); }

/* BURGER */
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: .4rem; }
.burger span { display: block; width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: transform .3s; }
.nav-mobile { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow); padding: 1rem 1.5rem; z-index: 99; }
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.nav-mobile ul a { font-size: 1rem; color: var(--text); }
@media (max-width: 640px) { .nav-links { display: none; } .burger { display: flex; } }

/* BREADCRUMB */
.breadcrumb { max-width: var(--max-w); margin: 1.2rem auto 0; padding: 0 1.5rem; font-size: .85rem; color: #6b7a99; }
.breadcrumb a { color: var(--primary); font-size: .85rem; }
.breadcrumb a:hover { color: var(--accent); }

/* ARTICLE */
.article-wrap { max-width: var(--max-w); margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
.article-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; }
.category { background: var(--accent); color: var(--white); font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 12px; letter-spacing: .04em; text-transform: uppercase; }
.reading-time { font-size: .82rem; color: #6b7a99; }
h1 { font-family: var(--font-h); font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.3; color: var(--primary); margin-bottom: 1rem; }
.author-info { display: flex; gap: 1.2rem; font-size: .85rem; color: #6b7a99; margin-bottom: 1.4rem; flex-wrap: wrap; }
.author-info strong { color: var(--text); }
.lead { font-size: 1.15rem; font-weight: 600; color: var(--primary); margin-bottom: 1.8rem; padding-left: 1rem; border-left: 3px solid var(--accent); line-height: 1.6; }
h2 { font-family: var(--font-h); font-size: 1.25rem; color: var(--primary); margin: 2rem 0 .7rem; }
h3 { font-family: var(--font-h); font-size: 1.05rem; color: var(--primary); margin: 1.5rem 0 .6rem; }
p { margin-bottom: 1rem; }
.article-hero, .article-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.8rem; }

/* PULL-QUOTE */
.pull-quote { border-left: 4px solid var(--accent); background: var(--bg2); padding: 1.2rem 1.5rem; margin: 2rem 0; font-family: var(--font-h); font-style: italic; font-size: 1.05rem; color: var(--primary); border-radius: 0 var(--radius) var(--radius) 0; }

/* VISUALIZATION */
.visualization-block { background: var(--white); border: 1px solid #d0daf0; border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0; box-shadow: var(--shadow); }
.visualization-block h3 { margin-top: 0; }
.balance-diagram { display: flex; flex-direction: column; gap: .9rem; margin-top: 1rem; }
.balance-row { display: grid; grid-template-columns: 160px 1fr 60px; align-items: center; gap: .8rem; }
.balance-label { font-size: .88rem; color: var(--text); font-weight: 600; }
.balance-bar { background: var(--bg2); border-radius: 20px; height: 12px; overflow: hidden; }
.balance-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 20px; }
.bar-60 { width: 60%; } .bar-65 { width: 65%; } .bar-70 { width: 70%; }
.bar-75 { width: 75%; } .bar-80 { width: 80%; } .bar-85 { width: 85%; }
.bar-90 { width: 90%; } .bar-95 { width: 95%; }
.balance-value { font-size: .82rem; color: var(--primary); font-weight: 700; text-align: right; }
.visualization-note { font-size: .8rem; color: #6b7a99; margin-top: 1rem; margin-bottom: 0; }

/* CONCLUSION */
.conclusion { background: var(--bg2); border-radius: var(--radius); padding: 1.2rem 1.5rem; margin: 2rem 0; }
.conclusion h2 { margin-top: 0; }

/* TAGS */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.tag { background: var(--bg2); color: var(--primary); font-size: .78rem; padding: .25rem .7rem; border-radius: 12px; border: 1px solid #c5d0e8; }

/* DISCLAIMERS */
.disclaimer { background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .88rem; color: #5a4800; margin: 1.5rem 0; }
.disclaimer-top { background: #fff3f3; border: 1px solid #ffcdd2; border-radius: var(--radius); padding: .9rem 1.2rem; font-size: .88rem; color: #7a2020; margin-bottom: 1.5rem; }

/* RELATED */
.related-articles { max-width: var(--max-w); margin: 2rem auto; padding: 0 1.5rem; }
.related-articles h2 { font-family: var(--font-h); color: var(--primary); margin-bottom: 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.related-card { background: var(--white); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); border: 1px solid #d0daf0; transition: transform .2s, box-shadow .2s; }
.related-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,58,107,.13); }
.related-card h3 { font-family: var(--font-h); font-size: .95rem; color: var(--primary); margin-bottom: .5rem; }
.related-card span { font-size: .78rem; color: #6b7a99; }

/* SUBSCRIBE */
.subscribe-section { max-width: var(--max-w); margin: 2rem auto; padding: 2rem 1.5rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.subscribe-section h2 { font-family: var(--font-h); color: var(--primary); margin-bottom: .6rem; }
.subscribe-section p { color: #6b7a99; margin-bottom: 1.3rem; }
.subscribe-form { display: flex; flex-direction: column; align-items: center; gap: .8rem; max-width: 420px; margin: 0 auto; }
.subscribe-form label { font-size: .9rem; color: var(--text); align-self: flex-start; }
.subscribe-form input[type="email"] { width: 100%; padding: .75rem 1rem; border: 2px solid #d0daf0; border-radius: var(--radius); font-size: 1rem; color: var(--text); background: var(--bg); transition: border-color .2s; }
.subscribe-form input[type="email"]:focus { border-color: var(--accent); outline: none; }
.subscribe-form button { background: var(--primary); color: var(--white); border: none; padding: .8rem 2rem; border-radius: var(--radius); font-size: 1rem; font-weight: 700; cursor: pointer; transition: background .2s; width: 100%; }
.subscribe-form button:hover { background: var(--accent); }

/* FOOTER */
footer { background: var(--primary); color: var(--white); padding: 2.5rem 1.5rem 1.5rem; margin-top: 3rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-logo { font-family: var(--font-h); font-size: 1.3rem; font-weight: 700; color: var(--white); margin-bottom: 1rem; }
.footer-logo:hover { color: var(--accent); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .8rem; margin: .8rem 0 1.2rem; }
.footer-nav a { color: rgba(255,255,255,.75); font-size: .88rem; }
.footer-nav a:hover { color: var(--white); }
.footer-disclaimer { font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: .8rem; line-height: 1.5; }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.5); }

/* COOKIES MODAL (CSS-only) */
#cookies-close { display: none; }
.cookies-banner { position: fixed; bottom: 20px; right: 20px; background: var(--white); border: 1px solid #d0daf0; border-radius: var(--radius); padding: 1.2rem; box-shadow: 0 8px 24px rgba(26,58,107,.18); max-width: 300px; z-index: 999; }
.cookies-banner p { font-size: .85rem; color: var(--text); margin-bottom: .9rem; }
.cookies-banner a { color: var(--primary); font-size: .85rem; }
.cookies-actions { display: flex; gap: .6rem; }
.btn-accept { background: var(--primary); color: var(--white); padding: .5rem 1rem; border-radius: var(--radius); font-size: .85rem; font-weight: 700; cursor: pointer; }
.btn-reject { background: var(--bg2); color: var(--text); padding: .5rem 1rem; border-radius: var(--radius); font-size: .85rem; cursor: pointer; border: 1px solid #d0daf0; }
label.btn-accept:hover { background: var(--accent); }
label.btn-reject:hover { background: #d0daf0; }
#cookies-close:checked ~ .cookies-banner { display: none; }

/* 404 */
.page-404 { text-align: center; padding: 5rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.page-404-code { font-size: 6rem; font-family: var(--font-h); color: var(--accent); line-height: 1; margin-bottom: .5rem; }
.page-404 h2 { font-family: var(--font-h); color: var(--primary); margin-bottom: 1rem; }
.page-404 p { color: #6b7a99; margin-bottom: 2rem; }
.btn-home { background: var(--primary); color: var(--white); padding: .9rem 2.2rem; border-radius: var(--radius); font-weight: 700; font-size: 1rem; transition: background .2s; }
.btn-home:hover { background: var(--accent); color: var(--white); }

@media (max-width: 600px) {
  .balance-row { grid-template-columns: 100px 1fr 48px; }
  .related-grid { grid-template-columns: 1fr; }
  .cookies-banner { right: 10px; left: 10px; max-width: none; bottom: 10px; }
}

/* POLICY / TERMS / COOKIES PAGES */
.article-wrap h2 { border-bottom: 1px solid #d0daf0; padding-bottom: .4rem; }
.article-wrap p + h2 { margin-top: 2.2rem; }
.article-wrap strong { color: var(--primary); }

/* SUCCESS PAGE */
.success-wrap {
  max-width: 560px;
  margin: 5rem auto;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.success-icon {
  width: 72px;
  height: 72px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin: 0 auto 1.5rem;
  line-height: 1;
}
.success-wrap h1 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin-bottom: .8rem;
}
.success-sub {
  color: #6b7a99;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}
.success-wrap .btn-home {
  display: inline-block;
}

@media (max-width: 600px) {
  .success-wrap { margin: 2rem 1rem; padding: 2rem 1.2rem; }
}
