/* ------------------------------------------- */
/* 1. RESET Y BASE */
/* ------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  /* Aplica un desplazamiento suave a toda la página */
  scroll-behavior: smooth;
}

/* Fuentes */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

body {
  font-family: "DM Sans", sans-serif;
}

.screen-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-attachment: fixed;
  /* Añadimos padding para el contenido en general */
  padding: 0 1.5rem;
  width: 100%;
}
.hero {
  /* La sección hero no necesita padding en la base */
  padding: 0;
}

/* Usaremos la versión de escritorio como base, por lo que muchos estilos quedan aquí */
.sections {
  gap: 40px;
  margin-bottom: 100px;
  width: 100%; /* Aseguramos el ancho completo */
  max-width: 1200px; /* Limitamos el ancho en pantallas muy grandes */
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------- */
/* 2. HERO SECTION */
/* ------------------------------------------- */
.hero {
  height: 100dvh;
  position: relative;
  z-index: 1;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-image:
    linear-gradient(rgba(47, 24, 147, 0.5), rgba(47, 24, 147, 0.5)),
    url("../assets/fibega_bg.png");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: -1;
}
/* navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  align-items: center;
  padding: 0 40px; /* Padding de escritorio */
  margin-top: 40px;
}
.logo img {
  width: 103px;
  height: 35px;
}
.menu {
  display: flex;
  justify-content: center;
  gap: 49px;
}
.menu a {
  color: #fff;
  text-decoration: none;
  animation: ease-in 300ms;
}
.burger-menu {
  display: none;
  cursor: pointer;
  font-size: 24px; /* Tamaño del icono */
  color: #fff; /* Color del icono */
  z-index: 30;
}
.boton {
  background-color: #ed2024;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 10px 20px; /* Añadimos un poco de padding horizontal */
  width: fit-content;
  cursor: pointer;
  animation: ease-out 200ms;
}

/* Video Modal (se mantienen las dimensiones de escritorio como max-width) */
.video-modal-overlay {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.video-modal-overlay.is-open {
  display: flex;
  opacity: 1;
}

.video-modal-content {
  position: relative;
  width: 90%; /* Ancho responsivo por defecto */
  max-width: 962px;
}

.close-btn {
  position: absolute;
  top: -30px;
  right: 0px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1010;
}
.close-btn:hover {
  color: #ed2024;
}

/* Contenedor Responsivo del IFRAME (Esencial para video responsivo) */
.video-container-responsive {
  position: relative;
  padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
  height: 0;
  overflow: hidden;
  background: black;
  border-radius: 8px;
}

.video-container-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Contenido hero */
.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  color: #fff;
  margin-top: auto;
  margin-bottom: auto;
  flex-grow: 1;
  padding: 0 1.5rem; /* Padding para evitar que el texto toque los bordes */
}
.content h1 {
  max-width: 959px;
  /* Ajustamos las unidades a REM para mejor escalado */
  font-size: 3.625rem; /* 58px */
  line-height: 4.375rem; /* 70px */
  letter-spacing: -1px;
  text-align: center;
  height: auto; /* La altura debe ser automática */
}
.content .boton {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
}
.content .boton i {
  font-size: 1.25rem;
}
.content p {
  width: 570px; /* Ancho fijo de escritorio */
  font-size: 20px;
  line-height: 32px;
  text-align: center; /* Centramos el párrafo */
  letter-spacing: 0;
}

/* ------------------------------------------- */
/* 3. WHO WE ARE SECTION */
/* ------------------------------------------- */
.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  color: #000;
  margin-top: 40px;
  padding: 0 1.5rem; /* Padding base para asegurar el margen en móvil */
  text-align: center;
}
.title h2 {
  font-size: 36px;
  line-height: 44px;
  text-align: center;
  color: #1e0e62;
  letter-spacing: -0.4px;
}
.title p {
  max-width: 970px;
  width: 100%; /* Hacemos el ancho adaptable */
  font-size: 20px;
  line-height: 32px;
  letter-spacing: 0;
  color: #15143966;
  text-align: left;
}
.imagenes {
  display: flex;
  justify-content: center;
  align-items: center; /* Esencial para responsive */
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* ESENCIAL: Permite que las tarjetas se envuelvan */
  width: 100%;
  max-width: 1160px; /* 570*2 + 20 (Ancho de dos tarjetas de escritorio) */
}
.card-image {
  display: flex;
  flex-direction: column;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 32px;
  overflow: hidden;
  background-color: #ffffff;
  /* Flex-basis para diseño de escritorio */
  flex-basis: calc(50% - 10px);
  max-width: 570px;
  flex-grow: 1; /* Permite que crezca si el contenedor es más grande */
}
.imagenes .card-image img {
  width: 100%; /* Ocupa el 100% del contenedor */
  height: 382px;
  object-fit: cover;
}
.imagenes .card-image p {
  padding: 16px;
  font-size: 18px;
  line-height: 28px;
  color: #15143966;
}

/* ------------------------------------------- */
/* 4. FIBEGA CHINA SECTION */
/* ------------------------------------------- */
/* Estilos corregidos y optimizados */

/* Contenedor principal de la sección */
.section-fibega-china {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-attachment: fixed;
  /* padding: 0 1.5rem; */
  width: 100%;
  margin-bottom: 100px;
}

/* Contenedor Flex para la disposición horizontal */
.horizontal-section {
  display: flex;
  align-items: center; /* Alinea verticalmente los items */
  gap: 40px; /* Espacio entre imagen y texto */
  margin-top: 40px;
}

/* Contenedor y estilos de la imagen */
.image-section {
  flex: 1; /* Permite que la imagen ocupe espacio dinámicamente */
  max-width: 60%; /* Límite para el tamaño de la imagen */
}

.image-section img {
  width: 100%; /* La imagen ocupa todo el ancho de su contenedor */
  height: auto;
  aspect-ratio: 1005 / 496; /* Mantiene la proporción original de la imagen */
  object-fit: cover;
}

/* Sección de texto. Se eliminó el posicionamiento absoluto y el ancho fijo. */
.text-section {
  background-color: #fff;
  flex: 1;
  max-width: 455px; /* Límite de ancho para que el texto sea legible */
  padding: 40px;
  border-radius: 32px;
  text-align: start;
}

/* Estilos del botón (se mantiene solo por contexto) */
.text-section .boton {
  align-self: flex-start;
}

.boton-movil {
  display: none;
}

/* ------------------------------------------- */
/* 5. FIBEGA AWARDS SECTION */
/* ------------------------------------------- */
.awards-section {
  position: relative;
  background-color: #1a0847;
  color: #fff;
  padding: 100px 1.5rem; /* Padding responsivo en la base */
  height: auto;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.awards-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(47, 24, 147, 0.75), rgba(47, 24, 147, 0.75)),
    url("../assets/fibegaAwards.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.awards-content-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.awards-header {
  text-align: left;
  margin-bottom: 60px;
}
.awards-header h2 {
  color: #fff;
  font-size: 48px;
  margin-bottom: 10px;
}
.awards-header p {
  color: #ffffffd0;
  font-size: 22px;
  width: 100%;
  max-width: 671px;
}
/* Estilos de las filas y columnas se mantienen como escritorio/tabla */
.awards-column-titles {
  display: flex;
  justify-content: space-between;
  padding: 0 20px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 15px;
}
.awards-column-titles h3 {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff;
}
.category-title {
  width: 60%;
}
.winner-title {
  width: 40%;
  text-align: left;
}

.award-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 18px 25px;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}
.award-item:nth-child(odd) {
  background-color: rgba(235, 234, 237, 0.1);
}
.award-item:nth-child(even) {
  background-color: transparent;
}
.award-item:hover {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.award-item .category-name {
  width: 60%;
  font-size: 18px;
  color: #fff;
}
.award-item .winner-name {
  width: 40%;
  font-size: 18px;
  color: #ffffffc0;
}

.view-more-button {
  margin-top: 50px;
  padding: 15px 35px;
  font-size: 18px;
  display: block;
  margin-left: 0;
}

/* ------------------------------------------- */
/* 6. CONTACT SECTION 
/* ------------------------------------------- */
.contact-section {
  background-color: #ffffff;
  padding: 100px 1.5rem; /* Padding responsivo en la base */
  height: auto;
  flex-direction: column;
  align-items: center;
}

.contact-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1000px;
  width: 100%;
  gap: 80px; /* Espacio de escritorio */
}

/* 🧱 Columna Izquierda: Información */
.contact-info {
  flex-basis: 50%;
  padding-right: 40px;
}
.contact-info h2 {
  color: #1e0e62;
  font-size: 36px;
  margin-bottom: 20px;
}
.contact-info .description {
  color: #5a5a5a;
  font-size: 18px;
  line-height: 28px;
  margin-bottom: 40px;
  max-width: 400px; /* Se mantiene el límite para el texto */
}
.contact-detail {
  padding-bottom: 30px;
  margin-bottom: 30px;
}
.contact-detail i {
  color: #ed2024;
  margin-right: 15px;
  font-size: 18px;
}
.contact-detail a {
  color: #1e0e62;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
}
.socials h3 {
  font-size: 20px;
  color: #1e0e62;
  margin-bottom: 15px;
}
.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.social-link {
  display: flex;
  align-items: center;
  color: #5a5a5a;
  text-decoration: none;
  font-size: 16px;
}
.social-link i {
  font-size: 16px;
  color: #1e0e62;
  width: 20px;
  margin-right: 15px;
}

/* 📝 Columna Derecha: Formulario */
.contact-form-container {
  flex-basis: 50%;
}
.contact-form-container h3 {
  color: #1e0e62;
  font-size: 32px;
  margin-bottom: 5px;
}
.contact-form-container .form-caption {
  color: #5a5a5a;
  font-size: 16px;
  margin-bottom: 30px;
  margin-top: 20px;
}
.contact-form {
  background-color: #f7f7f9;
  padding: 40px;
  border-radius: 8px;
}
.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  color: #1e0e62;
  margin-bottom: 8px;
  margin-top: 15px;
  letter-spacing: 2px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #e0e0e0;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.contact-form input {
  border-radius: 100px;
}
.contact-form textarea {
  height: 150px;
  resize: none;
  border-radius: 4px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #ed2024;
}

.name-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 15px;
  gap: 20px;
}
.name-submit-row .name-field {
  flex-grow: 1;
}
.send-button {
  padding: 15px 40px;
  height: fit-content;
  font-size: 16px;
}

/* ------------------------------------------- */
/* 7. FOOTER */
/* ------------------------------------------- */
footer {
  background-color: #2f1893;
  color: #ffffffc0;
  padding: 30px 40px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
}
footer > * {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
}
.footer-logo {
  width: 92px;
  height: 32px;
}
.footer-links-top {
  display: flex;
  gap: 30px;
  margin-left: auto;
  margin-right: 40px;
}
.footer-socials,
.footer-socials-mobile {
  display: flex;
  gap: 20px;
}
.footer-socials a,
.footer-socials-mobile a {
  color: #fff;
  font-size: 18px;
  transition: color 0.2s;
}
.footer-socials a:hover,
.footer-socials-mobile a:hover {
  color: #ed2024;
}
.footer-top a {
  color: inherit;
  text-decoration: none;
}
.footer-top a:hover {
  color: #fff;
}
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 20px auto;
  max-width: 1200px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
}
.footer-mobile-bottom {
  display: none;
}
.mobile {
  display: none;
}
.footer-menu {
  display: flex;
  gap: 40px;
}
.footer-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-menu a:hover {
  color: #ed2024;
}
.footer-copyright {
  color: inherit;
  font-size: 14px;
}

/* ------------------------------------------- */
/* 8. MEDIA QUERIES PARA RESPONSIVE (MÓVIL Y TABLET) */
/* ------------------------------------------- */

/* --- TABLETS (Máx. 1024px de ancho) y MÓVILES --- */
@media (max-width: 1024px) {
  /* 1. Ocultamos los elementos de escritorio */
  .navbar .menu,
  .navbar .boton {
    display: none;
  }

  /* 2. Mostramos el ícono de hamburguesa */
  .burger-menu {
    display: block;
  }

  /* 3. Estilo del menú que se desliza/superpone (Oculto por defecto) */
  .navbar .menu {
    /* Posicionamiento y tamaño de pantalla completa */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Ocupa toda la altura de la vista */
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.4),
      #cc0000 70%
    ); /* Fondo rojo con degradado a blanco como la imagen */

    /* Layout del contenido (los enlaces) */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar verticalmente los enlaces */
    align-items: flex-end; /* Alinear a la derecha los enlaces */
    padding-right: 10%; /* Espacio a la derecha */

    /* Animación para ocultar/mostrar */
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 25; /* Debe estar por encima de todo, pero debajo del icono de cierre */
  }

  /* 4. Clase que se añade con JavaScript para MOSTRAR el menú */
  .navbar .menu.active {
    transform: translateX(0); /* Lo traemos a la vista */
    z-index: 1;
  }

  /* 5. Estilo de los enlaces dentro del menú móvil */
  .navbar .menu a {
    color: white; /* Color de texto blanco como en la imagen */
    text-decoration: none;
    font-size: 28px;
    font-weight: 600;
    padding: 15px 0;
    text-align: right; /* Asegura que el texto se alinee a la derecha */
    width: auto; /* Ancho automático para alineación */
    margin-right: 0; /* Sin margen para alinear bien */
  }

  /* Hero: Ajustar tamaño de encabezados */
  .content h1 {
    font-size: 2.8rem;
    line-height: 3.5rem;
    max-width: 90%;
  }
  .content p {
    width: 90%;
    text-align: center;
  }

  /* Who We Are: Ajustar tarjetas a 1 o 2 columnas */
  .imagenes {
    gap: 1.5rem;
    max-width: 90%;
  }
  .card-image {
    /* Permite 2 columnas en tablet */
    flex-basis: calc(50% - 0.75rem);
    max-width: 100%;
  }

  /* FIBEGA China: Se apila y se quita la superposición */
  .horizontal-section {
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }
  .image-section {
    max-width: 100%;
    width: 100%;
    border-radius: 32px 32px 0 0; /* Bordes redondeados arriba */
  }
  .image-section img {
    height: auto; /* Altura adaptable */
    max-height: 400px;
  }
  .text-section {
    /* Posicionamiento relativo/normal */
    position: relative;
    transform: none;
    left: 0;
    top: -70px;
    margin-top: -30px; /* Superposición sutil */
    width: 90%; /* Ancho responsivo */
    max-width: 435px; /* Mantiene un ancho máximo si es posible */
    padding: 30px;
  }

  /* Awards: Mantenemos el diseño de tabla, pero con textos más pequeños */
  .awards-header p {
    font-size: 1.125rem;
  }
  .award-item span {
    font-size: 1rem;
  }

  /* Contacto: Se apila en dos columnas */
  .contact-content-wrapper {
    gap: 40px;
    max-width: 90%;
    padding: 0 1.5rem;
  }
  .contact-info {
    padding-right: 0;
    max-width: 100%;
  }
  .contact-form {
    padding: 30px;
  }
  /* El botón y nombre se apilan en móvil */
  .name-submit-row {
    gap: 15px;
  }

  /* Footer: Se apilan los elementos */
  footer {
    padding: 30px 1.5rem;
    text-align: center;
  }
  .footer-top,
  .footer-bottom {
    gap: 15px;
  }
  .footer-top {
    padding-bottom: 15px;
  }
  .footer-links-top {
    margin: 0;
    order: 2; /* Mueve los enlaces legales debajo del logo */
  }
  .footer-socials {
    order: 3;
  }
  .footer-bottom {
    padding-top: 15px;
  }
  .footer-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- MÓVILES (Máx. 768px de ancho) --- */
@media (max-width: 768px) {
  /* Hero */
  .content h1 {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  .navbar {
    display: flex;
  }

  .navbar .menu {
    background: linear-gradient(
      to right,
      rgba(255, 28, 28, 0.753),
      #cc0000 70%
    );
    height: 190px;
    z-index: -1;
    padding-right: 30%;
  }

  .navbar .menu a {
    font-size: 18px;
    padding: 0;
    font-weight: 400;
  }

  .menu {
    gap: 22px;
  }

  /* Who We Are: Una sola columna */
  .card-image {
    /* Fuerza a que cada tarjeta ocupe su propia fila */
    flex-basis: 100%;
    max-width: 100%;
  }
  .imagenes .card-image img {
    height: auto; /* La imagen se vuelve más pequeña */
    max-height: 250px;
  }
  /* china */
  .text-section {
    top: -50px;
    padding: 20px;
    position: static;
    width: 100%;
  }
  .title p {
    text-align: center;
  }
  .boton-desktop {
    display: none;
  }
  .boton-movil {
    display: block;
    font-size: 20px;
  }
  .horizontal-section {
    flex-direction: column-reverse;
  }
  /* Awards: Ocultamos los títulos de las columnas */
  .awards-header h2 {
    text-align: center;
  }
  .awards-column-titles {
    display: none;
  }
  /* Ajustamos el padding de las filas */
  .award-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    gap: 5px;
    border-radius: 8px;
  }
  .award-item span {
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.4rem;
  }
  .award-item .winner-name {
    font-size: 0.85rem;
  }
  .view-more-container {
    display: flex;
    justify-content: center;
  }

  /* Contacto */
  .contact-content-wrapper {
    padding: 0 0.5rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .contact-form {
    padding: 20px;
  }

  .social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 0px;
    align-items: center;
    text-align: center;
  }
  .social-link {
    justify-content: center;
  }

  .send-button {
    padding: 15px;
  }

  /* Footer */
  .footer-links-top {
    gap: 20px;
  }
  .footer-socials,
  .footer-copyright,
  .footer-menu a:last-child {
    display: none;
  }
  .footer-bottom {
    justify-content: center;
  }
  .footer-mobile-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    gap: 30px;
  }
  .mobile {
    display: block;
  }
  .footer-copyright-mobile {
    text-align: end;
  }
}

/* Restaura el diseño de escritorio en pantallas grandes (1025px+) */
@media (min-width: 1025px) {
  /* Navbar */
  .menu {
    display: flex; /* Vuelve a mostrar el menú de navegación */
  }
  .navbar {
    padding: 0 40px; /* Restaura el padding original */
  }
  .content p {
    text-align: start; /* Restaura la alineación del párrafo en hero */
  }

  /* FIBEGA China */
  .horizontal-section {
    flex-direction: row; /* Restaura la fila */
    justify-content: flex-start;
    max-width: 100%;
  }
  .image-section {
    border-radius: 32px;
  }
  .text-section {
    position: relative;
    left: -170px;
    top: 33px;
    border-radius: 32px;
    width: 435px;
    margin-top: 0;
  }

  /* Contacto */
  .contact-content-wrapper {
    flex-direction: row;
    gap: 80px;
    max-width: 1000px;
    padding: 0;
  }
  .name-submit-row {
    flex-direction: row;
    gap: 20px;
  }
  .send-button {
    width: auto;
  }

  /* Footer */
  footer {
    padding: 30px 40px;
  }
  .footer-top,
  .footer-bottom {
    flex-direction: row;
    gap: 0;
  }
  .footer-links-top {
    margin-left: auto;
    margin-right: 40px;
  }
}

