/* ===============================
   VARIABLES GLOBALES
================================ */
:root{
  --azul-noche:#0b1d3a;
  --azul-noche-soft:#122b52;
  --dorado:#d4af37;
  --gris-texto:#dcdcdc;
  --blanco:#ffffff;
  --sombra-elegante:0 15px 40px rgba(0,0,0,.35);
}

/* ===============================
   RESET BÁSICO
================================ */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  background:linear-gradient(180deg,#050b18,#0b1d3a);
  font-family:'Poppins',sans-serif;
  color:var(--gris-texto);
}

/* CONTENEDOR GENERAL */
.wrapper{
  width:100%;
  margin:auto;
}

/* ===============================
   NAVBAR
================================ */
.navbar{
  background:rgba(11,29,58,.95);
  border-bottom:1px solid rgba(212,175,55,.3);
}

.navbar-brand{
  color:var(--dorado)!important;
  font-weight:600;
}

.nav-link{
  color:var(--gris-texto)!important;
  margin-right:10px;
  transition:.3s;
}

.nav-link:hover{
  color:var(--dorado)!important;
}

/* ICONOS SOCIALES NAV */
.nav-social i{
  color:var(--gris-texto);
  margin-left:15px;
  font-size:1.1rem;
  transition:.3s;
}

.nav-social i:hover{
  color:var(--dorado);
  transform:scale(1.2);
}

/* ===============================
   MODAL INICIO (PDF)
================================ */
#modalInicio .modal-content {
  background: linear-gradient(180deg, rgba(11,29,58,0.95), rgba(5,11,24,0.95));
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

#modalInicio h4{
  color: var(--dorado);
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 10px;
  animation: fadeUp 1s ease both;
}

#modalInicio h6{
  color: var(--gris-texto);
  font-weight: 400;
  opacity: .85;
  animation: fadeUp 1.3s ease both;
}
#modalInicio h4:hover{
  text-shadow: 0 5px 20px rgba(212,175,55,.6);
  transform: translateY(-3px);
}

#modalInicio h6:hover{
  letter-spacing: 1px;
  opacity: 1;
}
#modalInicio img{
  width: 280px;
  height: 430px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--sombra-elegante);
  cursor: pointer;
  transition: .4s;
}
#modalInicio img:hover{
  transform: scale(1.05);
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}
@keyframes fadeUp{
  from{
    opacity: 0;
    transform: translateY(20px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===============================
   CARRUSEL
================================ */
.carousel-inner img{
  height:480px;
  object-fit:cover;
  border-radius:20px;
}

.carousel-caption{
  background:rgba(0,0,0,.45);
  border-radius:10px;
  padding:15px;
}

/* ===============================
   LINEA DIVISORA
================================ */
.divider{
  height:4px;
  width:100%;
  margin:40px 0;
  background:linear-gradient(90deg,transparent,var(--dorado),transparent);
  animation:shine 3s infinite;
}

@keyframes shine{
  0%{opacity:.4}
  50%{opacity:1}
  100%{opacity:.4}
}

/* ===============================
   ASIDES (NOTICIAS) IZQUIERDO
================================ */
.elegant-aside{
  background:rgba(255,255,255,.03);
  border-radius:20px;
  padding:20px;
  box-shadow:var(--sombra-elegante);
  text-align: justify
}
.aside-title{
  color:var(--dorado);
  margin-bottom:20px;
  font-weight:600;
}
.news-item{
  margin-bottom:20px;
  padding:15px;
  background:rgba(11,29,58,.6);
  border-radius:15px;
  transition:.4s;
  animation:fadeUp .8s ease both;
}

.news-item:hover{
  transform:translateY(-6px);
  box-shadow:0 20px 45px rgba(0,0,0,.5);
}

.news-item h4{
  color:#fff;
  font-size:1rem;
  margin-bottom:10px;
}
.news-item i{
  color:var(--dorado);
}

.news-item.featured{
  background:linear-gradient(135deg,#0b1d3a,#050b18);
  border:1px solid rgba(255,215,0,.25);
  animation:none; /* 👈 NO se anima */
}
.vertical-banner{
  height:420px;
  overflow:hidden;
  position:relative;
}

.scroll-content{
  animation:scrollNews 18s linear infinite;
}
.vertical-banner:hover .scroll-content{
  animation-play-state:paused;
}
@keyframes scrollNews{
  0%{ transform:translateY(0); }
  100%{ transform:translateY(-50%); }
}

@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(20px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}


/* ===============================
   ASIDES – PRODUCCIÓN - DERECHO
================================ */
.aside-right{
  background:rgba(255,255,255,.04);
  backdrop-filter: blur(6px);
  border-radius:20px;
  border:1px solid rgba(212,175,55,.15);
  padding:20px;
  box-shadow:var(--sombra-elegante);
  overflow:hidden;
}
.aside-title{
  color:var(--dorado);
  margin-bottom:15px;
  font-weight:600;
  letter-spacing:.5px;
}

.aside-link a{
  border-radius: 30px;
  padding: 8px 18px;
  transition: .4s;
}

.aside-link a:hover{
  background: var(--dorado);
  color:#000;
  box-shadow: 0 10px 30px rgba(212,175,55,.4);
}

/* CONTENEDOR DEL TEXTO ANIMADO */
.vertical-banner{
  position:relative;
  height:620px;
  overflow:hidden;
  background:rgba(11,29,58,.65);
  border-radius:15px;
  padding:20px;
}

/* Pausar al pasar mouse */
.vertical-banner:hover .scroll-content{
  animation-play-state:paused;
}

/* TEXTO QUE SE MUEVE */
.scroll-content{
  animation:scrollUp 30s linear infinite;
}

@keyframes scrollUp{
  0%{ transform:translateY(0); }
  100%{ transform:translateY(-60%); }
}
.medical-block{
  margin-bottom:35px;
  animation:fadeUp .8s ease both;
}
.medical-block h4{
  color:var(--dorado);
  font-size:1.05rem;
  margin-bottom:6px;
  font-weight:600;
}

.medical-block h4 i{
  color:var(--dorado);
}
.medical-block h6{
  color:#cfd6e4;
  font-size:.85rem;
  font-style:italic;
  margin-bottom:10px;
}
.medical-block p{
  color:#e4e8f0;
  font-size:.85rem;
  line-height:1.7;
  text-align:justify;
}
.medical-block hr{
  border:0;
  height:1px;
  background:linear-gradient(
    90deg,
    transparent,
    var(--dorado),
    transparent
  );
  margin:12px 0;
  opacity:.6;
}
@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(15px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}
.second-block{
  position: relative;
  background: rgba(11,29,58,.65);
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--sombra-elegante);
}

/* CONTENEDOR DE IMAGEN */
.second-block .image{
  width: 100%;
  height: 420px;
  display: flex;
  align-items: center;        /* centra vertical */
  justify-content: center;    /* centra horizontal */
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 0 10px;            /* 👈 ESPACIO LATERAL */
  box-sizing: border-box;
}
/* IMAGEN AJUSTADA */
.second-block .image img{
  max-width: 100%;            /* 👈 NO ocupar todo */
  max-height: 100%;
  object-fit: cover;
  display: block;
}

/* ANIMACION LEER */
.leer-animado{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--dorado);
  text-decoration: none;
  position: relative;
  animation: pulseLeer 2s infinite;
  transition: .4s;
}

/*IMAGEN LATERAL*/
/* MODAL */
.img-modal{
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

/* IMAGEN GRANDE */
.img-modal-content{
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 10px;
}

/* BOTÓN CERRAR */
.img-modal .close{
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}



/* ===============================
   CARDS CENTRALES
================================ */
.cards-section{
  position:relative;
  padding:40px 0;
}
.section-title{
  color:var(--dorado);
  font-weight:600;
  letter-spacing:1px;
}
.elegant-card{
  background:rgba(255,255,255,.05);
  border:none;
  border-radius:20px;
  box-shadow:var(--sombra-elegante);
  overflow:hidden;
  cursor:pointer;
  transition:all .5s ease;
  height:100%;
}
.elegant-card img{
  width:100%;
  height:220px;
  object-fit:cover;
  transition:transform .6s ease;
}
.elegant-card:hover{
  transform:translateY(-12px);
  box-shadow:0 35px 70px rgba(0,0,0,.45);
}

.elegant-card:hover img{
  transform:scale(1.1);
}
@media(max-width:768px){
  .elegant-card img{
    height:200px;
  }
}

/* ===============================
   MODAL IMAGEN CARD
================================ */
#imgModal .modal-content{
  background:linear-gradient(180deg,#050b18,#0b1d3a);
  border-radius:20px;
  padding:15px;
  box-shadow:var(--sombra-elegante);
}

#imgModal img{
  width:100%;
  border-radius:15px;
   animation: zoomIn .4s ease;
}

@keyframes zoomIn{
  from{
    opacity:0;
    transform:scale(.85);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}


/* ===============================
   SECCIÓN TEXTO + IMAGEN
================================ */
.section-text img{
  border-radius:15px;
  box-shadow:var(--sombra-elegante);
}
.vertical-banner p{
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.8;
}
.content-text{
  background: rgba(255,255,255,.03);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--sombra-elegante);
  animation: fadeUp 1s ease both;
}
.section-title{
  color: var(--dorado);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-align: center;
}
.section-subtitle{
  text-align: center;
  color: #bfbfbf;
  font-style: italic;
  margin-bottom: 30px;
}

/* este codigo para hacerlo en dos columnas
.content-body{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  align-items: center;
}
.content-body p{
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.8;
  color: var(--gris-texto);
}
.content-body img{
  width: 100%;
  border-radius: 15px;
  box-shadow: var(--sombra-elegante);
  transition: .5s;
}
.content-body img:hover{
  transform: scale(1.05);
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}
@keyframes fadeUp{
  from{
    opacity: 0;
    transform: translateY(30px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}
@media(max-width: 992px){
  .content-body{
    grid-template-columns: 1fr;
  }
}

/* Barra Espaciadora Lateral */
.content-text{
  max-height: 800px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dorado) transparent;
}

/* Chrome / Edge */
.content-text::-webkit-scrollbar{
  width: 8px;
}

.content-text::-webkit-scrollbar-track{
  background: transparent;
}

.content-text::-webkit-scrollbar-thumb{
  background: linear-gradient(
    to bottom,
    var(--dorado),
    #a88f2d
  );
  border-radius: 10px;
}

/* desde aqui es para hacerlo como cuadrado*/
.content-body{
  overflow: hidden; /* Limpia el float */
}

.content-body img{
  width: 220px;
  float: right;              /* 👈 AQUÍ ESTÁ LA MAGIA */
  margin: 0 0 20px 30px;     /* separación texto-imagen */
  border-radius: 15px;
  box-shadow: var(--sombra-elegante);
  transition: .5s;
}

.content-body img:hover{
  transform: scale(1.05);
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}

.content-body p{
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.8;
  color: var(--gris-texto);
}

@media(max-width: 768px){/*responsive*/
  .content-body img{
    float: none;
    display: block;
    margin: 0 auto 25px;
    width: 100%;
    max-width: 400px;
  }
}

/* ===============================
   VIDEO
================================ */
.video-section{
  max-width: 900px;
  margin: auto;
  animation: fadeUp 1s ease;
}

.video-wrapper{
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--sombra-elegante);
  transition: transform .4s ease, box-shadow .4s ease;
}

/* iframe responsive */
.video-wrapper iframe{
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border:none;
}

/* Hover efecto */
.video-wrapper:hover{
  transform: scale(1.03);
  box-shadow: 0 25px 50px rgba(0,0,0,.4);
}

/* ===============================
   PREFOOTER
================================ */
.prefooter{
  background:linear-gradient(180deg,#07142b,#040c1d);
  padding:70px 0;
  margin-top:80px;
}

.prefooter h5{
  color:var(--dorado);
  margin-bottom:20px;
  letter-spacing:1px;
  font-weight:600;
}

/* Redes sociales */
.sociales i{
  font-size:2.2rem;
  margin-right:15px;
  color:var(--gris-texto);
  cursor:pointer;
  transition:.4s;
}

.sociales i:hover{
  color:var(--dorado);
  transform:translateY(-6px) scale(1.2);
}

/* Contacto */
.institution-info p{
  color:#cfcfcf;
  margin-bottom:8px;
  margin-bottom:2px;
  font-size:.95rem;
}

.institution-info i{
  color:var(--dorado);
  margin-right:8px;
}

/* MAPA */
.map-box{
  position:relative;
  border-radius:25px;
  overflow:hidden;
  box-shadow:var(--sombra-elegante);
  transition:.4s;
}

.map-box iframe{
  width:100%;
  height:230px;
  border:0;
}

.map-box:hover{
  transform:scale(1.02);
}

/* Overlay elegante */
.map-overlay{
  position:absolute;
  inset:0;
  background:rgba(7,20,43,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--dorado);
  font-size:1.2rem;
  font-weight:600;
  letter-spacing:1px;
  opacity:0;
  transition:.4s;
  pointer-events: none;
}

.map-box:hover .map-overlay{
  opacity:1;
}

.divider-vertical{
  width:1px;
  height:160px;
  background:linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,.45),
    transparent
  );
}
.v-divider{
  width:1px;
  height:140px;
  background:linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,.6),
    transparent
  );
  animation: glow 3s infinite ease-in-out;
}
@keyframes glow{
  0%{opacity:.3}
  50%{opacity:1}
  100%{opacity:.3}
}


/* ===============================
   FOOTER
================================ */
footer{
  background:#050b18;
  padding:15px;
  text-align:center;
  color:#aaa;
}

