:root {
  --azul-oscuro: #1f2a44;
  --azul-claro: #4da6ff;
  --gris-claro: #e5eaf0;
  --gris-oscuro: #2c3e50;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: white;
  color: var(--gris-oscuro);
}

/* HEADER */
.header {
  background: var(--azul-oscuro);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  flex-wrap: wrap;
  position: relative;
}

.header .cpc-redes-sociales {
  margin-top: 0; /* ✅ elimina el empuje vertical */
}

.logo img {
  height: 56px;         /* Ajusta según tu maqueta */
  max-width: 180px;     /* Evita que se expanda demasiado */
  object-fit: contain;  /* Mantiene proporciones */
  display: block;
}

/*MENU*/
.menu {
  display: flex;
  gap: 1.5rem;
}

.menu a {
  color: #cfd8e2;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: color 0.3s ease;
}

.menu a.activo::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #0077cc;
}

.menu a::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1); /* fondo translúcido */
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  border-radius: 4px;
}

.menu a:hover::before {
  opacity: 1;
}

.menu a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/*REDES SOCIALES DE LOS CPC*/
.cpc-redes-sociales {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
}

.icono-red {
  width: 32px;
  height: 32px;
  fill: #fff;
  transition: transform 0.3s ease, fill 0.3s ease;
}

.cpc-redes-sociales a:hover .icono-red {
  transform: scale(1.1);
  fill: #ff0000; /* azul institucional al hover */
}

/*BARRA FLOTANTE DE REDES SOCIALES*/
.barra-redes-flotante {
  position: fixed;
  top: 75%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 1rem 0.5rem;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  z-index: 1000;
}

.barra-redes-flotante a {
  display: block;
}

.barra-redes-flotante .icono-red {
  width: 28px;
  height: 28px;
  fill: #fff;
  transition: transform 0.3s ease, fill 0.3s ease;
}

.barra-redes-flotante a:hover .icono-red {
  transform: scale(1.1);
  fill: #ff0000; /* rojo institucional para YouTube */
}

/* CONTENEDOR DEL CARRUSEL */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* mantiene proporción horizontal */
  max-height: 480px;
  /* límite visual para evitar que se desborde */
  overflow: hidden;
  background: var(--gris-claro);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(31, 42, 68, 0.6);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 3;
}

.carousel-btn.prev {
  left: 1rem;
}

.carousel-btn.next {
  right: 1rem;
}

.carousel-btn:hover {
  background: rgba(77, 166, 255, 0.8);
}

/* SLIDE BASE */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

/* SLIDE ACTIVO */
.slide.active {
  opacity: 1;
  z-index: 1;
}

/* CONTENIDO CON OVERLAY */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(31, 42, 68, 0.6);
  /* overlay institucional */
  z-index: 1;
}

/* CONTENIDO VISIBLE */
.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 2rem;
}

.slide-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.slide-content p {
  font-size: 1.1rem;
}

/* IMAGEN DE FONDO */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* BANNERS */
.banner-full {
  width: 100%;
  background: #1f2a44;
  /* azul institucional sobrio */
  padding: 3rem 0;
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  color: white;
}

.banner-image img {
  width: 300px;
  object-fit: cover;
  border-radius: 0;
}

.banner-content {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.banner-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.banner-content p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.banner-btn {
  background: white;
  color: #1f2a44;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.banner-btn:hover {
  background: #e5eaf0;
}

/*CARDS CPC*/
.cpc-info {
  background: #ffffff;
  padding: 4rem 2rem;
  color: #1f2a44;
  max-width: 1200px;
  margin: 0 auto;
}

.cpc-info-header {
  text-align: center;
  margin-bottom: 3rem;
}

.cpc-info-titulo {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.cpc-info-titulo::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: #1f2a44;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.cpc-info-descripcion {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.cpc-info-bloques {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.bloque {
  flex: 1 1 300px;
  background: #f0f4f8;
  padding: 2rem;
  border-left: 4px solid #1f2a44;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bloque h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #1f2a44;
}

.bloque p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.cpc-integrantes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  padding: 2rem;
  background: #f0f4f8;
}

.cpc-titulo-wrapper {
  text-align: center;
  margin-bottom: 2rem;
}

.cpc-titulo {
  font-size: 2rem;
  color: #1f2a44;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

.cpc-titulo::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: #1f2a44; /* misma base que el texto */
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.cpc-integrantes-wrapper {
  padding: 3rem 2rem;
  background: #f0f4f8;
}

.card {
  background: white;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1); /* opcional para polish */
}

.card .foto {
  width: 100%;
  max-width: 120px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}

.card h3 {
  font-size: 1.1rem;
  color: #1f2a44;
  margin-bottom: 0.3rem;
}

.card p {
  font-size: 0.95rem;
  color: #4a4a4a;
  margin-bottom: 0.8rem;
}

.card .facebook img {
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease;
}

.card .facebook img:hover {
  opacity: 0.7;
}

/*DOCUMENTOS*/
.cpc-documentos-wrapper {
  background: #f0f4f8;
  padding: 4rem 2rem;
}

.cpc-documentos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card-doc {
  background: white;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
}

.card-doc:hover {
  transform: translateY(-4px);
}

.card-doc h3 {
  font-size: 1rem;
  color: #1f2a44;
  margin-bottom: 0.5rem;
}

.card-doc p {
  font-size: 0.9rem;
  color: #4a4a4a;
  flex-grow: 1;
}

.card-doc a {
  margin-top: 1rem;
  display: inline-block;
  background: #1f2a44;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.card-doc a:hover {
  background: #16325c;
}

.mas-documentos {
  text-align: center;
  margin-top: 2rem;
}

.mas-documentos a {
  background: #2e7d32; /* verde institucional */
  color: white;
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
  display: inline-block;
  transition: background 0.3s ease;
}

.mas-documentos a:hover {
  background: #1b5e20;
}

/*ENLACES EXTERNOS*/
.cpc-enlaces-externos {
  background: #FFF;
  padding: 4rem 2rem;
  overflow-x: hidden;
}

.carrusel-enlaces {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
  min-width: 100vw; /* ✅ fuerza desborde horizontal */
}

.carrusel-enlaces::-webkit-scrollbar {
  height: 8px;
}

.carrusel-enlaces::-webkit-scrollbar-thumb {
  background: #1f2a44;
  border-radius: 4px;
}

.card-enlace {
  flex: 0 0 auto;
  width: 180px;
  height: 100px;
  scroll-snap-align: start;
  margin-inline: 1rem;
}

.card-enlace:hover {
  transform: translateY(-2px);
}

.card-enlace img {
  width: 80px;       /* antes 180px o más */
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card-enlace img:hover {
  transform: scale(1.05);
}

/*BANNER SECUNDARIO*/
.cpc-banner-secundario {
  background: #2a4e8a; /* azul más claro o alternativo */
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.cpc-banner-contenido {
  max-width: 900px;
  margin: 0 auto;
}

.cpc-banner-secundario h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cpc-banner-secundario p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cpc-banner-boton {
  background: white;
  color: #2a4e8a;
  padding: 0.7rem 1.6rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.cpc-banner-boton:hover {
  background: #f0f4f8;
  color: #1f2a44;
}

/*NOTICIAS*/
.cpc-noticias-wrapper {
  background: #ffffff;
  padding: 4rem 2rem;
  margin: 4rem auto; /* ✅ margen arriba y abajo */
  border: 1px solid #d0d6e0; /* borde suave */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* ✅ sombra institucional */
  max-width: 1200px;
}

.cpc-noticias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card-noticia {
  background: #f0f4f8;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.card-noticia:hover {
  transform: translateY(-4px);
}

.card-noticia img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-noticia .contenido {
  padding: 1rem;
  flex-grow: 1;
}

.card-noticia h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #1f2a44;
}

.card-noticia p {
  font-size: 0.9rem;
  color: #4a4a4a;
  line-height: 1.4;
}

.card-noticia a {
  display: inline-block;
  margin-top: 1rem;
  color: #1f2a44;
  font-weight: 500;
  text-decoration: underline;
}

.icono-noticias {
  width: 100PX;           /* antes 48px */
  height: auto;
  margin: 0 auto 1.2rem auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* FOOTER */
.footer {
  position: relative;
  background-image: url('imagenes/footer.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 4rem 2rem;
  overflow: hidden; /* ✅ evita fugas del cover */
}

.footer-content p {
  font-size: 1rem;
  color: #f0f4f8; /* gris claro institucional */
  margin-bottom: 1rem;
}

.footer-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  transition: background 0.3s ease;
  z-index: 0;
}

.footer-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.footer-logo {
  width: 120px;
  margin-bottom: 1rem;
  background: white; /* o #f0f4f8 si prefieres institucional */
  padding: 0.5rem;
  border-radius: 6px;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/*MARCA PERSONAL*/
.marca-personal {
  text-align: center;
  font-size: 0.85rem;
  color: #cfd8e2;
  padding: 1rem;
  background-color: #1f2a44;
}

.marca-personal a {
  color: #cfd8e2;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.marca-personal a:hover {
  color: var(--azul-claro);
}

@media (max-width: 1024px) {
  .cpc-integrantes {
    grid-template-columns: repeat(3, 1fr);
  }
  .cpc-documentos {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 768px) {

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #1f2a44;
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000; /* ✅ asegura que esté por encima del carrusel */
  }

  .menu.abierto {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .carousel {
    aspect-ratio: 4 / 3;
    max-height: 360px;
  }

  .slide-content h2 {
    font-size: 1.5rem;
  }

  .slide-content p {
    font-size: 1rem;
  }

  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.3rem 0.6rem;
  }

  .banner {
    flex-direction: column;
    text-align: center;
  }

  .banner-image img {
    width: 100%;
    max-width: 400px;
  }

  .cpc-info-bloques {
    flex-direction: column;
    align-items: center;
  }

  .cpc-integrantes {
    grid-template-columns: repeat(2, 1fr);
  }

  .logo img {
    height: 48px;
    max-width: 140px;
  }

}

@media (max-width: 600px) {
  .cpc-documentos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cpc-integrantes {
    grid-template-columns: 1fr;
  }
}
