/* =========================================================
   Esencia Spa Madrid — estilos
   Los colores y la tipografía se cambian aquí, en :root.
   (Valores provisionales: ajustar a la identidad de EUESPA / Natura.)
   ========================================================= */
:root {
  --brand: #c1121f;
  --brand-dark: #8f0d17;
  --ink: #1f1f23;
  --ink-soft: #3a3a42;
  --muted: #6b6b73;
  --bg: #ffffff;
  --bg-soft: #f6f3ef;
  --line: #e6e1da;
  --dark: #1f1f23;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(31, 31, 35, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: .7em 1.4em; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600;
  transition: background .2s, color .2s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--bg-soft); color: var(--ink); }
.btn-lg { padding: .85em 1.8em; font-size: 1.05rem; }
.btn-block { display: block; text-align: center; width: 100%; }

/* ---------- Barra superior y cabecera ---------- */
.topbar { background: #111114; color: #d9d9de; font-size: .85rem; }
.topbar a { color: #d9d9de; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar-contact { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-aula { font-weight: 600; }

.site-header { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 14px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; }
.brand-logo { max-height: 48px; width: auto; }
.brand-text { font-size: 1.35rem; letter-spacing: .02em; }
.brand-text strong { color: #fff; font-weight: 800; }

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav .menu a { color: #e8e8ec; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.main-nav .menu a:hover,
.main-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,.1); }
.nav-cta { padding: .55em 1.2em; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 24px; height: 2px; background: #fff; position: relative; content: ""; transition: transform .2s;
}
.nav-toggle .bars::before { position: absolute; top: -7px; }
.nav-toggle .bars::after { position: absolute; top: 7px; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--dark);
    flex-direction: column; align-items: stretch; padding: 12px 20px 22px; gap: 14px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .main-nav.is-open { display: flex; }
  .main-nav .menu { flex-direction: column; }
  .main-nav .menu a { display: block; padding: 12px; }
  .nav-cta { text-align: center; }
  .topbar-contact a:nth-child(2) { display: none; }
}

/* ---------- Portada ---------- */
.hero {
  background: linear-gradient(135deg, #1f1f23 0%, #3a1015 100%);
  color: #fff; padding: clamp(64px, 12vw, 150px) 0; position: relative;
}
.hero-img { background-size: cover; background-position: center; }
.hero-img::before { content: ""; position: absolute; inset: 0; background: rgba(15,15,18,.55); }
.hero-inner { position: relative; max-width: 820px; }
.hero h1 { color: #fff; }
.hero-text { font-size: 1.25rem; color: #ececf0; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.page-hero { background: var(--bg-soft); padding: clamp(36px, 6vw, 70px) 0; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 680px; margin: 0; }
.crumbs { margin-bottom: 10px; font-size: .95rem; }
.crumbs a { text-decoration: none; font-weight: 600; }

/* ---------- Secciones ---------- */
.section { padding: clamp(44px, 7vw, 84px) 0; }
.section-soft { background: var(--bg-soft); }
.section-title { margin-bottom: 1em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.empty { color: var(--muted); }

.offer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.offer {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s, border-color .2s;
  border-top: 4px solid var(--brand);
}
.offer:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.offer h3 { margin-bottom: .35em; }
.offer p { color: var(--muted); margin: 0; }
@media (max-width: 980px) { .offer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .offer-grid { grid-template-columns: 1fr; } }

/* ---------- Tarjetas ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--bg-soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #2a2a30, #5b1119); }
.badge { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--ink); font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.15rem; margin-bottom: .4em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-text { color: var(--muted); font-size: .98rem; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; color: var(--ink-soft); margin-top: auto; padding-top: 6px; }
.link-more { font-weight: 700; text-decoration: none; margin-top: 8px; display: inline-block; }

/* ---------- Ficha (curso / monográfico / masaje) ---------- */
.ficha-grid { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }
@media (max-width: 900px) { .ficha-grid { grid-template-columns: 1fr; } }
.ficha-foto { margin: 0 0 28px; }
.ficha-foto img { width: 100%; border-radius: var(--radius); }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.ficha-aside .box { position: sticky; top: 110px; }
.datos { margin: 0 0 20px; }
.datos > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.datos dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.datos dd { margin: 2px 0 0; font-weight: 600; }
.box-note { text-align: center; font-size: .92rem; color: var(--muted); margin: 14px 0 0; }

.entry > *:first-child { margin-top: 0; }
.entry h2, .entry h3 { margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry img { border-radius: 10px; }

/* ---------- Llamada a la acción ---------- */
.cta-band { background: var(--brand); color: #fff; padding: clamp(44px, 7vw, 76px) 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #ffe6e8; font-size: 1.15rem; }

/* ---------- Contacto ---------- */
.contacto-grid { display: grid; grid-template-columns: 1fr 360px; gap: 44px; align-items: start; }
@media (max-width: 900px) { .contacto-grid { grid-template-columns: 1fr; } }
.contacto-datos h2 { font-size: 1.3rem; }
.form p { margin: 0 0 18px; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  width: 100%; padding: 12px 14px; font: inherit; border: 1.5px solid #cfc9c0; border-radius: 10px; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(193,18,31,.18); }
.form .check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.form .check input { margin-top: 5px; }
.trampa { position: absolute; left: -9999px; }
.aviso { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; }
.aviso-ok { background: #e8f5ec; border: 1px solid #b5dfc1; color: #14532d; }
.aviso-error { background: #fdecec; border: 1px solid #f3b9b9; color: #7f1d1d; }

/* ---------- Pie ---------- */
.site-footer { background: var(--dark); color: #cfcfd6; }
.site-footer a { color: #e8e8ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-brand { font-size: 1.4rem; color: #fff; margin-bottom: .4em; }
.footer-family { font-size: .92rem; }
.footer-title { font-size: 1rem; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 10px; }
.footer-list.dark li { color: var(--ink); }
.footer-list.dark a { color: var(--brand); }
.footer-social { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); font-size: .88rem; }
.footer-legal-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer-legal a { margin-left: 16px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
