/*
Theme Name: Fernando Premium
Theme URI: https://fernandosaludmental.com
Author: Fernando Salguero
Description: Tema editorial premium para el blog de fernandosaludmental.com. Paleta terracota, Cormorant Garamond + Onest. Coherente con las landings en HTML puro.
Version: 1.0
Text Domain: fernando-premium
*/

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

:root {
  --bg: #f5f2ee;
  --bg-soft: #faf7f2;
  --bg-dark: #16130f;
  --surface: #ffffff;
  --ink: #1a1714;
  --ink-mid: #4a4540;
  --ink-soft: #8a847c;
  --rule: #e2ddd4;
  --rule-soft: #ece7df;
  --accent: #9e7b5a;
  --accent-deep: #7e5e42;
  --accent-bright: #c4946a;
  --accent-light: #f0e6da;
  --accent-warm: #c4864a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-deep); }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 242, 238, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.3px;
}
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 14px;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent-deep); }
.nav-cta {
  font-size: 13px;
  color: var(--accent-deep);
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  transition: all 0.2s;
}
.nav-cta:hover { background: var(--accent-deep); color: #fff; }
@media (max-width: 640px) {
  nav { padding: 13px 20px; }
  .nav-logo { font-size: 17px; }
  .nav-link { display: none; }
}

/* ===== SHARED ===== */
.eyebrow {
  font-size: 11.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
  margin-bottom: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 400;
  box-shadow: 0 6px 18px rgba(158, 123, 90, 0.22);
  transition: all 0.25s;
}
.btn-primary:hover { background: #6a4f37; transform: translateY(-2px); }
.btn-primary svg { width: 16px; height: 16px; }

/* ===== BLOG INDEX ===== */
.blog-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 28px 60px;
}
.blog-head {
  padding-bottom: 40px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.blog-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.blog-title em { font-style: italic; color: var(--accent); }
.blog-intro {
  font-size: 17px;
  color: var(--ink-mid);
  line-height: 1.7;
  max-width: 560px;
}

.post-list { display: flex; flex-direction: column; }
.post-item {
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.post-meta {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.post-item-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}
.post-item-title a { color: var(--ink); text-decoration: none; transition: color 0.2s; }
.post-item-title a:hover { color: var(--accent-deep); }
.post-item-excerpt {
  font-size: 16px;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 18px;
}
.post-item-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 500;
}
.post-item-more span { transition: transform 0.25s ease; display: inline-block; }
.post-item-more:hover span { transform: translateX(5px); }
.no-posts { padding: 60px 0; color: var(--ink-soft); font-size: 17px; }

.pagination {
  padding: 48px 0 0;
  display: flex;
  justify-content: center;
}
.pagination .nav-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pagination a, .pagination .current {
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  text-decoration: none;
  color: var(--ink-mid);
}
.pagination .current { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }

/* ===== SINGLE ARTICLE ===== */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 28px 40px;
}
.article-head {
  padding-bottom: 36px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}
.article-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5.5vw, 52px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.6px;
  margin-bottom: 22px;
}
.article-meta {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.article-cover {
  margin-bottom: 40px;
  border-radius: 16px;
  overflow: hidden;
}
.article-cover img { display: block; width: 100%; height: auto; }

/* Article body — estiliza el contenido generado por WordPress */
.article-body { font-size: 17.5px; line-height: 1.8; color: var(--ink-mid); }
.article-body > * + * { margin-top: 24px; }
.article-body p { color: var(--ink-mid); }
.article-body strong { color: var(--ink); font-weight: 500; }
.article-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.article-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin-top: 48px;
}
.article-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 36px;
}
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin-top: 10px; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  border-left: 2.5px solid var(--accent);
  padding: 6px 0 6px 24px;
  margin: 32px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
}
.article-body img { max-width: 100%; height: auto; border-radius: 12px; }
.article-body hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }

/* End-of-article CTA */
.article-cta {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 0 28px;
}
.article-cta-inner {
  background: radial-gradient(120% 100% at 50% 0%, #1d1914 0%, var(--bg-dark) 70%);
  border-radius: 18px;
  padding: 44px 36px;
  text-align: center;
}
.article-cta-inner h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 300;
  color: #f0ece6;
  margin-bottom: 14px;
}
.article-cta-inner p {
  font-size: 15.5px;
  color: #b0a89e;
  line-height: 1.65;
  max-width: 460px;
  margin: 0 auto 28px;
}
.article-cta-links {
  margin-top: 26px;
  font-size: 13px;
  color: #8a847c;
}
.article-cta-links a { color: var(--accent-bright); text-decoration: none; }
.article-cta-links a:hover { color: #f0ece6; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg-dark);
  border-top: 1px solid #2a251f;
  padding: 54px 32px 40px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}
.footer-col-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6a625a;
  margin-bottom: 16px;
}
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-social a {
  font-size: 14px;
  color: #b0a89e;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover, .footer-social a:hover { color: #f0ece6; }
.footer-copy {
  max-width: 1000px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #2a251f;
  font-size: 12px;
  color: #6a625a;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
