/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; } /* el menú es fijo: que los enlaces a #ancla no queden tapados */
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Pie de página siempre abajo del todo: en páginas cortas (textos legales...) el contenido se
   estira y la franja verde llega al borde inferior, sin franja blanca debajo. Solo en la web
   pública (<body class="sitio">): el panel y el login tienen su propia maquetación. */
.sitio { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.sitio > main { flex: 1 0 auto; }
.sitio > .site-footer { flex-shrink: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:root {
  --primary: #2f5d50;
  --primary-dark: #1f4438;
  --primary-light: #f0f6f3;
  --accent: #c76f4c;
  --accent-light: #f6e7de;
  --cream: #faf7f2;
  --cream-dark: #f1e9dd;
  --text: #2b2b28;
  --text-soft: #5c584f;
  --border: #e6ddce;
  --radius: 18px;
  --shadow: 0 20px 40px -25px rgba(31, 68, 56, 0.35);
  /* Colores de texto "de sección": los cambia .fondo-oscuro para que títulos,
     textos y enlaces se lean sobre verde oscuro (ver "Fondos de sección"). */
  --sec-heading: var(--primary-dark);
  --sec-soft: var(--text-soft);
  --sec-eyebrow: var(--accent);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, .brand-text strong {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--sec-heading);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--primary); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--primary); color: var(--sec-heading); }
.btn-ghost:hover { background: var(--primary-light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: 'Fraunces', serif; font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; margin: 0; }
.brand-text small { color: var(--text-soft); font-size: .78rem; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--text-soft); }
.site-nav a:hover { color: var(--primary-dark); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 10px 20px; border-radius: 999px; font-weight: 600 !important;
}
.nav-cta:hover { background: #a95b3c; }

.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-burger span { width: 26px; height: 2px; background: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  color: var(--sec-eyebrow); font-weight: 700; margin-bottom: 12px;
}
.hero-subtitle { font-size: 1.15rem; color: var(--sec-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0 12px; }
.hero-price { color: var(--sec-soft); font-size: .95rem; }
.hero-title { font-size: clamp(2rem, 4vw, 2.9rem); }
.hero-media img, .hero-placeholder {
  border-radius: var(--radius);
  width: 100%; object-fit: cover;
  box-shadow: var(--shadow);
}
.hero-placeholder {
  background: linear-gradient(155deg, var(--primary-light), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}

/* ---------- Formas de imagen (Seccion.imagen_forma) ----------
   La forma se elige por sección desde el panel; la foto se recorta sola
   (object-fit: cover) salvo en "original", que la muestra entera. */
.forma-cuadrada img, .forma-cuadrada .hero-placeholder { aspect-ratio: 1/1; }
.forma-horizontal img, .forma-horizontal .hero-placeholder { aspect-ratio: 4/3; }
.forma-vertical img, .forma-vertical .hero-placeholder { aspect-ratio: 4/5; }
.forma-original img { aspect-ratio: auto; height: auto; }
.forma-original .hero-placeholder { aspect-ratio: 1/1; }

/* ---------- Quote band ---------- */
.quote-band { color: var(--sec-heading); padding: 48px 0; }
.quote-band p {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem); text-align: center; max-width: 760px; margin: 0 auto;
}
.quote-band .quote-autor {
  font-family: 'Inter', system-ui, sans-serif; font-style: normal; font-size: .95rem;
  color: var(--sec-soft); margin-top: 14px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--cream-dark); }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--sec-soft); max-width: 55ch; margin: 0 auto 40px; }
.section-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.section-actions .link-arrow { margin-top: 0; }

/* ---------- Fondos de sección (Seccion.fondo) ---------- */
.fondo-normal { background: transparent; }
.fondo-alterno { background: var(--cream-dark); }
.fondo-suave { background: var(--primary-light); }
.fondo-calido { background: var(--accent-light); }
.fondo-oscuro {
  background: var(--primary-dark); color: #fff;
  --sec-heading: #fff; --sec-soft: #d3dfd8; --sec-eyebrow: #f0b79c;
}
.fondo-oscuro .btn-primary { background: var(--accent); }
.fondo-oscuro .btn-primary:hover { background: #a95b3c; }
.fondo-oscuro .btn-ghost { border-color: rgba(255, 255, 255, .7); }
.fondo-oscuro .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
/* Las tarjetas, preguntas y precios siguen siendo blancos también sobre fondo oscuro. */
.fondo-oscuro .card, .fondo-oscuro .faq-item, .fondo-oscuro .precio-card {
  color: var(--text);
  --sec-heading: var(--primary-dark); --sec-soft: var(--text-soft); --sec-eyebrow: var(--accent);
}

.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
}
.cards-grid[data-cols="1"] { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
.cards-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); max-width: 860px; margin-inline: auto; }
.cards-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.cards-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { font-size: 1.8rem; margin-bottom: 10px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card-body { color: var(--sec-soft); font-size: .96rem; }
.card-body p:last-child { margin-bottom: 0; }
.empty-hint { color: var(--sec-soft); font-style: italic; }

.about-teaser {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center;
}
.about-teaser-media img, .about-teaser-media .hero-placeholder {
  width: 100%; object-fit: cover; border-radius: var(--radius);
}
@media (min-width: 861px) {
  .about-teaser.imagen-derecha { grid-template-columns: 1.2fr .8fr; }
  .about-teaser.imagen-derecha .about-teaser-media { order: 2; }
}
.link-arrow {
  display: inline-block; margin-top: 10px; font-weight: 600; color: var(--sec-heading);
  text-decoration: none; border-bottom: 2px solid var(--accent);
}

.prose { color: var(--sec-soft); font-size: 1.02rem; }
.fondo-oscuro .prose a { color: #fff; }
.prose-narrow { max-width: 70ch; margin: 0 auto; }
.prose p { margin-bottom: 1.1em; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--sec-heading); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item div { color: var(--sec-soft); margin-top: 12px; }

/* ---------- Pasos numerados ---------- */
.pasos {
  list-style: none; margin: 0 auto; padding: 0; max-width: 760px;
  display: flex; flex-direction: column; gap: 28px;
}
.paso { display: flex; gap: 20px; align-items: flex-start; }
.paso-numero {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-family: 'Fraunces', serif; font-size: 1.25rem;
}
.paso-cuerpo { color: var(--sec-soft); padding-top: 8px; }
.paso-cuerpo h3 { font-size: 1.15rem; margin-bottom: 6px; }
.paso-cuerpo p:last-child { margin-bottom: 0; }

/* ---------- Precios ---------- */
.precios-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
  max-width: 860px; margin: 0 auto;
}
.precio-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
}
.precio-etiqueta { color: var(--sec-soft); font-weight: 600; margin-bottom: 6px; }
.precio-cifra {
  font-family: 'Fraunces', serif; font-size: 2rem; color: var(--sec-heading);
  line-height: 1.1; margin: 0;
}
.precios-nota { text-align: center; color: var(--sec-soft); margin: 28px 0 0; }

/* ---------- Imagen grande ---------- */
.imagen-grande { margin: 0 auto; max-width: 860px; }
.imagen-grande img {
  width: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow);
}
.imagen-grande.forma-cuadrada, .imagen-grande.forma-vertical { max-width: 560px; }
.imagen-grande figcaption {
  text-align: center; color: var(--sec-soft); font-size: .92rem; margin-top: 14px;
}

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 64px 0; margin-top: 0; }
.cta-band p { color: var(--sec-soft); }

/* ---------- Page header (subpages) ---------- */
.page-header { padding: 56px 0 24px; text-align: center; }
.page-header .hero-subtitle { margin: 0 auto; }
.page-header:not(.fondo-normal) { padding-bottom: 56px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.contact-list li { margin-bottom: 18px; }
.contact-list a { color: var(--primary-dark); text-decoration: none; }
.price-box {
  margin-top: 28px; padding: 22px; background: var(--primary-light);
  border-radius: var(--radius);
}
.price-box h3 { margin-bottom: 10px; font-size: 1.05rem; }
.price-box p { margin: 0 0 6px; color: var(--text-soft); }

.contact-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: .92rem; }
.form-row input:not([type="checkbox"]), .form-row textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--cream);
}
.form-row input:not([type="checkbox"]):focus, .form-row textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.form-row-check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-soft); }
.form-row-check input[type="checkbox"] { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); }
.form-row .errorlist { color: #b3392a; font-size: .85rem; margin: 4px 0 0; padding: 0; list-style: none; }
.honeypot { position: absolute; left: -9999px; }

.alert { padding: 14px 18px; border-radius: 12px; margin: 20px 0; }
.alert-success { background: var(--primary-light); color: var(--primary-dark); }
.alert-error { background: #fbe3de; color: #8a2f1d; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: calc(var(--reveal-i, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #e7ede9; padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer-col p, .footer-col a { color: #c7d4cc; font-size: .92rem; text-decoration: none; line-height: 1.8; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .82rem; color: #9fb0a6; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner, .about-teaser, .contact-grid { grid-template-columns: 1fr; }
  .about-teaser-media { order: -1; max-width: 260px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .cards-grid[data-cols="3"], .cards-grid[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards-grid[data-cols] { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-burger { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 16px 24px;
    display: none;
    gap: 16px;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-cta { text-align: center; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
}

/* ---------- Panel de edición (/app/) ---------- */
.panel-body { background: var(--cream); }
.panel-main { padding: 40px 0 80px; }

.panel-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.panel-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.panel-nav { flex-wrap: wrap; row-gap: 10px; }
.panel-nav a.is-active { color: var(--primary-dark); }
.panel-logout-form { margin: 0; }
.panel-cuentas-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary-dark);
  transition: background .15s ease;
}
.panel-cuentas-link:hover { background: var(--accent-light); color: var(--accent); }
.panel-cuentas-link svg { width: 18px; height: 18px; display: block; }
button.nav-cta {
  border: none; font-family: inherit; font-size: .95rem; cursor: pointer;
}

.panel-anchor-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 28px;
}
.panel-anchor-nav a {
  background: var(--accent-light); color: var(--primary-dark);
  padding: 6px 14px; border-radius: 999px; font-size: .85rem;
  font-weight: 600; text-decoration: none;
}
.panel-anchor-nav a:hover { background: var(--primary-light); }

.panel-list-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 8px;
}

.panel-section { margin-bottom: 24px; }
.panel-section h2 { font-size: 1.2rem; margin-bottom: 20px; }

.panel-form-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px;
}
.panel-form-actions form { margin: 0; }

.panel-list { padding: 0; overflow: hidden; }
.panel-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.panel-row:last-child { border-bottom: none; }
a.panel-row-link { text-decoration: none; color: inherit; transition: background .15s ease; }
a.panel-row-link:hover { background: var(--cream-dark); }

.panel-row-move { display: flex; flex-direction: column; gap: 4px; }
.panel-row-move form { margin: 0; }
.panel-row-body { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.panel-row-body strong { color: var(--primary-dark); }
.panel-row-meta { font-size: .85rem; color: var(--text-soft); }
.panel-row-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.panel-row-actions form { margin: 0; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; width: fit-content;
}
.badge-on { background: var(--primary-light); color: var(--primary-dark); }
.badge-off { background: var(--cream-dark); color: var(--text-soft); }

.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-danger { background: transparent; border-color: #b3392a; color: #b3392a; }
.btn-danger:hover { background: #fbe3de; }

.panel-thumb {
  width: 96px; height: 96px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 10px;
}

.form-row select {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--cream);
}
.form-row select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
/* "Insertar dato": desplegable pequeño bajo cada campo de texto del formulario de sección. */
.form-row select.insertar-dato {
  align-self: flex-start; max-width: 100%; font-size: .85rem; padding: 6px 10px;
  color: var(--primary-dark); background: var(--primary-light); border-color: transparent; cursor: pointer;
}
.panel-note code { background: #fff; border-radius: 6px; padding: 1px 6px; font-size: .9em; }

.panel-login-body { display: flex; min-height: 100vh; }
.panel-login-wrap { margin: auto; padding: 24px; width: 100%; max-width: 420px; }
.panel-login-form { width: 100%; }
.panel-login-brand { text-align: center; margin-bottom: 24px; }
.panel-login-brand .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: 'Fraunces', serif; font-size: 1.3rem; margin-bottom: 14px;
}
.panel-login-brand h1 { font-size: 1.5rem; margin-bottom: 6px; }
.panel-login-submit { width: 100%; text-align: center; margin-top: 8px; }

.panel-subtitle { font-size: 1rem; margin: 28px 0 14px; color: var(--primary-dark); }
.form-label { font-weight: 600; font-size: .92rem; }
.cols-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.cols-option { cursor: pointer; margin: 0; position: relative; }
.cols-option input { position: absolute; opacity: 0; pointer-events: none; }
.cols-option span {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--cream); font-weight: 600;
}
.cols-option input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.cols-option input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.cols-preview { display: grid; gap: 8px; margin-top: 10px; }
.cols-preview span {
  height: 44px; border-radius: 8px; background: var(--primary-light);
  border: 1px solid var(--border);
}

/* --- Panel: editor de páginas y secciones --- */
.panel-breadcrumb { font-size: .88rem; color: var(--text-soft); margin-bottom: 10px; }
.panel-breadcrumb a { color: var(--primary-dark); }
.panel-note {
  background: var(--primary-light); border-radius: 12px; padding: 14px 18px;
  color: var(--text-soft); margin: 16px 0 24px;
}
.panel-note a, .panel-row-body a { color: var(--primary-dark); }
.panel-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel-row-actions { flex-wrap: wrap; justify-content: flex-end; }
.badge-fondo { background: #fff; border: 1px solid var(--border); color: var(--text-soft); }
.fondo-muestra {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--border); margin-right: 6px; vertical-align: -1px;
}
.fondo-muestra.fondo-normal { background: var(--cream); }

.seccion-editor { display: flex; flex-direction: column; margin-top: 20px; }
.seccion-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  scroll-margin-top: 110px;
}
.seccion-row:hover { transform: none; }
.seccion-row:target { border-color: var(--primary); box-shadow: var(--shadow); }
.seccion-row.is-oculta { background: var(--cream); border-style: dashed; }
.seccion-row.is-oculta .panel-row-body strong { color: var(--text-soft); }
.seccion-add {
  align-self: center; margin: 6px 0; padding: 4px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; text-decoration: none;
  color: var(--text-soft); border: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.seccion-add:hover, .seccion-add:focus-visible {
  color: var(--primary-dark); border-color: var(--primary); background: var(--primary-light);
}
.seccion-galeria .card { text-decoration: none; }
.panel-dashboard-grid .card { text-decoration: none; }

.elemento-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.elemento-row[hidden] { display: none; }
.elemento-campos { flex: 1 1 auto; display: grid; grid-template-columns: 110px 1fr; gap: 0 16px; min-width: 0; }
.elemento-campos .elemento-titulo:first-child, .elemento-campos .elemento-texto { grid-column: 1 / -1; }
.elemento-campos .form-row { margin-bottom: 12px; }
.elemento-acciones { display: flex; flex-direction: column; gap: 6px; padding-top: 26px; }
.elemento-delete { display: none; }
.panel-form [hidden] { display: none; }

@media (max-width: 700px) {
  .seccion-row, .panel-row { flex-wrap: wrap; }
  .seccion-row .panel-row-actions, .panel-row .panel-row-actions { margin-left: 0; justify-content: flex-start; width: 100%; }
  .elemento-row { flex-direction: column; }
  .elemento-acciones { flex-direction: row; padding-top: 0; }
  .elemento-campos { grid-template-columns: 1fr; }
  .elemento-campos .form-row { grid-column: 1 / -1; }
}

/* --- Blog --- */
.blog-grid { align-items: stretch; }
.blog-card { display: flex; flex-direction: column; gap: 10px; }
.blog-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; display: block; }
.blog-card-title { font-size: 1.25rem; margin: 0; }
.blog-card-title a { color: var(--sec-heading, var(--primary-dark)); text-decoration: none; }
.blog-card-title a:hover { text-decoration: underline; }
.blog-card .card-body { flex: 1; margin: 0; }
.blog-meta { font-size: .85rem; color: var(--sec-soft); margin: 0; }
.blog-paginas { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; color: var(--sec-soft); }
.blog-aviso { font-size: .9rem; color: var(--sec-soft); border-top: 1px solid rgba(0,0,0,.08); padding-top: 16px; margin-top: 32px; }

/* --- Artículo --- */
.articulo-cabecera { padding: 64px 0 40px; }
.articulo-meta {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: var(--text-soft); margin: 0 0 22px;
}
.articulo-meta a { color: var(--accent); text-decoration: none; }
.articulo-meta a:hover { text-decoration: underline; }
.articulo-titulo {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.12; letter-spacing: -.01em;
  max-width: 22ch; margin: 0 0 28px; color: var(--primary-dark);
}
.articulo-resumen {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.6; color: var(--text-soft);
  max-width: 62ch; margin: 0; padding-left: 20px; border-left: 3px solid var(--accent);
}
.articulo-imagen { margin: 0 0 56px; }
.articulo-imagen img {
  width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow);
}
.articulo-cuerpo {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start;
  padding-bottom: 72px;
}
.articulo-cabecera + .articulo-cuerpo { padding-top: 8px; }
.articulo-texto { font-size: 1.14rem; line-height: 1.8; color: var(--text); }
.articulo-texto > :first-child { margin-top: 0; }
.articulo-texto p { margin: 0 0 1.35em; }
.articulo-texto h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.25; margin: 2.2em 0 .7em;
  color: var(--primary-dark); scroll-margin-top: 96px;
}
.articulo-texto h3 { font-size: 1.25rem; line-height: 1.3; margin: 1.8em 0 .5em; color: var(--primary-dark); }
.articulo-texto h2 + h3 { margin-top: 1em; }
.articulo-texto ul, .articulo-texto ol { margin: 0 0 1.5em; padding-left: 1.3em; list-style: revert; }
.articulo-texto li { margin-bottom: .6em; padding-left: .3em; }
.articulo-texto li::marker { color: var(--accent); font-weight: 700; }
.articulo-texto a { color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.articulo-texto a:hover { color: var(--accent); }
.articulo-texto strong { color: var(--primary-dark); }
.articulo-texto blockquote {
  margin: 2em 0; padding: 18px 24px; background: var(--accent-light); border-radius: 12px;
  border-left: 4px solid var(--accent); font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem;
}
.articulo-texto blockquote p:last-child { margin-bottom: 0; }
.articulo-columna .blog-aviso { font-size: .9rem; margin-top: 40px; }

.articulo-lateral { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
.lateral-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.lateral-titulo {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  color: var(--accent); margin: 0 0 14px;
}
.articulo-indice[hidden] { display: none; }
.articulo-indice ol { list-style: none; margin: 0; padding: 0; counter-reset: indice; }
.articulo-indice li { counter-increment: indice; margin: 0 0 10px; padding-left: 28px; position: relative; font-size: .95rem; line-height: 1.4; }
.articulo-indice li::before {
  content: counter(indice); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark); font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.articulo-indice a { color: var(--text); text-decoration: none; }
.articulo-indice a:hover { color: var(--accent); }
.lateral-autora { text-align: center; }
.lateral-foto { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; margin: 0 auto 14px; }
.lateral-nombre { font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; font-weight: 600; margin: 0 0 4px; color: var(--primary-dark); }
.lateral-detalle { font-size: .85rem; color: var(--text-soft); margin: 0 0 12px; }
.lateral-texto { font-size: .95rem; color: var(--text-soft); margin: 0 0 18px; }

@media (max-width: 960px) {
  .articulo-cuerpo { grid-template-columns: 1fr; gap: 40px; }
  .articulo-lateral { position: static; }
  .articulo-indice { display: none; }
  .articulo-cabecera { padding-top: 40px; }
  .articulo-imagen img { aspect-ratio: 16 / 10; }
  .articulo-texto { font-size: 1.08rem; }
  .articulo-texto ul, .articulo-texto ol { padding-left: 1.1em; }
}
.page-header .eyebrow a { color: inherit; }

/* --- Selector de idioma (ES / EN) --- */
.site-nav .nav-idioma {
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--primary-dark);
  border: 1.5px solid var(--border); border-radius: 999px; padding: 5px 11px; line-height: 1;
}
.site-nav .nav-idioma:hover { border-color: var(--accent); color: var(--accent); }
