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

:root {
  --stone:  #2c2825;
  --warm:   #c9a96e;
  --cream:  #f5f0e8;
  --light:  #fafaf8;
  --muted:  #7a7168;
  --white:  #ffffff;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--stone);
  background: var(--light);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(44,40,37,.95);
  backdrop-filter: blur(8px);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  color: var(--warm);
  font-size: 1.1rem;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active { color: var(--warm); border-bottom-color: var(--warm); }
.nav-links .btn-nav {
  background: var(--warm);
  color: var(--stone) !important;
  padding: .42rem 1.1rem;
  border-radius: 4px;
  font-weight: 600;
  border-bottom: none !important;
}
.nav-links .btn-nav:hover { background: #d4b07e; }

/* ── SELECTOR DE IDIOMA ── */
.lang-switch { position: relative; }
.lang-toggle {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: .28rem .6rem;
  cursor: pointer;
  color: rgba(255,255,255,.78);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.lang-toggle:hover { border-color: var(--warm); color: var(--warm); }
.lang-flag {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.lang-flag-es { background-image: linear-gradient(#aa151b 25%, #f1bf00 25% 75%, #aa151b 75%); }
.lang-flag-gl { background: #fff; background-image: linear-gradient(135deg, #fff 46%, #003399 46% 54%, #fff 54%); }
.lang-flag-pt { background-image: linear-gradient(90deg, #046a38 40%, #da291c 40%); }
/* Bandera real del Reino Unido (imagen, no dibujada a mano: a este tamaño
   las diagonales de la Union Jack no se distinguen bien con CSS). */
.lang-flag-en {
  background-image: url("https://cdn.jsdelivr.net/npm/twemoji@latest/2/svg/1f1ec-1f1e7.svg");
  background-color: transparent;
}
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  background: var(--stone);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .4rem;
  min-width: 160px;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: .1rem;
  z-index: 200;
}
.lang-menu.abierto { display: flex; }
.lang-opcion {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: none;
  border: none;
  padding: .5rem .6rem;
  border-radius: 5px;
  color: rgba(255,255,255,.78);
  font-size: .82rem;
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
}
.lang-opcion:hover { background: rgba(255,255,255,.06); color: var(--warm); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: .3s;
}

/* ── PAGE HERO (para páginas internas) ── */
.page-hero {
  padding-top: 64px;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20,16,12,.5), rgba(20,16,12,.72));
}
.page-hero-content {
  position: relative;
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.page-hero-content .label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: .5rem;
}
.page-hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--white);
  line-height: 1.15;
}
.page-hero-content p {
  color: rgba(255,255,255,.72);
  font-size: .95rem;
  margin-top: .6rem;
  max-width: 520px;
}

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section-pad { padding: 5rem 1.5rem; }

/* ── TYPOGRAPHY ── */
.section-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: .5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--stone);
  line-height: 1.2;
  margin-bottom: .8rem;
}
.section-lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.8;
}
.divider {
  width: 48px; height: 2px;
  background: var(--warm);
  margin: 1rem 0 1.4rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.7rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: .2s;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--warm); color: var(--stone); }
.btn-primary:hover { background: #d4b07e; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,169,110,.35); }
.btn-outline { background: transparent; color: var(--stone); border: 1.5px solid var(--stone); }
.btn-outline:hover { background: var(--stone); color: var(--white); transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.6); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,.1); transform: translateY(-1px); }

/* ── FOOTER ── */
.site-footer {
  background: #1f1a16;
  color: rgba(245,240,232,.7);
  padding: 4rem 1.5rem 0;
}
.site-footer a { text-decoration: none; }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-brand-img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1.3rem;
}
.footer-brand {
  display: block;
  font-family: 'Playfair Display', serif;
  color: var(--warm);
  font-size: 1.15rem;
  margin-bottom: .9rem;
}
.footer-desc {
  font-size: .85rem;
  line-height: 1.75;
  color: rgba(245,240,232,.55);
  max-width: 260px;
}
.footer-col h4 {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 1.2rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.footer-col a {
  color: rgba(245,240,232,.65);
  font-size: .86rem;
  transition: color .2s;
}
.footer-col a:hover { color: var(--warm); }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .86rem;
  color: rgba(245,240,232,.65);
  line-height: 1.6;
}
.footer-contact-item + .footer-contact-item { margin-top: .8rem; }
.footer-contact-item i[data-lucide] { color: var(--warm); flex-shrink: 0; margin-top: .15rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.4rem 0;
  text-align: center;
  font-size: .78rem;
  color: rgba(245,240,232,.4);
}

@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
}
@media (max-width: 560px) {
  .site-footer { padding-top: 3rem; }
  .footer-cols { grid-template-columns: 1fr; gap: 2.3rem; }
  .footer-bottom { padding-bottom: 4.5rem; } /* deja hueco para el botón flotante de WhatsApp */
}

/* ── RESPONSIVE NAV ── */
@media (max-width: 768px) {
  nav { overflow: visible; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    background: rgba(44,40,37,.97);
    padding: 2.5rem 2rem;
    align-items: flex-start;
    gap: 1.6rem;
    overflow-y: auto;
  }
  .nav-links.open a { font-size: .95rem; }
  .hamburger { display: flex; }
}

/* ── FLOATING WHATSAPP ── */
.wa-float {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  z-index: 200;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37,211,102,.45);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  animation: waPulse 2.5s 3s infinite;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.6);
  animation: none;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-tooltip {
  position: absolute;
  right: calc(100% + .8rem);
  top: 50%;
  transform: translateY(-50%);
  background: var(--stone);
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  padding: .4rem .8rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--stone);
}
.wa-float:hover .wa-tooltip { opacity: 1; }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(37,211,102,.45); }
  50%       { box-shadow: 0 4px 28px rgba(37,211,102,.75), 0 0 0 8px rgba(37,211,102,.12); }
}

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── LUCIDE ICONS ── */
i[data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}
.info-card .ic  { color: var(--warm); }
.info-box .ic   { color: var(--warm); }

/* ── LEGAL PAGES ── */
.legal-section { padding: 4.5rem 1.5rem 5.5rem; background: var(--light); }
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  color: var(--stone);
  font-size: .98rem;
  line-height: 1.85;
}
.legal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--stone);
  margin: 2.2rem 0 .9rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--stone);
  margin: 1.8rem 0 .7rem;
}
.legal-content p { margin-bottom: 1.1rem; color: var(--muted); }
.legal-content ul, .legal-content ol { margin: 0 0 1.1rem 1.3rem; color: var(--muted); }
.legal-content li { margin-bottom: .4rem; }
.legal-content a { color: var(--warm); text-decoration: underline; }
.legal-content a:hover { color: var(--stone); }
.legal-content strong { color: var(--stone); }

.sitemap-list {
  max-width: 760px;
  margin: 0 auto;
  columns: 2;
  gap: 3rem;
  list-style: none;
}
.sitemap-list li { margin-bottom: .9rem; break-inside: avoid; }
.sitemap-list a {
  color: var(--stone);
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: color .2s;
}
.sitemap-list a:hover { color: var(--warm); }
@media (max-width: 560px) {
  .sitemap-list { columns: 1; }
}

/* ── FUNDING BAND (Kit Digital / UE) ── */
.funding-band {
  background: var(--cream);
  padding: 2rem 1.5rem;
  border-top: 3px solid rgba(0,0,0,.06);
}
.funding-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.funding-tag {
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}
.funding-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}
.funding-logo-eu {
  height: 52px;
  width: auto;
  display: block;
}
.funding-logo-plan {
  height: 80px;
  width: auto;
  display: block;
}
@media (max-width: 600px) {
  .funding-logos           { gap: 2.5rem; }
  .funding-logo-eu         { height: 38px; }
  .funding-logo-plan       { height: 60px; }
}
