/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1E293B;
  background-color: #ffffff;
}

/* =========================
   HERO (CON IMAGEN)
========================= */
.hero {
  position: relative; /* CLAVE PARA OVERLAY */
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  padding: 80px 8%;
  color: #ffffff;

  background-image: url("../img/Imagen Fondo Pagina web 1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* OVERLAY INSTITUCIONAL coloca por debajo la imagen del hero
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(31, 77, 119, 0.85),
    rgba(0, 115, 201, 0.75)
  );
  z-index: 0;
}  */

/* =========================
   HEADER SOBRE HERO
========================= */
.hero-top {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  padding: 0 40px;

  display: flex;
  align-items: center;
  box-sizing: border-box;
  z-index: 2;
}

/* LOGO */
.hero-logo img {
  height: 50px;
}

/* MENÚ */
.hero-nav {
  margin-left: auto;
  display: flex;
  gap: 26px;
}

.hero-nav a {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  position: relative;
}

/* Subrayado */
.hero-nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #e0822f;
  transition: width 0.2s ease;
}

.hero-nav a:hover::after {
  width: 100%;
}

/* =========================
   CONTENIDO HERO
========================= */
.hero-content {
  width: 50%;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* BOTONES */
.hero-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.primary {
  background-color: #e0822f;
  color: #ffffff;
}

.primary:hover {
  background-color: #c96f23;
}

.secondary {
  border: 2px solid #ffffff;
  color: #ffffff;
}

.secondary:hover {
  background-color: rgba(255,255,255,0.15);
}

/* =========================
   IMAGEN HERO (50%)
========================= */
.hero-image {
  width: 50%;
  position: relative;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  max-width: 420px;
  object-fit: cover;
}

/* =========================
   CARDS
========================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  padding: 80px 8%;
  background-color: #f4f6f9;
}

.card {
  background: #ffffff;
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  text-align: center;
}

.card h3 {
  color: #1f4d77;
  margin-bottom: 15px;
}

.card p {
  font-size: 15px;
  line-height: 1.6;
}

.card a {
  display: inline-block;
  margin-top: 20px;
  color: #0073c9;
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  color: #e0822f;
}

/* card dinamicas*/

.card {
  background: #ffffff;
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  text-align: center;
  transition: 
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-top 0.3s ease;
  border-top: 5px solid transparent;
}

/* DESTACADO DINÁMICO */
.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 45px rgba(0,0,0,0.15);
  border-top: 5px solid #e0822f;
}


/* =========================
   FOOTER
========================= */
.footer {
  text-align: center;
  padding: 30px;
  background-color: #1f4d77;
  color: #ffffff;
  font-size: 14px;
}

/* =========================
   WHATSAPP
========================= */
#whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

#whatsapp-button img {
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* =========================
   DROPDOWN MENU
========================= */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 32px;
  right: 0;
  background-color: #ffffff;
  min-width: 260px;
  padding: 12px 0;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 22px;
  font-size: 14px;
  color: #1f4d77;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: #f4f6f9;
  color: #e0822f;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-content,
  .hero-image {
    width: 100%;
  }

  .hero-image {
    margin-top: 40px;
  }

  .hero-top {
    padding: 0 20px;
  }

  .hero-nav {
    display: none;
  }

  .hero-logo img {
    height: 42px;
  }
}

/* =========================
   NOTICIAS - SLIDER
========================= */

.news-carousel {
  padding: 80px 8%;
  background-color: #ffffff;
  text-align: center;
}

.news-carousel h2 {
  font-size: 32px;
  color: #1f4d77;
  margin-bottom: 30px;
}

/* OCULTAR RADIOS */
.news-carousel input {
  display: none;
}

/* CONTENEDOR */
.carousel {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* TRACK */
.slides {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.8s ease;
  animation: autoSlide 10s infinite;
}

/* SLIDE */
.slide {
  width: 50%;
  height: 100%;
}

/* IMAGEN */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* AUTOMÁTICO */
@keyframes autoSlide {
  0%, 45% {
    transform: translateX(0);
  }
  50%, 95% {
    transform: translateX(-50%);
  }
}

/* MANUAL */
#slide1:checked ~ .carousel .slides {
  transform: translateX(0);
  
}

#slide2:checked ~ .carousel .slides {
  transform: translateX(-50%);
  
}

/* FLECHAS */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(31,77,119,0.9);
  color: #fff;
  font-size: 36px;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 5;
  user-select: none;
}

.arrow:hover {
  background-color: #e0822f;
}

.left {
  left: 20px;
}

.right {
  right: 20px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .carousel {
    height: 300px;
  }
}