/*
Theme Name: MPD Theme
Theme URI: https://masajeparadeportistas.com
Author: Hugo López
Author URI: https://masajeparadeportistas.com
Description: Tema a medida para MasajeParaDeportistas.com — editorial de masaje, deporte y recuperación.
Version: 0.2.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mpd-theme
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
/*
 * Fixed brand palette — intentionally does NOT follow the visitor's OS/browser
 * dark-mode setting. Marfil + petróleo + terracota is the brand identity;
 * it should look the same for every visitor regardless of their system theme.
 */
:root{
  --bg:#F5F1E9; --surface:#FBF7EE; --surface-2:#EAE0CB; --strong:#123F4E; --muted:#66747A;
  --accent:#BA7458; --accent-light:#DFAB91; --sport:#4F6B45; --line:#E1D3B8; --focus:#123F4E;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; color-scheme:light; }
body{
  margin:0; background:var(--bg); color:var(--muted);
  font-family:"Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  font-size:16px; line-height:1.5;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; }
h1,h2,h3{ font-family:"Bodoni Moda", "Times New Roman", serif; text-wrap:balance; margin:0; }
p{ margin:0; }
:focus-visible{ outline:2px solid var(--focus); outline-offset:3px; }
.screen-reader-text{ position:absolute !important; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden; }

.site-main{ overflow-x:hidden; }

/* Two-tone heading pattern: line 1 bold sans (strong), line 2 italic serif (accent) */
.tt-a{ font-family:"Instrument Sans", ui-sans-serif, sans-serif; font-weight:800; color:var(--strong); display:block; }
.tt-b{ font-family:"Bodoni Moda", serif; font-style:italic; font-weight:500; color:var(--accent); display:block; }

/* ==========================================================================
   Sitewide header (home, notes, /contenido/) — logo centered, nav left
   ========================================================================== */
.site-header{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px;
  padding:18px 20px; border-bottom:1px solid var(--line); background:var(--bg);
}
.site-header nav.primary{ display:flex; gap:20px; font-size:.78rem; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.site-header nav.primary a{ text-decoration:none; padding-bottom:3px; border-bottom:2px solid transparent; }
.site-header nav.primary a.is-active{ border-color:var(--accent); }
.site-header .logo{
  grid-column:2; justify-self:center; font-family:"Bodoni Moda"; font-weight:600;
  font-size:clamp(.95rem,3vw,1.3rem); letter-spacing:.14em; text-transform:uppercase;
  color:var(--strong); white-space:nowrap; text-decoration:none;
}
.site-header .header-spacer{ grid-column:3; }
@media (max-width:480px){
  .site-header{ grid-template-columns:1fr; justify-items:center; gap:10px; }
  .site-header .logo{ grid-column:1; }
  .site-header nav.primary{ grid-column:1; }
  .site-header .header-spacer{ display:none; }
}

/* ==========================================================================
   Therapist-profile header (header-perfil.php) — logo left + tagline, nav right
   ========================================================================== */
.header-perfil{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  padding:18px 20px; border-bottom:1px solid var(--line); background:var(--bg);
}
.header-perfil .brand{ text-decoration:none; }
.header-perfil .brand-name{ font-family:"Bodoni Moda"; font-weight:700; font-size:1.15rem; color:var(--strong); }
.header-perfil .brand-name .dim{ font-weight:400; color:var(--muted); }
.header-perfil .tagline{ margin-top:2px; font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.header-perfil nav.primary{ display:flex; gap:20px; font-size:.78rem; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.header-perfil nav.primary a{ text-decoration:none; color:var(--muted); }
.header-perfil nav.primary a.is-active{ color:var(--strong); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ display:flex; flex-direction:column; gap:14px; padding:26px 20px; border-top:1px solid var(--line); background:var(--surface-2); }
.site-footer .footer-row{ display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; max-width:1080px; margin:0 auto; width:100%; }
.site-footer .footer-logo{ font-family:"Bodoni Moda"; font-weight:600; letter-spacing:.1em; text-transform:uppercase; font-size:.85rem; color:var(--strong); text-decoration:none; }
.site-footer .footer-links{ display:flex; gap:18px; font-size:.8rem; font-weight:600; text-transform:uppercase; letter-spacing:.03em; }
.site-footer .footer-links a{ text-decoration:none; }
.site-footer .footnote{ max-width:1080px; margin:0 auto; width:100%; font-size:.76rem; color:var(--muted); }

/* ==========================================================================
   Home hero — full width & height, no rounded corners
   ========================================================================== */
.hero{ position:relative; min-height:100svh; display:flex; align-items:flex-end; overflow:hidden; background:var(--strong); }
.hero .hero-media{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.hero .hero-media-fallback{ position:absolute; inset:0; background:linear-gradient(135deg, var(--strong), #0c2a34); }
.hero::after{ content:""; position:absolute; inset:0; background:linear-gradient(0deg, rgba(18,16,13,.78), rgba(18,16,13,.16) 55%); z-index:1; }
.hero-copy{ position:relative; z-index:2; padding:32px 22px 48px; color:#F5F1E9; max-width:640px; margin:0 auto; width:100%; }
.hero-copy .eyebrow{ color:var(--accent-light); }
.hero-copy h1{ font-size:clamp(2.2rem,7vw,4.2rem); line-height:1.02; margin-top:8px; display:flex; flex-direction:column; }
.hero-copy h1 .tt-a{ color:#F5F1E9; font-size:1em; }
.hero-copy h1 .tt-b{ color:var(--accent-light); font-size:1em; }
.hero-copy .deck{ margin-top:14px; max-width:42ch; font-size:1.05rem; line-height:1.55; color:#EFE2D3; }

.hero-badge{ position:absolute; z-index:2; right:24px; bottom:30px; width:100px; height:100px; color:#F5F1E9; }
@media (max-width:480px){ .hero-badge{ width:74px; height:74px; right:14px; bottom:18px; } }

/* ==========================================================================
   Eyebrow (shared)
   ========================================================================== */
.eyebrow{ font-weight:600; font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); }

/* ==========================================================================
   Section intro (home "Cuida tu cuerpo tan bien como entrenas")
   ========================================================================== */
.section-intro{ text-align:center; padding:48px 20px 8px; display:flex; flex-direction:column; align-items:center; gap:14px; max-width:1080px; margin:0 auto; }
.section-intro .eyebrow{ color:var(--muted); }
.section-intro h2{ font-size:clamp(1.5rem,4vw,2.3rem); font-weight:600; max-width:26ch; line-height:1.15; }

/* ==========================================================================
   Note grid & card (home + /contenido/)
   ========================================================================== */
.note-grid{ display:grid; grid-template-columns:1fr; gap:26px; padding:22px 20px 48px; max-width:1080px; margin:0 auto; }
@media (min-width:640px){ .note-grid{ grid-template-columns:repeat(3,1fr); } }
.note-grid.note-grid--home{ }
@media (min-width:900px){ .note-grid.note-grid--home{ grid-template-columns:repeat(4,1fr); gap:18px; } }

.note-card{ display:flex; flex-direction:column; gap:10px; text-decoration:none; color:inherit; }
.note-card .thumb{ position:relative; border-radius:3px; overflow:hidden; aspect-ratio:4/5; background:var(--surface-2); }
.note-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.note-card .cat{ display:flex; align-items:center; gap:6px; font-size:.68rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.note-card .cat .dot{ width:6px; height:6px; border-radius:50%; }
.cat.deporte, .cat.deporte .dot{ color:var(--sport); }
.cat.deporte .dot{ background:var(--sport); }
.cat.recuperacion, .cat.recuperacion .dot{ color:var(--muted); }
.cat.recuperacion .dot{ background:var(--muted); }
.cat.masaje, .cat.masaje .dot{ color:var(--accent); }
.cat.masaje .dot{ background:var(--accent); }
.note-card h3{ font-family:"Instrument Sans"; font-size:1rem; font-weight:600; line-height:1.3; color:var(--strong); }
.note-card p{ font-size:.88rem; line-height:1.5; color:var(--muted); }

.archive-head{ padding:34px 20px 6px; max-width:1080px; margin:0 auto; display:flex; flex-direction:column; gap:6px; }
.archive-head h1{ font-size:clamp(1.8rem,5vw,2.4rem); font-weight:600; color:var(--strong); }
.archive-head p{ color:var(--muted); font-size:.95rem; max-width:56ch; }

/* ==========================================================================
   Single note (article)
   ========================================================================== */
.article-head{ max-width:640px; margin:0 auto; padding:36px 22px 0; }
.article-head h1{ font-size:clamp(1.8rem,5vw,2.7rem); font-weight:600; line-height:1.08; color:var(--strong); margin-top:14px; }
.article-head .deck{ margin-top:14px; font-size:1.08rem; line-height:1.55; color:var(--muted); max-width:58ch; }
.byline{ display:flex; align-items:center; gap:10px; margin-top:22px; padding-bottom:26px; }
.byline .avatar{ width:34px; height:34px; border-radius:50%; background:var(--strong); color:var(--surface); display:flex; align-items:center; justify-content:center; font-family:"Bodoni Moda"; font-weight:600; font-size:.95rem; flex-shrink:0; overflow:hidden; }
.byline .avatar img{ width:100%; height:100%; object-fit:cover; }
.byline a{ text-decoration:none; font-weight:600; font-size:.88rem; border-bottom:1px solid transparent; }
.byline a:hover{ border-color:var(--accent); }
.byline .sep{ color:var(--line); }
.byline time{ font-size:.85rem; color:var(--muted); }

.featured-image{ width:100%; aspect-ratio:16/8; overflow:hidden; background:var(--surface-2); }
.featured-image img{ width:100%; height:100%; object-fit:cover; }

.article-body{ max-width:640px; margin:0 auto; padding:32px 22px 8px; display:flex; flex-direction:column; gap:18px; }
.article-body p{ font-size:1.02rem; line-height:1.7; color:var(--strong); }
.article-body h2{ font-size:1.35rem; font-weight:600; color:var(--strong); margin-top:8px; }
.article-body ul{ margin:0; padding-left:1.2em; display:flex; flex-direction:column; gap:8px; font-size:1rem; line-height:1.6; color:var(--strong); }
.article-body ul li::marker{ color:var(--sport); }
.article-body blockquote{ margin:6px 0; padding:4px 0 4px 20px; border-left:3px solid var(--accent); font-family:"Bodoni Moda"; font-style:italic; font-weight:500; font-size:1.2rem; line-height:1.45; color:var(--strong); }
.article-body img{ border-radius:3px; }

.sources{ max-width:640px; margin:6px auto 0; padding:20px 22px 0; border-top:1px dashed var(--line); }
.sources .eyebrow{ color:var(--muted); }
.sources ul{ margin:10px 0 0; padding-left:1.1em; display:flex; flex-direction:column; gap:6px; font-size:.86rem; line-height:1.5; color:var(--muted); font-style:italic; }

.related{ padding:40px 20px 48px; }
.related-head{ max-width:640px; margin:0 auto 20px; }
.related-head h2{ font-size:1.2rem; font-weight:600; color:var(--strong); }
.related-grid{ max-width:960px; margin:0 auto; display:grid; grid-template-columns:1fr; gap:20px; }
@media (min-width:640px){ .related-grid{ grid-template-columns:repeat(3,1fr); } }
.related-grid .note-card h3{ font-size:.95rem; }

/* ==========================================================================
   Therapist profile
   ========================================================================== */
.profile-hero{ display:flex; flex-direction:column; }
.profile-copy{ padding:28px 20px 34px; }
.profile-copy .eyebrow{ color:var(--accent); }
.profile-copy h1{ font-size:clamp(2.4rem,8vw,3.6rem); line-height:.98; margin-top:10px; }
.profile-copy h1 .tt-a, .profile-copy h1 .tt-b{ font-size:1em; }
.profile-copy .role{ font-size:.85rem; color:var(--strong); font-weight:700; margin-top:10px; letter-spacing:.08em; text-transform:uppercase; }
.profile-copy .intro{ margin-top:16px; font-size:1.02rem; line-height:1.65; color:var(--muted); max-width:46ch; }

.profile-portrait{ position:relative; overflow:hidden; aspect-ratio:4/3; background:var(--surface-2); }
.profile-portrait img{ width:100%; height:100%; object-fit:cover; }
.portrait-tag{ position:absolute; right:12px; bottom:12px; background:rgba(18,63,78,.72); color:#F5F1E9; font-size:.66rem; letter-spacing:.08em; text-transform:uppercase; padding:5px 10px; border-radius:2px; }

@media (min-width:640px){
  .profile-hero{ flex-direction:row; align-items:stretch; }
  .profile-portrait{ flex:0 0 48%; aspect-ratio:auto; }
  .profile-copy{ flex:1; padding:56px 40px; display:flex; flex-direction:column; justify-content:center; }
}

.section{ padding:36px 20px 6px; }
.section-head{ max-width:640px; margin:0 auto 22px; }
.section-head h2{ font-size:1.4rem; font-weight:600; color:var(--strong); }
.section-head h2 .tt-a, .section-head h2 .tt-b{ font-size:1.6rem; }
.section-head h2 .tt-b{ color:var(--accent); }
.section-head p{ margin-top:8px; color:var(--muted); font-size:.95rem; max-width:60ch; }

.section.dark{ background:var(--strong); padding-block:44px; }
.section.dark .eyebrow{ color:var(--accent-light); }
.section.dark .section-head h2 .tt-a{ color:#F5F1E9; }
.section.dark .section-head h2 .tt-b{ color:var(--accent-light); }
.section.dark .section-head p{ color:#C9D3D6; margin-bottom:0; }

.dark-cols{ max-width:960px; margin:0 auto; padding:0 20px; display:grid; grid-template-columns:1fr; gap:28px; }
@media (min-width:640px){ .dark-cols{ grid-template-columns:1fr 1fr; gap:48px; } }
.info-rows{ display:flex; flex-direction:column; }
.info-rows .row{ padding:14px 0; border-bottom:1px solid rgba(245,241,233,.18); }
.info-rows .row:first-child{ padding-top:0; }
.info-rows .k{ font-size:.7rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent-light); }
.info-rows .v{ margin-top:6px; font-size:.95rem; color:#EFE2D3; line-height:1.5; }

.services{ max-width:960px; margin:0 auto; display:grid; grid-template-columns:1fr; gap:32px; padding:0 20px; }
@media (min-width:640px){ .services{ grid-template-columns:repeat(3,1fr); gap:24px; } }
.service{ display:flex; flex-direction:column; gap:10px; }
.service .service-thumb{ aspect-ratio:4/3; background:var(--surface-2); overflow:hidden; }
.service .service-thumb img{ width:100%; height:100%; object-fit:cover; }
.service .service-index{ font-family:"Bodoni Moda"; font-weight:700; font-size:.85rem; color:var(--accent); margin-top:6px; }
.service .service-body{ display:flex; flex-direction:column; gap:8px; }
.service .service-body h3{ font-family:"Instrument Sans"; font-size:1.1rem; font-weight:700; color:var(--strong); }
.service .service-body p{ font-size:.9rem; line-height:1.5; color:var(--muted); }
.service .service-meta{ display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 24px; margin-top:6px; padding-top:12px; border-top:1px solid var(--line); }
.service .service-meta dt{ font-size:.68rem; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin:0; }
.service .service-meta dd{ font-size:.92rem; font-weight:600; color:var(--strong); margin:4px 0 0; }

.cta-section{ max-width:960px; margin:0 auto; padding:48px 20px 54px; display:flex; flex-direction:column; gap:22px; align-items:flex-start; }
.cta-section h2{ font-size:1.7rem; }
.cta-section p{ color:var(--muted); max-width:48ch; font-size:.95rem; line-height:1.5; }
.cta-button{ display:inline-flex; align-items:center; gap:8px; background:var(--strong); color:#F5F1E9; font-weight:700; font-size:.9rem; padding:13px 24px; border-radius:999px; text-decoration:none; white-space:nowrap; }
@media (min-width:640px){ .cta-section{ flex-direction:row; align-items:center; justify-content:space-between; gap:40px; } }

/* Profile alignment with the local profile-v1 reference. */
.profile-hero{ display:grid; grid-template-columns:1fr; }
.profile-copy{ display:flex; flex-direction:column; justify-content:center; padding:clamp(3rem,7vw,6rem) clamp(1.25rem,7vw,7rem); }
.profile-copy h1{ margin-top:.7rem; color:var(--strong); font-size:clamp(4rem,10vw,8rem); letter-spacing:-.1em; line-height:.8; }
.profile-copy h1 span{ display:block; font-family:var(--sans); font-weight:800; }
.profile-copy h1 em{ display:block; color:var(--accent); font-family:var(--serif); font-style:italic; font-weight:400; }
.profile-role{ margin-top:1.5rem; color:var(--strong); font-size:.75rem; font-weight:700; letter-spacing:.16em; text-transform:uppercase; }
.profile-intro{ max-width:31rem; margin-top:1.5rem; font-size:clamp(1rem,1.5vw,1.15rem); }
.profile-portrait{ position:relative; min-height:25rem; overflow:hidden; background:var(--surface-2); }
.profile-portrait img{ width:100%; height:100%; min-height:25rem; object-fit:cover; filter:saturate(.75); }
.portrait-tag{ position:absolute; right:1rem; bottom:1rem; padding:.25rem .45rem; background:rgba(18,63,78,.78); color:white; font-size:.62rem; letter-spacing:.08em; text-transform:uppercase; }

.services-section{ max-width:var(--content); margin:0 auto; padding:clamp(4rem,9vw,8rem) clamp(1.25rem,4vw,2.5rem); }
.services-intro{ display:grid; grid-template-columns:minmax(0,1fr); gap:.8rem; margin-bottom:3rem; }
.services-intro h2{ max-width:12ch; font-size:clamp(2.5rem,5vw,4.8rem); letter-spacing:-.08em; line-height:.88; }
.services-intro h2 span{ display:block; color:var(--strong); font-family:var(--sans); font-weight:800; }
.services-intro h2 em{ display:block; color:var(--accent); font-family:var(--serif); font-style:italic; font-weight:400; }
.services-intro > p:last-child{ max-width:31rem; margin-top:.6rem; }
.services-list{ display:grid; grid-template-columns:1fr; gap:3rem 1.5rem; }
.service{ display:grid; grid-template-columns:1fr; gap:.8rem; }
.service-image{ aspect-ratio:1.35 / 1; overflow:hidden; background:var(--surface-2); }
.service-image img{ width:100%; height:100%; object-fit:cover; filter:saturate(.7); transition:filter .35s ease,transform .35s ease; }
.service:hover .service-image img{ filter:saturate(1); transform:scale(1.03); }
.service-index{ color:var(--accent); font-family:var(--sans); font-size:.7rem; font-weight:700; letter-spacing:.12em; }
.service-content h3{ color:var(--strong); font-family:var(--sans); font-size:clamp(1.3rem,2vw,1.8rem); letter-spacing:-.06em; line-height:1; }
.service-content > p{ max-width:31ch; margin-top:.7rem; font-size:.9rem; }
.service dl{ display:flex; flex-wrap:wrap; gap:1rem 1.6rem; margin:1.25rem 0 0; padding-top:.8rem; border-top:1px solid var(--line); }
.service dl div{ min-width:4.4rem; }
.service dt{ color:var(--muted); font-size:.62rem; letter-spacing:.08em; text-transform:uppercase; }
.service dd{ margin:.15rem 0 0; color:var(--strong); font-size:.78rem; font-weight:700; }

.profile-dark{ display:grid; grid-template-columns:1fr; gap:3rem; padding:clamp(3.5rem,8vw,7rem) clamp(1.25rem,7vw,7rem); background:var(--strong); color:white; }
.profile-dark .eyebrow{ color:var(--accent-light); }
.dark-copy h2{ max-width:14ch; margin-top:.8rem; font-size:clamp(2.35rem,5vw,4.5rem); letter-spacing:-.08em; line-height:.9; }
.dark-copy h2 span{ display:block; font-family:var(--sans); font-weight:800; }
.dark-copy h2 em{ display:block; color:var(--accent-light); font-family:var(--serif); font-style:italic; font-weight:400; }
.dark-copy > p:last-child{ max-width:34rem; margin-top:1.5rem; color:rgba(255,255,255,.72); }
.info-list{ align-self:center; }
.info-list > div{ padding:1.25rem 0; border-top:1px solid rgba(245,241,233,.22); }
.info-list > div:last-child{ border-bottom:1px solid rgba(245,241,233,.22); }
.info-list span{ color:var(--accent-light); font-size:.68rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.info-list p{ margin-top:.4rem; color:rgba(255,255,255,.75); font-size:.9rem; }

.booking{ display:flex; align-items:end; justify-content:space-between; gap:2rem; max-width:var(--content); margin:0 auto; padding:clamp(4rem,8vw,7rem) clamp(1.25rem,4vw,2.5rem); }
.booking h2{ margin-top:.8rem; font-size:clamp(2.5rem,5vw,4.6rem); letter-spacing:-.08em; line-height:.88; }
.booking h2 span{ display:block; color:var(--strong); font-family:var(--sans); font-weight:800; }
.booking h2 em{ display:block; color:var(--accent); font-family:var(--serif); font-style:italic; font-weight:400; }
.booking > div > p:last-child{ max-width:30rem; margin-top:1.5rem; }
.booking-button{ display:inline-flex; align-items:center; gap:.9rem; padding:.9rem 1.3rem; border-radius:999px; background:var(--strong); color:white; font-size:.75rem; font-weight:700; text-decoration:none; white-space:nowrap; }
.booking-button span{ color:var(--accent-light); font-size:1rem; }
.booking-button:hover{ background:var(--accent); }

@media (min-width:700px){
  .profile-hero{ grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); }
  .profile-portrait,.profile-portrait img{ min-height:min(74vh,52rem); }
  .services-intro{ grid-template-columns:1fr .8fr; align-items:end; }
  .services-list{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .profile-dark{ grid-template-columns:1.1fr .9fr; align-items:center; }
}
@media (max-width:699px){ .booking{ align-items:start; flex-direction:column; } }
