/* =========================
   1) VARIABLES (PALETA NUEVA)
   ========================= */
:root{
  /* Paleta */
  --blue-900: #003878;
  --blue-800: #004aad;
  --blue-700: #0671b6;
  --blue-500: #2079bd;
  --blue-400: #5189ad;
  --blue-300: #19abef;

  --cyan-300: #5de0e6;
  --gold-500: #edab20;
  --white: #ffffff;

  /* Roles */
  --bg: var(--white);
  --text: #0b1b2a;

  --primary: var(--blue-800);
  --primary-dark: var(--blue-900);
  --primary-mid: var(--blue-700);

  --accent: var(--gold-500);
  --accent-2: var(--cyan-300);
  --hover: var(--blue-300);

  /* Gradientes */
  --grad-header: linear-gradient(to bottom, var(--primary-dark), var(--primary), var(--primary-mid), var(--primary-dark));
  --grad-menu: linear-gradient(to bottom, var(--primary), var(--blue-500));
  --grad-dropdown: linear-gradient(to bottom, var(--primary), var(--blue-500));

  /* Sombras */
  --shadow-soft: 0 4px 8px rgba(0,0,0,0.2);
  --shadow-strong: 5px 5px 10px rgba(0,0,0,0.3);

  /* Cards */
  --card-w: 300px;
  --card-radius: 5%;
  --card-img-h: 200px;

  /* Alturas barras */
  --topbar-height: 48px;
  --navbar-height: 90px;
}

/* Reducir navbar en móvil */
@media (max-width: 767px){
  :root{ --navbar-height: 70px; }
}

/* Util */
.text-accent{ color: var(--accent) !important; }

/* =========================
   2) TOPBAR (SEPH)
   ========================= */
.topbar-bg{
  background: var(--primary);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
}
.topbar-pad{ padding: 0; margin: 0; }
.topbar-link{
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  text-decoration: none !important;
}

/* =========================
   3) BASE / CURSORES
   ========================= */
*{
  font-family: 'poppins';
  cursor: url("cr.png"), auto;
  box-sizing: border-box;
}
a, .btn, button{
  cursor: url("cr_o.png"), auto;
  text-decoration: none;
}
body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}
img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}
h1{
  text-shadow: 1px 1px 2px rgba(0,0,0,.25);
}

/* =========================
   4) BOTONES (BASE + VARIANTES)
   ========================= */
.btn{
  padding: 0.5em 2em;
  border-radius: 2em;
  box-shadow: 5px 5px 5px rgba(0,0,0,0.10);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
  display: inline-block;
}

/* Botón estilo “favorito” (login) */
.btn_favorite{
  border-bottom: 1px solid rgba(255,255,255,.2);
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
  text-transform: uppercase;
  color: var(--white) !important;
  font-weight: bold;
  border-radius: 5px;
  padding: 10px 20px;
  margin: 0 3px;
  position: relative;
  display: inline-block;
  transition: all 0.1s;

  background: linear-gradient(to bottom, var(--blue-900), var(--blue-800));
  box-shadow: 0 10px 0 var(--blue-900),
              0 11px 5px rgba(0,0,0,.5);
}
.btn_favorite:active{
  transform: translateY(7px);
  box-shadow: 0 3px 0 var(--blue-900),
              0 4px 6px rgba(0,0,0,.7);
}

.btn--blue{
  background: var(--blue-900);
  color: var(--white);
}
.btn--blue:hover{
  background: var(--blue-800);
  transform: translateY(-2px);
}
.btn--pill{
  border-radius: 999px;
  padding: 0.7em 2.6em;
  letter-spacing: 0.5px;
}

/* Bootstrap success */
.btn-success{
  background-color: var(--accent);
  border-color: var(--primary-dark);
  color: var(--white);
}

/* =========================
   5) HEADER / NAV (BARRA AZUL)
   ========================= */
header{
  position: relative;
  z-index: 1200;
  background: var(--grad-menu);
  padding: 0;
  margin: 0;
}

/* Sticky header sólo en móvil para mejor UX */
@media (max-width: 767px){
  header{
    position: sticky;
    top: 0;
    z-index: 1200;
  }
}

nav.menu{
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 40px;
}

/* Lista (desktop) */
nav.menu ul{
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav.menu ul li{
  display: flex;
  align-items: center;
}

nav.menu .nav-link,
nav.menu ul li a{
  color: var(--white);
  font-size: 16px;
  padding: 0 18px;
  white-space: nowrap;
  text-decoration: none;
}

/* Logo centrado */
.navbar-brand{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.navbar-brand img{
  height: 90px;
  width: auto;
}
#iso-img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}

/* Nav sobre carrusel */
.carousel{
  position: relative;
  z-index: 0;
}

/* =========================
   6) HAMBURGER (MEJORADO)
   ========================= */
#btn-menu{ display:none; }

header label{
  display: none;
}

@media (max-width: 767px){
  header label{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    margin-left: 10px;
    border-radius: 12px;

    color: var(--white);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(6px);

    cursor: pointer;
  }

  header label i{
    font-size: 34px !important;
    line-height: 1;
  }
}

/* =========================
   MENU MOBILE: OVERLAY + DRAWER (FIX)
   ========================= */

/* Overlay real (label) -> cierra el menú al tocar fuera */
.menu-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1100;
}

/* Mostrar overlay cuando el checkbox está activo */
#btn-menu:checked ~ .menu-overlay{
  opacity: 1;
  pointer-events: auto;
}

/* En desktop el overlay no se usa */
@media (min-width: 768px){
  .menu-overlay{ display: none; }
}

/* Botón hamburguesa: mejor tamaño y click */
@media (max-width: 767px){
  header label[for="btn-menu"]{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-left: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.10);
    cursor: pointer;
    z-index: 1300;
  }

  header label[for="btn-menu"] i{
    font-size: 34px !important;
    line-height: 1;
    color: var(--white);
  }
}

/* Drawer (menú lateral) */
@media (max-width: 767px){
  nav.menu{
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: min(86vw, 360px);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    padding: 14px;

    transform: translateX(-110%);
    transition: transform .25s ease;

    background: var(--grad-menu);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);

    z-index: 1201;
  }

  /* Abrir drawer */
  #btn-menu:checked ~ nav.menu{
    transform: translateX(0);
  }

  /* Lista vertical */
  nav.menu ul{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
  }

  nav.menu ul li{
    width: 100%;
  }

  /* Links como cards */
  nav.menu .nav-link{
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    padding: 14px 14px;

    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: var(--white) !important;

    margin: 0 !important; /* elimina margins inline */
  }

  nav.menu .nav-link:active{
    transform: scale(.98);
  }

  /* Oculta el logo centrado dentro del drawer */
  .navbar-brand{
    display: none !important;
  }

  /* Dropdown dentro del drawer: que se vea bien */
  .dropdown-menu{
    position: static !important;
    float: none !important;
    width: 100%;
    margin-top: 8px;
    border-radius: 12px;
    padding: 8px;
  }

  .dropdown-item{
    border-radius: 10px;
    padding: 12px 12px;
  }
}

/* Evita que el nav desktop se rompa por reglas mobile */
@media (min-width: 768px){
  nav.menu{
    position: relative;
    transform: none !important;
    height: var(--navbar-height);
    box-shadow: none;
    border-radius: 0;
    padding: 0 40px;
  }

  nav.menu ul{
    flex-direction: row !important;
    justify-content: space-between;
    height: 100%;
  }

  .navbar-brand{
    display: block !important;
  }
}


/* =========================
   8) BANNER CARRUSEL + RESPONSIVE
   ========================= */
.banner{
  background-color: rgba(0,0,0,0.55);
  width: 100%;
  padding: 2em 0;
}
.banner .row{ align-items: center; }

/* Carrusel */
.c-item{ height: 480px; }
.c-img{ height: 100%; object-fit: cover; }

/* Tablet */
@media (max-width: 991px){
  .c-item{ height: 420px; }
  .banner{ padding: 1.25em 0; }
}

/* Mobile */
@media (max-width: 576px){
  .c-item{ height: 360px; }
  .carousel-caption{ left: 5%; right: 5%; }
  .banner h1{ font-size: 1.2rem; }
  .btn_favorite{ padding: 10px 14px; }
}

/* =========================
   9) TABS (DÍAS) RESPONSIVE + ACTIVO AZUL
   ========================= */
.tablink{
  cursor:pointer;
  padding:10px 18px;
  border:none;
  border-radius:6px;

  /* Inactivo: amarillo */
  background-color: var(--accent);
  color: var(--white);

  transition: background-color .25s ease, transform .15s ease;
  text-align: center;
  font-weight: 600;
  width: 100%;
}
.tablink:hover{ transform: translateY(-2px); }

/* Activo: azul */
.tablink.tablink-active{
  background-color: var(--blue-900);
}

.content{ display:none; }

/* Tabs compactos en móvil */
@media (max-width: 767px){
  .tablink{
    font-size:14px;
    padding:8px 10px;
  }
}
@media (max-width: 576px){
  #actividades .row{ gap: 10px; }
  #actividades .col{ flex: 1 1 0; }
}

/* =========================
   10) TABLAS
   ========================= */
.table{
  width:100%;
  border-collapse: collapse;
  margin-top:20px;
}
.table th, .table td{
  border:none;
  padding:15px;
  text-align:left;
  background-color:#f8f9fa;
  color:#495057;
  transition: background-color .3s ease, color .3s ease;
}
.table th{
  background-color: var(--accent);
  color: var(--white);
}

/* =========================
   11) CARDS (RESPONSIVE)
   ========================= */
.seccion{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: 16px;
}
.card{
  width: var(--card-w);
  margin: 0;
  text-align:center;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid transparent;
  overflow:hidden;
  background: var(--white);
}
.image{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.image img{
  width: 100%;
  max-width: 500px;
  height: var(--card-img-h);
  object-fit: cover;
}
.name_p{
  background-color: var(--primary);
  color: var(--white);
  padding: 8px 10px;
}

/* 2 columnas en tablet */
@media (max-width: 992px){
  .card{ width: min(340px, 48%); }
}
/* 1 columna en móvil */
@media (max-width: 576px){
  .card{ width: 100%; max-width: 420px; }
}

/* Hover participantes */
.parti:hover{
  color: var(--accent);
  font-weight:bold;
  transform: scale(1.2);
}

/* =========================
   12) MODAL PDF RESPONSIVE
   ========================= */
.modal-content-pro{
  position:absolute;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  width: min(900px, 92vw);
  height: min(600px, 75vh);
  padding:20px;
  border-radius:8px;
  text-align:center;
}
#pdfContainer{
  width:100%;
  height:100%;
}

/* =========================
   13) BOTÓN FLOTANTE (REGISTRO)
   ========================= */
.container-boton{
  border: .5px solid var(--white);
  position:fixed;
  z-index:80;
  border-radius:50%;
  bottom:5px;
  right:5px;
  padding:5px;
  transition: ease .3s;
  animation: efecto 1.2s infinite;
}
.container-boton:hover{
  transform: scale(1.1);
  transition: .3s;
}
.boton{
  width:120px;
  transition: ease 1s;
}
@keyframes efecto{
  0%{ box-shadow: 0 0 0 0 rgba(0,0,0,0.85); }
  100%{ box-shadow: 0 0 0 25px rgba(0,0,0,0); }
}

/* =========================
   14) CONTACT MAP
   ========================= */
.contact-map{
  width:80%;
  height:50%;
  margin:auto;
  flex-wrap:wrap;
  padding:2vw;
  border-radius:10px;
  background: var(--white);
  box-shadow: 0px 0px 10px 0px #666;
  display:grid;
  align-items:center;
}
@media only screen and (min-width: 600px){
  .contact-map{ padding:20px; }
}
.contact-map iframe{
  width:100%;
  height:100%;
}

/* =========================
   15) PATROCINADORES (ORIGINAL)
   ========================= */
.slider {
  width: 75vw;
  height: auto;
  margin: auto;
  overflow: hidden;
}
.slider .slide-track {
  display: flex;
  animation: scroll 60s linear infinite;
  -webkit-animation: scroll 60s linear infinite;
  width: calc(200px * 20);
}
.slider .slide { width: 200px; }
.slider .slide img { width: 100%; }

@keyframes scroll {
  0% { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(calc(-200px * 18)); transform: translateX(calc(-200px * 18)); }
}

/* =========================
   16) SWEETALERT
   ========================= */
.swal-button{
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

/* =========================
   17) FOOTER
   ========================= */
.site-footer{
  background: var(--grad-menu);
  padding: 24px 0;
  margin-top: 40px;
}
.footer-logo{
  width: 60%;
  height: auto;
  margin-top: 10px;
}
.footer-copy{
  margin-top: 10px;
  opacity: 0.95;
}
.footer-social{
  font-size: 60px;
  color: var(--white) !important;
  display: inline-block;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}
.footer-social:hover{
  color: var(--hover) !important;
  transform: scale(1.05);
}
.footer-address{
  color: rgba(255,255,255,0.92);
  margin: 0;
}
@media (max-width: 768px){
  .footer-logo{ width: 75%; }
  .site-footer{ text-align: center; }
}

/* =========================
   FIX DEFINITIVO: DROPDOWN "MÁS" (MÓVIL + DESKTOP)
   ========================= */

.dropdown-menu{
  background: var(--grad-dropdown) !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 10px !important;
  min-width: 220px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.25) !important;
}

.dropdown-menu.show{
  background: var(--grad-dropdown) !important; /* por si Bootstrap lo pisa al abrir */
}

.dropdown-item{
  color: rgba(255,255,255,.92) !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  background: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus{
  background: rgba(255,255,255,.14) !important;
  color: var(--white) !important;
}

/* Quita foco azul raro del toggle */
.dropdown-toggle:focus{
  box-shadow: none !important;
}

/* En móvil (drawer) queremos que sea en bloque */
@media (max-width: 767px){
  .dropdown-menu{
    position: static !important;
    transform: none !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
}
/* =========================
   FIX CARRUSEL (SLIDE 1) EN MÓVIL
   ========================= */

/* Asegura que el caption no se salga raro */
#myCarousel .carousel-caption{
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 12px 12px;
}

/* Fondo del caption (tu banner) */
#myCarousel .banner{
  width: 100%;
  border-radius: 14px;
}

/* MÓVIL: reacomoda el primer slide para que no se encime */
@media (max-width: 767px){

  /* reduce alto del slide para evitar “caja” enorme */
  #myCarousel .c-item{
    height: 70vh;
    min-height: 520px;
  }

  /* hace el banner más compacto */
  #myCarousel .banner{
    padding: 1rem;
    background: rgba(0,0,0,.55);
  }

  /* stack vertical en el slide 1 */
  #myCarousel .carousel-item.active .banner .row{
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
  }

  /* título más pequeño */
  #myCarousel .carousel-item.active .banner h1{
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 0;
  }

  /* botón mejor tamaño */
  #myCarousel .carousel-item.active .btn_favorite{
    width: 100%;
    max-width: 260px;
    display: inline-flex;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  /* la imagen del lado derecho (2.png) no debe ocupar toda la altura */
  #myCarousel .carousel-item.active .banner .col-sm-7 img{
    height: 140px;
    object-fit: contain;
  }
}
