/* ============================================================
   Maditerránea — Sistema de diseño
   Paleta derivada del logo MAD. Tipografías: Poppins + Inter.
   ============================================================ */

:root {
  /* Marca */
  --mad-yellow: #F7CF4B;
  --mad-magenta: #C82A7D;
  --mad-turquoise: #3BCAD2;
  --mad-magenta-dark: #A81F68;
  --mad-turquoise-dark: #17A0A8;

  /* Neutros */
  --ink: #191A1E;
  --ink-soft: #3D3F46;
  --muted: #6A6D75;
  --line: #E9E7E1;
  --bg: #FFFFFF;
  --bg-soft: #FAF8F3;
  --bg-ink: #16171B;

  /* Sistema */
  --container: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20,20,25,.05), 0 4px 16px rgba(20,20,25,.05);
  --shadow-md: 0 8px 32px rgba(20,20,25,.10);
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
p { margin: 0 0 1rem; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 650; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--soft { background: var(--bg-soft); }
.section--ink { background: var(--bg-ink); color: #fff; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: rgba(255,255,255,.72); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.measure { max-width: 62ch; }
.measure-narrow { max-width: 48ch; }
.center.measure, .center .measure { margin-inline: auto; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head); font-weight: 600;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mad-magenta); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--mad-magenta); border-radius: 2px; }
.section--ink .eyebrow { color: var(--mad-yellow); }
.section--ink .eyebrow::before { background: var(--mad-yellow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .85em 1.5em; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--mad-magenta); color: #fff; box-shadow: 0 6px 20px rgba(200,42,125,.28); }
.btn-primary:hover { background: var(--mad-magenta-dark); box-shadow: 0 10px 28px rgba(200,42,125,.34); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.section--ink .btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.section--ink .btn-ghost:hover { border-color: #fff; }
.btn-lg { padding: 1em 1.8em; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.brand img { height: 26px; width: auto; }
.brand .wordmark { font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  padding: .5em .8em; border-radius: var(--radius-pill); color: var(--ink-soft);
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.is-active { color: var(--mad-magenta); }
.nav-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switch { display: flex; align-items: center; gap: .15rem; font-family: var(--font-head); font-weight: 600; font-size: .85rem; }
.lang-switch a { padding: .3em .5em; border-radius: 8px; color: var(--muted); }
.lang-switch a.is-active { color: var(--ink); background: var(--bg-soft); }
.lang-switch span { color: var(--line); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4em; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(60px, 8vw, 108px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 .accent-m { color: var(--mad-turquoise); }
.hero h1 .accent-a { color: var(--mad-magenta); }
.hero h1 .accent-d { color: var(--mad-yellow); }
.hero-lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-art { position: relative; aspect-ratio: 1/1; }
.hero-photo { position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); background: var(--bg-soft); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero-caption {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: #fff;
  background: rgba(20,20,25,.55); backdrop-filter: blur(6px);
  padding: .5em .9em; border-radius: var(--radius-pill);
}
.hero-dot { position: absolute; border-radius: 50%; z-index: 3; }
.hero-dot--magenta { width: 30px; height: 30px; background: var(--mad-magenta); top: -12px; right: 40px; box-shadow: 0 6px 16px rgba(200,42,125,.35); }
.hero-dot--turquoise { width: 18px; height: 18px; background: var(--mad-turquoise); bottom: 30px; right: -9px; }

/* Geometric MAD motif (echoes the logo) */
.mad-motif { position: relative; width: 100%; height: 100%; }
.mad-motif .shape { position: absolute; border-radius: 6px; }
.shape-tri { width: 0; height: 0; background: transparent !important; border-style: solid; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { text-align: center; padding: 8px; }
.stat .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.03em; }
.stat:nth-child(1) .num { color: #159AA1; }
.stat:nth-child(2) .num { color: var(--mad-magenta); }
.stat:nth-child(3) .num { color: #B0850C; }
.section--ink .stat:nth-child(1) .num { color: var(--mad-turquoise); }
.section--ink .stat:nth-child(3) .num { color: var(--mad-yellow); }
.stat .label { font-family: var(--font-head); font-weight: 500; color: var(--muted); margin-top: .4rem; font-size: .95rem; }
.section--ink .stat .label { color: rgba(255,255,255,.6); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* Audience CTA cards */
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.aud-card {
  border-radius: var(--radius); padding: 30px 28px; color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: 260px;
}
.aud-card h3 { color: #fff; }
.aud-card p { color: rgba(255,255,255,.85); font-size: .95rem; flex: 1; }
.aud-card .aud-link { font-family: var(--font-head); font-weight: 600; display: inline-flex; align-items: center; gap: .4em; margin-top: 8px; }
.aud-card .aud-link .arrow { transition: transform .2s var(--ease); }
.aud-card:hover .aud-link .arrow { transform: translateX(4px); }
.aud--fund { background: linear-gradient(150deg, #1C9AA1, #0E767C); }
.aud--youth { background: linear-gradient(150deg, var(--mad-magenta), var(--mad-magenta-dark)); }
.aud--partner { background: linear-gradient(150deg, #F7CF4B, #EBBE2E); }
.aud--partner h3, .aud--partner .aud-link { color: var(--ink); }
.aud--partner p { color: rgba(25,26,30,.82); }
.aud--partner .aud-tag { color: rgba(25,26,30,.7); }
.aud-tag { font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: 12px; }

/* ---------- Project cards ---------- */
.project { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project .thumb { aspect-ratio: 16/10; position: relative; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; }
.project .body { padding: 22px 24px 26px; }
.project .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag { font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .04em; padding: .35em .7em; border-radius: var(--radius-pill); background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.project h3 { margin-bottom: .3em; }
.project .body p { color: var(--muted); font-size: .95rem; margin: 0; }
.project .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.project .thumb > span { position: relative; z-index: 2; text-align: center; padding: 0 12px; text-shadow: 0 2px 16px rgba(0,0,0,.55); }
.project .thumb.has-img::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.52)); }

/* ---------- Quote band ---------- */
.quote { max-width: 46ch; margin-inline: auto; text-align: center; }
.quote blockquote { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.32; letter-spacing: -.01em; margin: 0 0 .6em; }
.quote .mark { color: var(--mad-magenta); font-size: 2.6rem; line-height: 0; font-family: Georgia, serif; }
.quote cite { font-style: normal; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--muted); }
.section--ink .quote blockquote { color: #fff; }
.section--ink .quote cite { color: rgba(255,255,255,.6); }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding-block: clamp(48px, 6vw, 84px) clamp(24px, 3vw, 40px); }
.page-hero h1 { max-width: 16ch; }
.page-hero .hero-lead { max-width: 58ch; font-size: 1.15rem; }

/* ---------- Two-column ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--text { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Pull quote ---------- */
.pullquote { border-left: 3px solid var(--mad-magenta); padding: 4px 0 4px 22px; font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; color: var(--ink); line-height: 1.4; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media (max-width:860px){ .team { grid-template-columns: 1fr; max-width: 380px; margin-inline:auto; } }
.member { text-align: center; }
.avatar { width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: #fff; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member h3 { margin-bottom: .1em; }
.member .role { font-family: var(--font-head); font-weight: 600; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mad-magenta); margin-bottom: .7em; }
.member p { font-size: .95rem; color: var(--muted); }

/* ---------- Sede cards ---------- */
.sede { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; position: relative; overflow: hidden; }
.sede::before { content:""; position:absolute; top:0; left:0; width:100%; height:5px; }
.sede--mallorca::before { background: var(--mad-turquoise); }
.sede--toledo::before { background: var(--mad-magenta); }
.sede h3 { margin-bottom: .1em; }
.sede .sede-loc { font-family: var(--font-head); font-weight:600; color: var(--muted); font-size:.9rem; margin-bottom:16px; }
.sede dl { margin:0; display:grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size:.92rem; }
.sede dt { color: var(--muted); }
.sede dd { margin:0; color: var(--ink-soft); }

/* ---------- Feature rows (proyectos propios) ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature + .feature { margin-top: clamp(48px, 7vw, 96px); }
.feature.reverse .feature-media { order: 2; }
.feature-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; position: relative; box-shadow: var(--shadow-sm); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-panel { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; color: #fff; padding: 32px; }
.feature-panel .fp-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; }
.feature-panel .fp-sub { font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .9; margin-top: 10px; }
.feature-badge { display:inline-flex; align-items:center; gap:.5em; font-family:var(--font-head); font-weight:600; font-size:.74rem; letter-spacing:.1em; text-transform:uppercase; color:var(--mad-magenta); margin-bottom:14px; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom:.35em; }
.feature .meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.feature ul.facts { list-style:none; padding:0; margin:16px 0 0; display:grid; gap:8px; }
.feature ul.facts li { position:relative; padding-left:24px; font-size:.95rem; color:var(--ink-soft); }
.feature ul.facts li::before { content:""; position:absolute; left:4px; top:9px; width:8px; height:8px; border-radius:50%; background:var(--mad-turquoise); }
@media (max-width: 860px){ .feature { grid-template-columns: 1fr; } .feature.reverse .feature-media { order: 0; } }

/* ---------- Proyectos socios ---------- */
.partners { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:12px; }
.partner { display:flex; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:var(--radius-sm); background:#fff; font-size:.9rem; }
.partner .flag { font-size:1.3rem; line-height:1; flex:none; }
.partner .pn { font-family:var(--font-head); font-weight:600; color:var(--ink); display:block; line-height:1.2; }
.partner .pl { color:var(--muted); font-size:.82rem; }

/* ---------- Coming soon ---------- */
.soon { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; background: var(--bg-soft); }
.soon .pill { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mad-turquoise-dark); background: rgba(59,202,210,.14); padding: .4em .9em; border-radius: var(--radius-pill); margin-bottom: 14px; }

/* ---------- Galería ---------- */
.gallery { columns: 3; column-gap: 16px; }
.gallery .shot { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius-sm); overflow: hidden; position: relative; box-shadow: var(--shadow-sm); }
.gallery .shot img { width: 100%; height: auto; display: block; transition: transform .5s var(--ease); }
.gallery .shot:hover img { transform: scale(1.04); }
/* Vídeo destacado en galería (YouTube Short, vertical) */
.gallery-video { margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.gallery-video .video-frame { position: relative; width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #16171B; flex: 0 0 auto; }
.gallery-video .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-video .ig-embed { flex: 0 0 auto; width: 100%; max-width: 340px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #fff; }
.gallery-video .ig-embed iframe { display: block; width: 100%; height: 620px; border: 0; }
.gallery-video .video-note { flex: 1 1 240px; min-width: 240px; }
.gallery-video .video-note h3 { margin: 0 0 .35em; }
.gallery-video .video-note p { color: var(--muted); margin: 0; max-width: 46ch; }
.video-soon { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; margin: 0 0 22px; border: 1px dashed var(--line); border-radius: var(--radius-pill); color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.gallery-filter { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-bottom:36px; }
.gallery-filter button {
  font-family:var(--font-head); font-weight:600; font-size:.9rem; cursor:pointer;
  padding:.5em 1.1em; border-radius:var(--radius-pill); border:1.5px solid var(--line);
  background:#fff; color:var(--ink-soft); transition:all .18s;
}
.gallery-filter button:hover { border-color:var(--ink); }
.gallery-filter button.is-active { background:var(--mad-magenta); border-color:var(--mad-magenta); color:#fff; }
@media (max-width: 900px){ .gallery { columns: 2; } }
@media (max-width: 560px){ .gallery { columns: 1; } }
.gallery-group { margin-bottom: 46px; scroll-margin-top: 92px; }
.gallery-group:last-child { margin-bottom: 0; }
.gallery-group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.gallery-group-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.gallery-group-head span { color: var(--muted); font-weight: 500; }
.feature-media > a { display: block; width: 100%; height: 100%; }
.feature-media > a img { transition: transform .5s var(--ease); }
.feature-media > a:hover img { transform: scale(1.04); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-ink); color: rgba(255,255,255,.72); padding-block: 64px 32px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { height: 28px; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .95rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-head); font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; font-size: .95rem; }
.legal-entity { font-size: .84rem; color: rgba(255,255,255,.55); line-height: 1.5; }
.legal-entity strong { color: rgba(255,255,255,.85); font-weight: 600; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 24px; font-size: .84rem; color: rgba(255,255,255,.5); }
.eu-note { display: flex; align-items: center; gap: 12px; max-width: 52ch; }
.eu-flag { flex: none; width: 46px; height: 31px; border-radius: 3px; display: block; }
.social { display: flex; gap: 10px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.social a:hover { background: var(--mad-magenta); border-color: var(--mad-magenta); }
.social svg { width: 18px; height: 18px; }

/* ---------- Formulario ---------- */
.form-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:clamp(24px,4vw,40px); box-shadow:var(--shadow-sm); }
.field { margin-bottom:18px; }
.field label { display:block; font-family:var(--font-head); font-weight:600; font-size:.88rem; margin-bottom:6px; color:var(--ink); }
.field input, .field textarea, .field select {
  width:100%; font-family:var(--font-body); font-size:1rem; color:var(--ink);
  padding:.8em 1em; border:1.5px solid var(--line); border-radius:var(--radius-sm);
  background:var(--bg-soft); transition:border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline:none; border-color:var(--mad-magenta); background:#fff; box-shadow:0 0 0 4px rgba(200,42,125,.12);
}
.field textarea { resize:vertical; min-height:130px; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.form-note { font-size:.82rem; color:var(--muted); margin-top:4px; }
.form-alert { padding:14px 18px; border-radius:var(--radius-sm); margin-bottom:20px; font-size:.95rem; font-family:var(--font-body); display:none; }
.form-alert.show { display:block; }
.form-alert.ok { background:rgba(59,202,210,.14); color:var(--mad-turquoise-dark); border:1px solid rgba(59,202,210,.4); }
.form-alert.err { background:rgba(200,42,125,.10); color:var(--mad-magenta-dark); border:1px solid rgba(200,42,125,.35); }

.contact-info { display:grid; gap:18px; align-content:start; }
.info-card { border:1px solid var(--line); border-radius:var(--radius); padding:24px; position:relative; overflow:hidden; }
.info-card::before { content:""; position:absolute; top:0; left:0; width:5px; height:100%; }
.info-card.mallorca::before { background:var(--mad-turquoise); }
.info-card.toledo::before { background:var(--mad-magenta); }
.info-card h3 { margin-bottom:.1em; }
.info-card .info-loc { font-family:var(--font-head); font-weight:600; color:var(--muted); font-size:.85rem; margin-bottom:12px; }
.info-card a { color:var(--mad-magenta); font-weight:600; }
.info-card .small { font-size:.86rem; color:var(--muted); line-height:1.5; }

/* ---------- Reveal on scroll ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { aspect-ratio: 4 / 3; max-width: 480px; margin: 12px auto 0; }
  .grid-3, .stats, .audience { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .nav { gap: .75rem; }
  .brand { min-width: 0; }
  .brand .wordmark { white-space: nowrap; }
  .nav-actions { gap: .5rem; flex-shrink: 0; }
  .lang-switch { flex-shrink: 0; }
  .nav-actions .btn-primary { display: none; } /* Colabora: en móvil está en el menú (Contacto) */
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 74px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 16px 24px; gap: .2rem;
    z-index: 60;
  }
  .nav.is-open .nav-links a { width: 100%; }
}
@media (max-width: 400px) {
  .brand img { height: 24px; }
  .brand .wordmark { font-size: 1.05rem; }
  .lang-switch { font-size: .8rem; }
  .lang-switch a { padding: .3em .35em; }
}
@media (min-width: 620px) and (max-width: 900px) {
  .stats { grid-template-columns: repeat(3,1fr); }
  .audience { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .project:hover { transform: none; }
}

/* ---------- Vídeo: carga bajo demanda (fachada) ---------- */
.video-frame .video-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: #16171B; color: #fff; border: 0; cursor: pointer; text-align: center; padding: 20px;
  font-family: var(--font-head);
}
.video-frame .vp-icon { width: 56px; height: 56px; border-radius: 999px; background: var(--mad-magenta); display: grid; place-items: center; transition: transform .2s var(--ease); }
.video-frame .vp-icon svg { width: 26px; height: 26px; margin-left: 3px; }
.video-frame .video-play:hover .vp-icon { transform: scale(1.07); }
.video-frame .vp-text { font-weight: 600; font-size: .95rem; }
.video-frame .vp-text small { display: block; font-weight: 400; font-size: .78rem; color: rgba(255,255,255,.7); margin-top: 4px; font-family: var(--font-body); }

/* ---------- Aviso de cookies ---------- */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 660px; margin-inline: auto;
  background: #16171B; color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
}
.cookie-bar p { margin: 0; font-size: .9rem; flex: 1 1 260px; line-height: 1.5; color: rgba(255,255,255,.9); }
.cookie-bar a { color: var(--mad-yellow); font-weight: 600; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.cookie-bar .btn-sm { padding: .55em 1.1em; font-size: .88rem; }
.cookie-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); background: transparent; }
.cookie-bar .btn-ghost:hover { background: rgba(255,255,255,.12); }
@media (max-width: 480px) {
  .cookie-actions { width: 100%; }
  .cookie-bar .btn-sm { flex: 1; text-align: center; }
}

/* ---------- Rotador (hero + reseñas) ---------- */
.rotator-slide { transition: opacity .8s var(--ease); }
/* Hero carrusel */
.hero-photo { display: block; cursor: pointer; }
.hero-photo .rotator-slide { position: absolute; inset: 0; opacity: 0; }
.hero-photo .rotator-slide.is-active { opacity: 1; }
.hero-photo .rotator-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(20,20,25,.14), transparent 42%, rgba(20,20,25,.5)); }
.hero-photo .hero-caption { z-index: 2; }
.hero-photo .hero-see {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: .35em;
  font-family: var(--font-head); font-weight: 600; font-size: .78rem; color: #16171B;
  background: rgba(255,255,255,.92); padding: .5em .9em; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease);
}
.hero-photo:hover .hero-see { transform: translateY(-1px); }
.hero-photo:focus-visible { outline: 3px solid var(--mad-magenta); outline-offset: 3px; }

/* Reseñas rotativas */
.reviews { position: relative; max-width: 54ch; margin-inline: auto; text-align: center; }
.reviews-slides { position: relative; }
.reviews .rotator-slide { position: absolute; inset: 0; opacity: 0; display: flex; flex-direction: column; justify-content: center; margin: 0; }
.reviews .rotator-slide.is-active { position: relative; opacity: 1; }
.reviews blockquote { margin: 0; }
.reviews .rev-text { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.35rem, 2.8vw, 1.95rem); line-height: 1.34; letter-spacing: -.01em; color: #fff; margin: 0 0 .7em; }
.reviews .rev-text::before { content: "\201C"; color: var(--mad-magenta); }
.reviews .rev-text::after { content: "\201D"; color: var(--mad-magenta); }
.reviews cite { font-style: normal; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: rgba(255,255,255,.62); }
.reviews-nav { display: flex; justify-content: center; gap: 14px; margin-top: 26px; }
.rev-arrow {
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25);
  font-size: 1.5rem; line-height: 1; display: grid; place-items: center; transition: background .2s var(--ease);
}
.rev-arrow:hover { background: rgba(255,255,255,.22); }

/* ---------- Lightbox de galería ---------- */
.gallery .shot img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(10,10,12,.93); padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox .lb-stage { margin: 0; max-width: 92vw; max-height: 88vh; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-btn { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer; border-radius: 999px; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 1.7rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
@media (max-width: 560px) { .lb-nav { width: 44px; height: 44px; font-size: 1.6rem; } .lb-prev { left: 8px; } .lb-next { right: 8px; } }

/* ---------- Tarjetas de reseña ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius); padding: 26px 24px; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.review-card .r-stars { color: var(--mad-yellow); letter-spacing: 2px; font-size: .95rem; }
.review-card blockquote {
  margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 1.06rem; line-height: 1.5; color: #fff;
}
.review-card blockquote::before { content: "\201C"; }
.review-card blockquote::after { content: "\201D"; }
.review-card figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.review-card .r-name { font-family: var(--font-head); font-weight: 700; color: #fff; }
.review-card .r-meta { font-size: .85rem; color: rgba(255,255,255,.6); }
@media (max-width: 860px) { .review-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }

/* ---------- Mapa Europa (red) ---------- */
.map-layout { display: flex; gap: clamp(28px, 4vw, 60px); align-items: center; }
.map-stage { position: relative; flex: 1 1 60%; min-width: 0; }
.map-side { flex: 1 1 clamp(220px, 30%, 300px); }

.euromap { width: 100%; height: auto; display: block; overflow: hidden; }
.map-base path { fill: #E4E0D6; stroke: var(--bg-soft); stroke-width: .35; stroke-linejoin: round; transition: fill .2s var(--ease); }
.map-base .is-active path { fill: var(--mad-turquoise); }
.map-base .is-home path { fill: var(--mad-magenta); }
.map-base .cc.is-lit path { fill: var(--mad-yellow); }

.map-pins .pin { cursor: pointer; outline: none; }
.pin-dot { fill: var(--mad-magenta); stroke: #fff; stroke-width: .55; transition: transform .18s var(--ease), fill .18s var(--ease); transform-box: fill-box; transform-origin: center; }
.pin-home .pin-dot { fill: var(--mad-yellow); stroke: var(--mad-magenta); stroke-width: .7; }
.pin:hover .pin-dot, .pin:focus-visible .pin-dot { fill: var(--mad-yellow); transform: scale(1.4); }
.pin-home:hover .pin-dot, .pin-home:focus-visible .pin-dot { fill: #fff; }
.pin:focus-visible .pin-dot { stroke: var(--ink); stroke-width: .8; }
.pin.is-open .pin-dot { fill: var(--mad-yellow); transform: scale(1.5); }
.pin-home.is-open .pin-dot { fill: #fff; }

.map-pop { position: absolute; z-index: 5; width: min(260px, 78vw); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 14px 16px 16px; transform: translate(-50%, calc(-100% - 14px)); pointer-events: auto; }
.map-pop::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.map-pop-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.map-pop-close:hover { color: var(--ink); }
.map-pop-title { font-size: 1.05rem; margin: 0 24px .5em 0; color: var(--ink); }
.map-pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.map-pop-list li { position: relative; padding-left: 16px; font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }
.map-pop-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--mad-turquoise); }
.map-pop-list li.is-partner::before { background: var(--mad-magenta); }

.stats--side { grid-template-columns: 1fr; gap: 0; }
.stats--side .stat { display: flex; align-items: center; gap: 16px; text-align: left; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.stats--side .stat:last-child { border-bottom: 0; }
.stats--side .stat .num { font-size: clamp(2.1rem, 4vw, 3rem); min-width: 2.9em; text-align: left; flex: none; }
.stats--side .stat .label { margin-top: 0; font-size: 1.02rem; color: var(--ink-soft); }
.stats-note { font-size: .82rem; color: var(--muted); margin: 10px 2px 20px; line-height: 1.4; }

.map-legend { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: .9rem; color: var(--ink-soft); }
.map-legend li { display: flex; align-items: center; gap: 10px; }
.lg-dot { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.lg-home { background: var(--mad-yellow); border-color: var(--mad-magenta); }
.lg-active { background: var(--mad-magenta); }
.map-credit { text-align: center; font-size: .74rem; color: var(--muted); margin: 22px 0 0; }
.map-credit em { font-style: normal; font-weight: 600; }

@media (max-width: 820px) {
  .map-layout { flex-direction: column; gap: 24px; }
  .map-stage, .map-side { flex: 1 1 auto; width: 100%; }
  .map-side { max-width: 460px; margin-inline: auto; }
}
/* Líneas de conexión desde la base (España) */
.map-links path { fill: none; stroke: var(--mad-magenta); stroke-width: .4; opacity: .2; stroke-linecap: round; }
html.js .map-links path { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.js .map-layout.is-in .map-links path { stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ease); transition-delay: calc(var(--i, 0) * .05s); }
.map-links path.is-hl { opacity: .8; stroke-width: .75; }

/* Área de toque ampliada + halo de la base */
.pin-hit { fill: transparent; }
.pin-pulse { fill: none; stroke: var(--mad-yellow); stroke-width: .6; transform-box: fill-box; transform-origin: center; animation: madpulse 2.6s var(--ease) infinite; }
@keyframes madpulse { 0% { transform: scale(1); opacity: .75; } 70% { transform: scale(2.6); opacity: 0; } 100% { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .pin-dot, .map-base path { transition: none; }
  .pin:hover .pin-dot, .pin.is-open .pin-dot { transform: none; }
  .pin-pulse { animation: none; opacity: 0; }
  html.js .map-links path { stroke-dashoffset: 0; transition: none; }
}
