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

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&family=Outfit:wght@300;400;500;600&display=swap');

html {scroll-behavior: smooth;}
html, body {overflow-x:hidden;}
a {display: inline-block; text-align: center;}

:root {
  --primary: #5B7C5A;
  --primary-light: #7A9B79;
  --primary-dark: #4A6549;
  --secondary: #F5E6D3;
  --accent: #D4845A;
  --accent-light: #E8A67A;
  --bg: #FDF8F3;
  --bg-alt: #F7EDE2;
  --text: #3A2E2A;
  --text-light: #7A6B64;
  --card-bg: #FFFFFF;
  --border: #E8DDD4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(58,46,42,0.08);
  --shadow-hover: 0 8px 32px rgba(58,46,42,0.14);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --max-w: 1120px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); margin-bottom: 0.6rem; }

p { margin-bottom: 1rem; }

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* HEADER */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  text-align: left;
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
nav { display: flex; gap: 0.3rem; flex-wrap: wrap; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}
nav a:hover {
  background: var(--secondary);
  color: var(--primary-dark);
}

/* BREADCRUMBS */
.breadcrumbs {
  padding: 1rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  text-align: left;
}
.breadcrumbs span { margin: 0 0.4rem; }

/* READING TIME WIDGET */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--secondary);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.8rem 0 1.5rem;
}
.reading-time svg { width: 16px; height: 16px; }

/* ARTICLE LAYOUT */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 2rem;
  align-items: start;
  margin: 1.5rem 0;
}

.article-content h2 {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.article-content h2:first-child { border-top: none; margin-top: 0; }
.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.article-content li { margin-bottom: 0.4rem; }

/* ASIDE SHARE BUTTONS */
.share-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}
.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}
.share-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* QUOTE BLOCK */
.quote-block {
  background: linear-gradient(135deg, var(--secondary), var(--bg-alt));
  border-left: 4px solid var(--primary);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

/* TIP BOX */
.tip-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.tip-box-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* IMAGE BLOCK */
.img-block {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.img-block img { display: block; width: 100%; }
.img-caption {
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
  background: var(--card-bg);
  text-align: center;
}

/* HIGHLIGHT STRIP */
.highlight-strip {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 0;
  margin: 2.5rem 0;
  border-radius: var(--radius);
  text-align: center;
}
.highlight-strip h3 { color: #fff; font-size: 1.3rem; margin-bottom: 0.5rem; }
.highlight-strip p { opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* READ ALSO */
.read-also {
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.read-also h3 { margin-bottom: 1.2rem; color: var(--primary-dark); }
.read-also-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.read-also-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: left;
}
.read-also-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.read-also-card .card-tag {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}
.read-also-card h4 { font-size: 1.05rem; }

/* SUBSCRIBE FORM */
.subscribe-section {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg-alt) 100%);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin: 2.5rem 0;
  text-align: center;
}
.subscribe-section h3 { margin-bottom: 0.5rem; }
.subscribe-section p { color: var(--text-light); margin-bottom: 1.2rem; }
.subscribe-form {
  display: flex;
  gap: 0.7rem;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  background: var(--card-bg);
}
.subscribe-form input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,124,90,0.15);
}
.subscribe-form button {
  padding: 0.75rem 1.8rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.subscribe-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* FOOTER */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.88rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-brand .logo { font-size: 1.3rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.88rem;
}
.footer-links a:hover { color: #fff; }
.footer-disclaimer {
  font-size: 0.8rem;
  opacity: 0.6;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: 0.5rem;
  line-height: 1.5;
  text-align: center;
}

/* COOKIE MODAL */
.cookie-modal {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 380px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  padding: 1.5rem;
  z-index: 1000;
  animation: slideUp 0.5s ease-out;
  font-size: 0.9rem;
}
@keyframes slideUp {
  from { opacity:0; transform: translateY(20px); }
  to { opacity:1; transform: translateY(0); }
}
.cookie-modal h4 { margin-bottom: 0.5rem; font-size: 1rem; }
.cookie-modal p { color: var(--text-light); margin-bottom: 1rem; font-size: 0.85rem; }
.cookie-btns { display: flex; gap: 0.6rem; }
.cookie-btns button {
  flex: 1;
  padding: 0.55rem 1rem;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.btn-accept {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary) !important;
}
.btn-accept:hover { background: var(--primary-dark); }
.btn-decline { background: transparent; color: var(--text-light); }
.btn-decline:hover { background: var(--bg-alt); }
.cookie-modal.hidden { display: none; }

/* HERO (home only) */
.hero-home {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  color: #fff;
  padding: 3.5rem 0 2.5rem;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 2rem;
  text-align: center;
}
.hero-home h1 { color: #fff; margin-bottom: 0.6rem; }
.hero-home p { opacity: 0.9; max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* POLICY / LEGAL PAGES */
.legal-page { max-width: 800px; margin: 2rem auto; padding: 0 1.5rem; }
.legal-page h1 { margin-bottom: 1.5rem; }
.legal-page h2 { margin-top: 2rem; font-size: 1.3rem; color: var(--primary-dark); }
.legal-page p, .legal-page li { color: var(--text-light); }

/* SUCCESS PAGE */
.success-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  color: #fff;
}
.success-page h1 { margin-bottom: 0.8rem; }
.success-page p { color: var(--text-light); max-width: 400px; margin-bottom: 2rem; }
.btn-home {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}
.btn-home:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* 404 */
.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.page-404 .num-404 {
  font-family: 'Fraunces', serif;
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--primary);
  opacity: 0.15;
  line-height: 1;
}
.page-404 h1 { margin-bottom: 0.6rem; }
.page-404 p { color: var(--text-light); margin-bottom: 2rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .share-aside {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 1.5rem;
    order: 99;
  }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .cookie-modal { left: 1rem; right: 1rem; max-width: none; bottom: 1rem; }
  nav { gap: 0.1rem; }
  nav a { padding: 0.35rem 0.6rem; font-size: 0.82rem; }
  .subscribe-section { padding: 1.8rem 1.2rem; }
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(16px); }
  to { opacity:1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.6s ease-out both; }
.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }
