/* ================================================
   FUNDACIÓN NATANAEL · One-Page Stylesheet
   ================================================ */

/* ---------- Variables ---------- */
:root {
  --navy:       #1B2A4A;
  --navy-light: #243660;
  --gold:       #C4A44A;
  --gold-light: #D4B86A;
  --cream:      #F7F3EC;
  --cream-dark: #EDE6D8;
  --white:      #FFFFFF;
  --text:       #2D2D2D;
  --text-mid:   #555555;
  --text-light: #888888;
  --border:     #DDD6C8;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Lato', 'Helvetica Neue', Arial, sans-serif;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.18);

  --radius:     6px;
  --transition: 0.3s ease;

  --header-h:   74px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* ---------- Utility ---------- */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-divider {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.section-divider span {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section-description {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-mid);
  font-size: 1.05rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* ================================================
   HEADER / NAV
   ================================================ */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition);
}

#header.scrolled {
  background: var(--navy);
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-logo img {
  height: 54px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}

#header.scrolled .nav-logo img {
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, #0d1b33 0%, #1B2A4A 45%, #2a3d68 100%);
  overflow: hidden;
}

/* Texture overlay pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(196,164,74,0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(196,164,74,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Subtle decorative cross motif */
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(196,164,74,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,42,74,0.35);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  max-width: 780px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 20px;
}

.hero-text {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  transition: all var(--transition);
  animation: bounce 2s infinite;
}

.hero-scroll a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ================================================
   LA FUNDACIÓN
   ================================================ */
.fundacion {
  background: var(--cream);
}

.fundacion-intro {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.85;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
  color: var(--gold);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.card p {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Registro info bar */
.registro-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 28px 36px;
}

.registro-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}

.registro-item i {
  font-size: 1.2rem;
  color: var(--gold);
}

.registro-item div {
  display: flex;
  flex-direction: column;
}

.registro-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.registro-value {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

/* ================================================
   QUOTE BANNER
   ================================================ */
.quote-banner {
  background: var(--navy);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quote-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(196,164,74,0.08) 0%, transparent 70%);
}

.quote-banner blockquote {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

.quote-banner .fa-quote-left {
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.5;
  display: block;
  margin-bottom: 16px;
}

.quote-banner p {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 18px;
}

.quote-banner cite {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}

/* ================================================
   TIERRA SANTA
   ================================================ */
.tierra-santa {
  background: var(--white);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--cream-dark);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,42,74,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-overlay i {
  font-size: 1.8rem;
  color: var(--white);
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(196,164,74,0.4); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* ================================================
   COLABORA
   ================================================ */
.colabora {
  background: var(--cream);
}

.colabora-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 800px;
  margin: 0 auto;
}

.colabora-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
  transition: box-shadow var(--transition), transform var(--transition);
}

.colabora-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.colabora-icon {
  width: 64px;
  height: 64px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
  color: var(--navy);
}

.colabora-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.colabora-bank {
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 16px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.iban-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 14px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold);
  font-size: 1rem;
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.copy-btn:hover { color: var(--navy); transform: scale(1.15); }

.bizum-code {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
}

.bizum-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.colabora-card p {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.colabora-note {
  font-size: 0.78rem !important;
  color: var(--text-light) !important;
  font-style: italic;
}

/* ================================================
   CONTACTO
   ================================================ */
.contacto {
  background: var(--white);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 56px;
  align-items: start;
}

.contacto-info h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 28px;
}

.info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.info-item i {
  font-size: 1.1rem;
  color: var(--gold);
  margin-top: 3px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.info-item strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 4px;
}

.info-item p,
.info-item a {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-item a:hover { color: var(--gold); }

.info-logo {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.info-logo img {
  height: 90px;
  width: auto;
}

/* Form */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group label span { color: var(--gold); }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,164,74,0.15);
  background: var(--white);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #c0392b;
}

.form-error {
  display: none;
  font-size: 0.78rem;
  color: #c0392b;
  margin-top: 4px;
}

.form-group.has-error .form-error { display: block; }

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.form-success.show { display: flex; }

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img {
  height: 70px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-contact p {
  font-size: 0.88rem;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.6);
}

.footer-contact i { color: var(--gold); margin-top: 3px; flex-shrink: 0; }

.footer-contact a { color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-contact a:hover { color: var(--gold); }

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--gold); }

/* ================================================
   BACK TO TOP
   ================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* --- Tablet landscape --- */
@media (max-width: 900px) {
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand { grid-column: 1 / -1; }
}

/* --- Tablet portrait / mobile --- */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  /* Header: siempre sólido en móvil */
  #header {
    background: var(--navy);
    box-shadow: var(--shadow-md);
  }

  /* Logo en móvil */
  .nav-logo img { height: 44px; }

  /* Overlay oscuro detrás del menú abierto */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    animation: fadeIn 0.25s ease both;
  }
  .nav-overlay.open { display: block; }

  /* Menú desplegable */
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 4px 0 20px;
    /* Oculto por defecto encima de la pantalla */
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.32s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }

  .nav-links.open {
    transform: none;
    visibility: visible;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
  }

  /* Separador superior sutil */
  .nav-links::before {
    content: '';
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 20px 6px;
  }

  /* Links individuales */
  .nav-link {
    display: block;
    padding: 14px 28px;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: var(--gold);
    color: var(--gold);
  }

  .nav-link::after { display: none; }

  /* Hamburger visible */
  .nav-toggle { display: flex; }

  /* Hero */
  .hero { min-height: 100svh; }

  .hero-content { padding: 0 24px; }

  .hero-scroll { bottom: 20px; }

  /* Secciones */
  .section { padding: 56px 0; }

  .section-header { margin-bottom: 40px; }

  /* Cards ya en 1 col con auto-fit, pero forzamos min más pequeño */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Colabora */
  .colabora-grid {
    grid-template-columns: 1fr;
  }

  /* Quote banner */
  .quote-banner { padding: 44px 0; }

  /* Gallery: 2 columnas */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* Contacto: info-logo más pequeño */
  .info-logo img { height: 72px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer { padding: 44px 0 0; }

  .footer-brand p { max-width: 100%; }

  /* Botón volver arriba: sube por encima del banner de cookies */
  .back-to-top {
    bottom: 90px; /* evita solaparse con el banner */
    right: 16px;
  }
}

/* --- Móvil pequeño --- */
@media (max-width: 480px) {
  .section { padding: 48px 0; }

  .section-title { font-size: 1.7rem; }

  /* Hero */
  .hero-title  { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-text   { font-size: 0.9rem; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-actions .btn { text-align: center; justify-content: center; }

  /* Registro */
  .registro-info {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }

  /* Quote */
  .quote-banner p  { font-size: 1.25rem; }

  /* Gallery: 1 columna */
  .gallery {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Bizum código */
  .bizum-num { font-size: 1.8rem; }

  /* IBAN en móvil muy pequeño */
  .iban-box { font-size: 0.8rem; padding: 10px 12px; }

  /* Colabora card */
  .colabora-card { padding: 32px 20px; }

  /* Lightbox: flechas más pequeñas */
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  /* Footer bottom */
  .footer-bottom { font-size: 0.72rem; padding: 16px 0; }

  /* Back-to-top cuando cookie banner también está activo */
  .back-to-top { right: 12px; }
}

/* ================================================
   SHARED COOKIE BUTTONS
   ================================================ */
.btn-cookie {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-cookie--primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-cookie--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.btn-cookie--secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}

.btn-cookie--secondary:hover {
  border-color: var(--navy);
  background: var(--cream);
}

/* ================================================
   COOKIE BANNER
   ================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.22);
  padding: 18px 0;

  /* entrada */
  animation: bannerSlideUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

.cookie-banner[hidden] { display: none; }

@keyframes bannerSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: none;             opacity: 1; }
}

.cookie-banner__inner {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1 1 400px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cookie-banner__icon {
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-banner__text p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

.cookie-banner__link {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold-light);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.cookie-banner__link:hover { color: var(--gold); }

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Override secondary colors inside dark banner */
.cookie-banner .btn-cookie--secondary {
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.3);
}

.cookie-banner .btn-cookie--secondary:hover {
  color: var(--white);
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}

/* ================================================
   COOKIE MODAL
   ================================================ */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cookie-modal[hidden] { display: none; }

/* Backdrop */
.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,18,36,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Panel */
.cookie-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: panelUp 0.35s cubic-bezier(0.22,1,0.36,1) both;
  overflow: hidden;
}

@keyframes panelUp {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* Header */
.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
}

.cookie-modal__header h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-modal__header h2 i { color: var(--gold); }

.cookie-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.cookie-modal__close:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Body – scrollable */
.cookie-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 8px;
  scroll-behavior: smooth;
}

.cookie-modal__body::-webkit-scrollbar { width: 5px; }
.cookie-modal__body::-webkit-scrollbar-track { background: var(--cream); }
.cookie-modal__body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.cookie-modal__lead {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cookie-modal__body h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 26px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cm-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 700;
  flex-shrink: 0;
}

.cookie-modal__body p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 12px;
}

.cookie-modal__body a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.cookie-modal__body a:hover { color: var(--gold); }

/* Cookie table */
.cookie-table-wrap {
  overflow-x: auto;
  margin: 14px 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 480px;
}

.cookie-table thead {
  background: var(--navy);
  color: var(--white);
}

.cookie-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cookie-table tbody tr:nth-child(even) { background: var(--cream); }
.cookie-table tbody tr:hover           { background: var(--cream-dark); }

.cookie-table td {
  padding: 10px 14px;
  color: var(--text-mid);
  vertical-align: top;
  line-height: 1.55;
  border-bottom: 1px solid var(--border);
}

.cookie-table td:last-child { border-right: none; }
.cookie-table tr:last-child td { border-bottom: none; }

.cookie-table code {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  background: var(--cream-dark);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--navy);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge--green { background: #d4edda; color: #1e6b35; }
.badge--blue  { background: #d1e8f5; color: #0d4a6e; }

/* Note box */
.cookie-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbe6;
  border: 1px solid #ffe47a;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.85rem !important;
  color: #6b5200 !important;
  margin: 8px 0 0;
}

.cookie-note i { color: #c9a000; flex-shrink: 0; margin-top: 2px; }

/* Browser list */
.cookie-browser-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.cookie-browser-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cookie-browser-list i {
  width: 16px;
  color: var(--navy);
}

.cookie-browser-list a {
  font-size: 0.88rem;
  color: var(--navy);
}

/* Footer */
.cookie-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cookie-banner__actions {
    justify-content: stretch;
  }

  .cookie-banner__actions .btn-cookie {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .cookie-modal__panel {
    max-height: 95vh;
  }

  .cookie-modal__header,
  .cookie-modal__body,
  .cookie-modal__footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cookie-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-modal__footer .btn-cookie {
    width: 100%;
    text-align: center;
  }
}
