/* =========================================================
   Base / Reset
   ========================================================= */
:root {
  --color-primary: #7a4a1e;
  --color-primary-dark: #5c3714;
  --color-secondary: #2f6b3c;
  --color-accent: #e0a13a;
  --color-text: #26221d;
  --color-text-soft: #58524a;
  --color-bg: #fffdf9;
  --color-bg-alt: #f6efe3;
  --color-border: #e7ddcb;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(40, 30, 10, 0.12);
  --container-width: 1180px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { padding-left: 1.2rem; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .6em; color: var(--color-primary-dark); }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title { text-align: center; margin-bottom: 8px; }
.section-lead { text-align: center; max-width: 720px; margin: 0 auto 36px; color: var(--color-text-soft); }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--color-secondary); margin-bottom: .6em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 12px 26px; border-radius: 999px; border: 2px solid var(--color-primary);
  background: var(--color-primary); color: #fff; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-size: 1rem;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-accent { background: var(--color-accent); border-color: var(--color-accent); color: #26221d; }
.btn-accent:hover { filter: brightness(.92); }

/* =========================================================
   Header / navegación
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,253,249,.96);
  border-bottom: 1px solid var(--color-border);
}
/* Nota: no usar backdrop-filter/filter/transform aquí — convertiría este
   encabezado en el "containing block" del menú móvil (position: fixed),
   haciendo que el panel se colapse a un alto de 1px en vez de cubrir toda
   la pantalla. */
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo-btn {
  border: none; padding: 0; margin: 0; background: none; cursor: pointer; flex-shrink: 0;
  border-radius: 50%; line-height: 0; transition: transform .18s ease, box-shadow .18s ease;
}
.brand-logo-btn:hover, .brand-logo-btn:focus-visible { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.brand-logo-btn img, .brand .logo-fallback {
  width: 50px; height: 50px; border-radius: 50%; object-fit: contain; flex-shrink: 0;
  border: 2px solid var(--color-accent); background: #fff; padding: 4px; box-sizing: border-box;
}
.brand-text { display: block; min-width: 0; }
.brand-name, .brand-slogan {
  display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; color: var(--color-primary-dark); line-height: 1.15; }
.brand-slogan { font-size: .78rem; color: var(--color-text-soft); font-style: italic; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--color-primary-dark); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.main-nav a { padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--color-text); }
.main-nav a:hover, .main-nav a.active { background: var(--color-bg-alt); color: var(--color-primary-dark); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: 78px; right: 0; bottom: 0; left: 0; z-index: 99;
    background: var(--color-bg); border-top: 1px solid var(--color-border);
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease, visibility .2s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .main-nav ul { flex-direction: column; padding: 18px 20px; gap: 4px; }
  .main-nav a { display: block; padding: 14px 16px; }
}

/* =========================================================
   Hero + carrusel
   ========================================================= */
.hero { position: relative; background: linear-gradient(160deg, var(--color-bg-alt), var(--color-bg)); overflow: hidden; }
.hero-pattern {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: .35; pointer-events: none;
  background-image:
    linear-gradient(135deg, var(--color-accent) 25%, transparent 25.5%, transparent 74.5%, var(--color-accent) 75%),
    linear-gradient(45deg, var(--color-accent) 25%, transparent 25.5%, transparent 74.5%, var(--color-accent) 75%);
  background-size: 46px 46px;
  background-position: 0 0, 23px 23px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%);
}
.hero .container { position: relative; padding-top: 54px; padding-bottom: 54px; }
.hero-slogan { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--color-secondary); font-weight: 600; font-style: italic; margin-bottom: .4em; }
.hero-lead { max-width: 640px; color: var(--color-text-soft); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #10100e; }
.carousel-track { display: flex; transition: transform .5s ease; touch-action: pan-y; }
.carousel-slide { position: relative; min-width: 100%; aspect-ratio: 16/9; background: #10100e; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-slide .embed-wrap { position: relative; width: 100%; height: 100%; }
.carousel-slide iframe, .carousel-slide video { width: 100%; height: 100%; object-fit: cover; border: 0; }
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 20px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,.78), rgba(0,0,0,0));
  color: #fff;
}
.carousel-caption h3 { color: #fff; margin-bottom: .2em; font-size: 1.15rem; }
.carousel-caption p { margin: 0; font-size: .92rem; color: #f1ede4; max-width: 620px; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(0,0,0,.45); border: none; color: #fff; width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.carousel-btn:hover { background: rgba(0,0,0,.7); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--color-border); cursor: pointer; padding: 0; }
.carousel-dots button.active { background: var(--color-primary); }
.carousel-empty { padding: 60px 20px; text-align: center; color: var(--color-text-soft); }

/* =========================================================
   Tarjetas: equipo, galería, objetivos
   ========================================================= */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4/3; background: var(--color-bg-alt); position: relative; overflow: hidden; cursor: pointer; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card-media:hover img { transform: scale(1.05); }
.card-media .play-badge {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25);
}
.card-media .play-badge span {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--color-primary);
}
.card-body { padding: 18px 20px; }
.card-body h3 { margin-bottom: .3em; }
.card-date { font-size: .78rem; color: var(--color-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4em; display: block; }
.card-body p { color: var(--color-text-soft); margin: 0; font-size: .95rem; }

.team-card { text-align: center; padding: 26px 18px; }
.team-photo { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid var(--color-accent); }
.team-role { color: var(--color-secondary); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5em; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--color-text-soft); background: var(--color-bg-alt); border-radius: var(--radius); }

/* =========================================================
   Contacto / formulario
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0 0 20px; }
.info-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--color-border); }
.info-list li:last-child { border-bottom: none; }
.info-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--color-bg-alt); display: flex; align-items: center; justify-content: center; color: var(--color-primary); font-weight: 700; }
.social-links { display: flex; gap: 10px; margin-top: 8px; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--color-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--color-primary); line-height: 0; }
.social-links a svg { display: block; }
.social-links a:hover { background: var(--color-primary); color: #fff; }
.map-embed { border-radius: var(--radius); overflow: hidden; margin-top: 20px; box-shadow: var(--shadow); }
.map-embed iframe { width: 100%; height: 280px; border: 0; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-control {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--color-text);
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(122,74,30,.15); }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.form-alert.success { background: #e4f4e6; color: #256b34; }
.form-alert.error { background: #fbe6e2; color: #a3341c; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: #201a12; color: #e9e2d4; padding: 44px 0 20px; margin-top: 50px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid a { color: #cfc4ae; display: block; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; font-size: .82rem; color: #a99f8c; text-align: center; }
.footer-bottom a { color: #e0a13a; }

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 200; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 1.6rem;
}
.whatsapp-float:hover { filter: brightness(1.05); }

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 300; background: rgba(10,8,5,.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-content { max-width: 900px; width: 100%; transform: scale(.9); transition: transform .25s ease; }
.lightbox.open .lightbox-content { transform: scale(1); }
.lightbox-media {
  width: 100%; background: #000; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* Las imágenes se muestran a su tamaño real (nunca se agrandan más allá de su
   resolución original, para evitar que se vean pixeladas); solo se reducen si
   no caben en la pantalla. */
.lightbox-media img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 80vh;
}
/* Los videos (embed/archivo) sí necesitan una caja con proporción fija. */
.lightbox-media iframe, .lightbox-media video {
  width: 100%; aspect-ratio: 16/9; height: auto; border: 0; display: block;
}
.lightbox-info { color: #f1ede4; padding-top: 14px; }
.lightbox-info h3 { color: #fff; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 2rem;
  cursor: pointer; line-height: 1;
}

/* Página fría (breadcrumb/encabezado simple para páginas internas) */
.page-hero { padding: 44px 0 30px; background: var(--color-bg-alt); text-align: center; }
.page-hero h1 { margin-bottom: 6px; }
.page-hero p { color: var(--color-text-soft); margin: 0; }
