/* Variables CSS */
:root {
--primario-claro: #2E5AC1;
  --primario: #062059;
  --primario-oscuro: #04153A;
  --primario-casi-blanco: #f8f9fa;
  --secundario: #34495e;

  --texto:#212529;

  --gris-1: #495050;
  --gris-2: #555;
  --gris-3: #a4acaf;
  --gris-4: #bdbdbd;
  --gris-5: #e0e0e0;
  --gris-6: #f5f5f5;
  --gris-claro: #f5f5f5;

  --spacing-xxs: 0.25rem; /* 4px */
  --spacing-xs: 0.5rem; /* 8px */
  --spacing-sm: 0.75rem; /* 12px */
  --spacing-md: 1rem; /* 16px */
  --spacing-lg: 1.333rem; /* 21px */
  --spacing-xl: 1.777rem; /* 28px */
  --spacing-2xl: 2.369rem; /* 38px */
  --spacing-3xl: 3.157rem; /* 50px */
  --spacing-4xl: 4.209rem; /* 67px */
  --spacing-5xl: 5.612rem; /* 90px */
  --spacing-6xl: 7.481rem; /* 120px */

  /* Añadiendo variables de tamaño de fuente */
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-md: 1rem; /* 16px */
  --font-size-lg: 1.333rem; /* 21px */
  --font-size-xl: 1.777rem; /* 28px */
  --font-size-2xl: 2.369rem; /* 38px */
  --font-size-3xl: 3.157rem; /* 50px */
  --font-size-4xl: 4.209rem; /* 67px */
  --font-size-5xl: 5.612rem; /* 90px */
  --font-size-6xl: 7.481rem; /* 120px */
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.offscreen {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

svg {
  display: inline-block;
  font-size: inherit;
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--primario-oscuro);
  color: var(--texto);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
    text-underline-offset: 0.2em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Header */
.header {
  padding: 0;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 99999;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  position: relative;
  padding: 1rem 0;
   transition: padding 0.3s ease;
}

/* Bloque 1: Logo */
.logo {
  display: block;
  flex-shrink: 0;
      
}

.logo img {
  /*min-width: 150px;
  max-width: 200px;*/
 /* width:125px;*/
  height: 99px;
  transition: height 0.3s ease;
      
}
@media(min-width:1100px){
    .scrolled .logo img {
        height: 70px;
    }
    .scrolled .header-content {
        padding: 0.5rem 0;
    }
}
@media(max-width:1099px){
    .logo img {
        height: 80px;
    }
    .header-content {
        padding: 0.5rem 0;
    }
}

/* Menú hamburguesa - Solo visible en móvil */
.menu-toggle {
  display: none;
}

.menu-button {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 200;
}

.menu-button span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primario);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Bloque 2: Navegación principal */
.main-nav {
  display: flex;
  flex: 1;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  margin-bottom:0;
}

.main-nav a {
  font-weight: 500;
  color: var(--gris-2);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  text-transform: uppercase;
}

    .main-nav a[role="button"] {
        cursor:pointer;
    }

.main-nav a:hover {
  color: var(--primario);
  text-decoration: none;
}

/* Icono de búsqueda */
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

/* Dropdown menu styles */
.haspopup {
  position: relative;
}

.midropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  border: 1px solid var(--gris-5);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.midropdown ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.midropdown li {
  margin: 0;
  width: 100%;
}

.midropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--primario-oscuro);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  width: 100%;
  text-align: left;
  line-height: 1.4;
}

.midropdown a:hover {
  background-color: var(--primario-casi-blanco);
  color: var(--primario);
}

/* Show dropdown on hover and focus */
.haspopup:hover .midropdown,
.haspopup:focus-within .midropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Bloque 3: Redes sociales */
.social-links {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  transition: opacity 0.3s ease;
}

.social-links a:hover {
  opacity: 0.7;
}

.social-links img {
  width: 20px;
  height: 20px;
}

.nav-li-hack{
display:none;
}

/* Responsive Design */
@media (max-width: 1100px) {
  .header-content {
    gap: 1rem;
  }

  .main-nav ul {
    gap: 0.75rem;
  }

  .main-nav a {
    font-size: var(--font-size-sm);
  }

  .nav-li-hack{
    display:block;
    }
}

@media (max-width: 1100px) {
  .menu-button {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 100;
    padding: 80px 20px 20px;
    justify-content: flex-start;
    overflow-y: auto;      
    overflow-x: hidden;    
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    width: 100%;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 10px 0;
    font-size: var(--font-size-lg);
    color: var(--primario);
    width: 100%;
  }

  .main-nav a:hover {
    color: var(--primario-oscuro);
  }

  .menu-toggle:checked ~ .main-nav {
    right: 0;
  }

  .menu-toggle:checked ~ .menu-button span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .menu-toggle:checked ~ .menu-button span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked ~ .menu-button span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Mobile styles for dropdown */
  .midropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: var(--gris-6);
    margin-top: 0.5rem;
    border-radius: 4px;
  }

  .midropdown ul {
    display: flex;
    flex-direction: column;
  }

  .midropdown a {
    padding: 0.5rem 1rem !important;
    font-size: var(--font-size-md);
    text-align: left;
  }

  /* Ocultar redes sociales en móvil o moverlas al menú */
  .social-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .logo img {
    /*min-width: 120px;
    max-width: 150px;*/
  }
}

/* Añadiendo estilos para hero con video */
/* ===== ESTILOS PARA HERO CON VIDEO ===== */

.page-hero-video {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Versión móvil con aspect-ratio 4:3 */
@media (max-width: 767px) {
  .page-hero-video {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
@media (min-width: 768px) {
  .page-hero-video {
    height: calc(95vh - 90px);
  }
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Imagen de fallback para usuarios con prefers-reduced-motion */
.hero-video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: none;
}

.hero-video-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mostrar fallback cuando prefers-reduced-motion está activo */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero-video-fallback {
    display: block;
  }
}

/* Overlay para mejorar legibilidad del texto */
.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  background: transparent;
  background: rgba(255, 255, 255, 0);
  z-index: 2;
}

/* Ajustar el contenido del hero para video */
.page-hero-video .hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: var(--spacing-lg) 0;
}

.page-hero-video .hero-title {
  color: white;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 -2px 8px rgba(0, 0, 0, 0.8);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 -2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}

/* Responsive para hero con video */
@media (max-width: 768px) {
  .page-hero-video .hero-title {
    font-size: var(--font-size-xl);
    padding: 0 var(--spacing-md);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 -2px 6px rgba(0, 0, 0, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 -2px 4px rgba(0, 0, 0, 0.6);
  }
}

@media (max-width: 480px) {
  .page-hero-video .hero-title {
    font-size: var(--font-size-lg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1), 0 -2px 4px rgba(0, 0, 0, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 -2px 4px rgba(0, 0, 0, 0.6);
  }
}

/* Control de video para accesibilidad */
.video-controls {
  position: absolute;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 10;
  display: flex;
  gap: var(--spacing-xs);
}

.video-control-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primario);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-control-btn:hover {
  background: white;
  transform: scale(1.1);
}

.video-control-btn svg {
  width: 16px;
  height: 16px;
}

/* Ocultar controles en dispositivos con prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .video-controls {
    display: none;
  }
}

/* Responsive para controles de video */
@media (max-width: 768px) {
  .video-controls {
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
  }

  .video-control-btn {
    width: 36px;
    height: 36px;
  }

  .video-control-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ===== SECCIONES DE CONTENIDO ===== */
.section {
  padding: var(--spacing-4xl) 0;
}
.section-centro h2,
.section-centro .container > .parrafada
{
  text-align:center;
}
.section-centro .container> .parrafada{
  max-width: 80ch;
  margin-inline:auto;
}
@media(min-width:768px){
  .section-centro .container> .parrafada{
    font-size:var(--font-size-lg);
  }
}

.section-centro .container a.btn {
    margin-inline:auto;
    display:block;
    width:fit-content;
    color:var(--primario);
    border-color:var(--primario);
}
.section-centro .container :is(a.btn:hover, a.btn:focus) {
    
    color:#fff;
    background:var(--primario);
    border-color:var(--primario);

}

/* Sección con fondo blanco */
.section.light {
  background-color: white;
}

/* Sección con fondo gris claro */
.section.gray {
  background-color: var(--gris-6);
}

/* Sección con fondo primario */
.section-primary {
  background-color: var(--primario);
  color: white;
}

.section-primary .btn-primary {
  color: white;
  background-color: transparent;
  border-color: white;
}

.section-primary .btn-primary:hover {
  background-color: white;
  color: var(--primario);
}

.section-light{
background:var(--gris-6);
}

.section-light .btn-primary {
  color: white;
  background-color: var(--primario);
  border-color: var(--primario);
}

.section-light .btn-primary:hover {
  background-color: var(--primario-oscuro);
  border-color: var(--primario-oscuro);
}

.section h2 {
  color: var(--primario);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
}

.section .parrafada {
  color: var(--primario-oscuro);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
}

.section-primary .parrafada,
.section-primary h2{
color:#fff;
}

/* Contenedor de dos columnas */
.section-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl) var(--spacing-lg);
}

@media (min-width: 768px) {
  .section-content {
    flex-direction: row;
    gap: var(--spacing-2xl);
  }

  .section-content > .texto,
  .section-content > .items {
    flex: 1;
  }

  .section-content > .texto{
    max-width:45ch;
  }

  .section-content > .items:not(.items-two-columns) {
    align-self: center;
  }
}

/* Bloque de texto */
.texto h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.parrafada {
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.parrafada p {
  margin-bottom: var(--spacing-md);
}

.parrafada ul,
.parrafada ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.parrafada li {
  margin-bottom: var(--spacing-sm);
  list-style: disc;
}

.parrafada ol li {
  list-style: decimal;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
}

.btn-primary {
  border: 2px solid white;
}

/* Bloque de items - Primera sección (4 iconos en fila) */
.items {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
    align-items: flex-start;
  gap: var(--spacing-xl) var(--spacing-lg);
}

.items .item {
  flex: 1 1 calc(50% - var(--spacing-lg));
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .items .item {
    flex: 1 1 calc(25% - var(--spacing-lg));
  }
}

.items .item .witicon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
}

.items .item h3 {
  font-size: var(--font-size-md);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0;
}

/* Items con dos columnas - Segunda sección */
.items-two-columns {
  flex-direction: column;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.items-two-columns .item {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: var(--spacing-md);
}

.items-two-columns .item .witicon {
  font-size: var(--font-size-4xl);
  margin-bottom: 0;
  flex-shrink: 0;
}

.items-two-columns .item-content {
  flex: 1;
}

.items-two-columns .item-content h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

.items-two-columns .item-content p {
  margin: 0;
  line-height: 1.6;
}

@media (min-width: 767px) {
  .items-two-columns {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .items-two-columns .item {
    flex: 1 1 calc(50% - var(--spacing-lg));
    min-width: 30ch;
  }
}

.enlace-ini-ser {
    font-weight:500;
    display:block;
    width:fit-content;
    color:var(--primario);
    margin-top:var(--spacing-xxs);
    text-transform:uppercase;
    text-decoration:underline;
}

/* Responsive para secciones */
@media (max-width: 767px) {
  .section {
    padding: var(--spacing-2xl) 0;
  }

  .texto h2 {
    font-size: var(--font-size-xl);
  }

  .items .item .witicon {
    font-size: 3rem;
  }
}

/* Grid de sectores */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.grid ul {
  display: contents;
}

.grid li {
  position: relative;
  background-color: white;
 
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: center;
}
.grid-borde li{
 border: 1px solid var(--gris-5);
  border-radius: 8px;
}

.grid li:hover {
 transform: translateY(-4px);
}

.grid-borde li:hover{
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  
}

.grid li .witicon {
  font-size: var(--font-size-6xl);
  color: var(--primario);
}

.grid li h3 {
  font-size: var(--font-size-lg);
  color: var(--primario);
  margin: 0;
  line-height: 1.4;
  text-transform:uppercase;
}

.grid li .parrafada {
  font-size: var(--font-size-md);
  color: var(--gris-2);
  margin-bottom: 0;
  flex-grow: 1;
}
.grid li .parrafada >*:last-child{
  margin-bottom:0;
  }


 .btn-outline-primary {
  color: var(--primario);
  background-color: transparent;
  border: 2px solid var(--primario);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  
  z-index: 1;
}

 .btn-outline-primary:hover {
  background-color: var(--primario);
  color: white;
}

/* Truco del pseudoelemento ::after para hacer hover sobre todo el li */
.grid li .btn-outline-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.grid li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

/* Carrusel de clientes */
.carrusel {
  margin-top: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  overflow: hidden;
}

.carrusel-track {
  position: relative;
  overflow: hidden;
}

.carrusel ul {
  display: flex;
  gap: var(--spacing-2xl);
  transition: transform 0.5s ease;
  will-change: transform;
}

.carrusel li {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
}

.carrusel li a {
  display: block;
  width: 100%;
  height: 100%;
}

.carrusel li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.carrusel li img:hover {
  transform: scale(1.05);
}

/* Controles del carrusel (solo visibles con prefers-reduced-motion) */
.carrusel-controls {
  display: none;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

@media (prefers-reduced-motion: reduce) {
  .carrusel-controls {
    display: flex;
  }
}

.carrusel-btn {
  background-color: var(--primario);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carrusel-btn:hover {
  background-color: var(--primario-oscuro);
  transform: scale(1.1);
}

.carrusel-btn svg {
  width: 20px;
  height: 20px;
}

/* Responsive para grid */
@media (max-width: 767px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .carrusel li {
    width: 150px;
    height: 150px;
  }
}



.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.news-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Cambiar el color del título al hacer hover en la card */
.news-card:hover .news-title-link {
  color: var(--primario-oscuro);
}

.news-image {
  height: 180px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-content {
  padding: var(--spacing-md);
  position: relative;
  z-index: 2;
}

.news-date {
  color: var(--primario-claro);
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
}

/* Estilos para el enlace del título */
.news-title-link {
  color: var(--primario);
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-title-link:hover {
  color: var(--primario-oscuro);
  text-decoration:none;
}

/* Pseudoelemento que hace toda la card clickeable */
.news-title-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.news-content p {
  color: #666666; /* Color gris para texto de noticias */
}




.project-sponsors-wrapper {
  background-color: white;
  padding: var(--spacing-xl) 0;
  padding-bottom: var(--spacing-4xl);
  color: var(--primario);
}

.project-info {
  margin-bottom: var(--spacing-lg);
  text-align:center;
}

.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
}

.sponsor-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sponsor-logo:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

@media (max-width: 767px) {
    .sponsor-logos {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .sponsor-logo {
        height: 80px;
    }
}


/* Footer Principal */
.main-footer {
  background-color: var(--primario);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-lg) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

/* Solo mostrar 4 columnas cuando hay espacio suficiente */
@media (min-width: 1100px) {
  .footer-content {
    grid-template-columns: repeat(5, 1fr);
  }
}

.footer-section .titulo {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 1.2rem;
  border-bottom: 2px solid var(--primario-claro);
  border-bottom: 2px solid var(--primario-casi-blanco);
  padding-bottom: var(--spacing-xs);
}

.footer-logo {
  margin-bottom: var(--spacing-md);
}
@media (max-width: 1099px) {
  .footer-logo img {
    margin-inline: auto;
  }
  .footer-logo + p {
    max-width: 40ch;
    margin-inline: auto;
  }
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
  text-underline-offset: 0.4em;
  text-decoration:underline;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-item {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.contact-item strong {
  color: white;
}

.contact-item a {
  color: var(--primario-muy-claro);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: white;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-social-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-social-link:hover {
  color: white;
  
}

.footer-social-link img {
  filter: brightness(0) invert(1) opacity(0.8);
  transition: filter 0.3s ease;
}

.footer-social-link:hover img {
  filter: brightness(0) invert(1);
}


.footer-social-row{
    list-style:none;
    display:flex;
    gap:var(--spacing-xs);
    justify-content:flex-start;
    align-items: center;
}


/* Responsive para footer principal */
@media (max-width: 1099px) {
  .footer-content {
    gap: var(--spacing-md);
  }

  .footer-section {
    text-align: center;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
  }

  .contact-info {
    align-items: center;
  }

  .footer-social {
    align-items: center;
  }

  .footer-social-row{
    
    justify-content:center;
    }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}







/* Footer */
.footer {
  padding: var(--spacing-md) 0;
  background-color: var(--primario-oscuro);
  color: white;
}

.legal-links {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
}

.legal-links a {
  color: #ddd;
}

.legal-links a:hover {
  color: #fff;
  text-underline-offset: 0.4em;
}



@media (max-width: 768px) {
    .legal-links {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }
}


a.a-wa {
    display: block;
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 999999;
    padding: 0.75rem;
    background: #fff;
    background: rgba(255,255,255,.5);
    background: rgba(50,50,50,.5);
    background: none;
    border-radius: 50%;
}






/* Hero Section a pantalla completa */
.page-hero {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media(min-width:768px) {
    .page-hero.mantener-proporciones {
        height:calc(95vh - 156px);
    }
}
.page-hero.object-position-top .hero-image img {
    object-position: top;
}



.page-hero-tc {
    align-items: flex-start;
    justify-content: center;
}
.page-hero-tr {
    align-items: flex-start;
    justify-content: flex-end;
}
.page-hero-cr {
    align-items: center;
    justify-content: flex-end;
}
.page-hero-br {
    align-items: flex-end;
    justify-content: flex-end;
}
.page-hero-bc {
    align-items: flex-end;
    justify-content: center;
}
.page-hero-bl {
    align-items: flex-end;
    justify-content: flex-start;
}
.page-hero-cl {
    align-items: center;
    justify-content: flex-start;
}
.page-hero-tl {
    align-items: flex-start;
    justify-content: flex-start;
}
.page-hero-offscreen .hero-content {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
:is( .page-hero-tl, .page-hero-cl, .page-hero-bl ) .hero-title {
    text-align:left;
}



/* Versión móvil con aspect-ratio 3:4 */
@media (max-width: 768px) {
  .page-hero {
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 2;
  width: 100%;
  /*background: rgba(48, 96, 144, 0.8);*/
  padding: var(--spacing-lg) 0;
}

.hero-title {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 -2px 4px rgba(0, 0, 0, 0.6);
  line-height:1.2
}


.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 38, 60, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}





@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
    padding: 0 var(--spacing-md);
  }

  
}



@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    
}



/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: var(--spacing-lg);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-xs);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--font-size-sm);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  color: var(--texto);
}

.breadcrumbs li:not(:last-child)::after {
  content: ">";
  margin-left: var(--spacing-xs);
  color: var(--gris-4);
}

.breadcrumbs a {
  color: var(--resaltado2);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--primario);
  text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
  color: var(--gris-3);
  font-weight: 500;
}



/* Estilos del modal de búsqueda */
.search-modal {
    /* Variables locales del modal */
    --modal-fondo: rgba(0, 0, 0, 0.85);
    --modal-texto: #ffffff;
    --modal-borde: #333;
    --modal-hover: rgba(255, 255, 255, 0.1);
    
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-fondo);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.search-modal.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10vh;
}

.search-container {
    width: 100%;
    max-width: 700px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 20px 60px 20px 20px;
    font-size: 24px;
    border: 2px solid var(--modal-borde);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--modal-texto);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--modal-texto);
    background-color: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--modal-texto);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.search-close:hover {
    opacity: 1;
}

.search-results {
    width: 100%;
    max-width: 700px;
}

.search-result-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--modal-borde);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: var(--modal-hover);
    border-color: var(--modal-texto);
    transform: translateX(5px);
}

.search-result-type {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.search-result-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--modal-texto);
    margin-bottom: 8px;
}

.search-result-snippet {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.search-no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    padding: 40px 20px;
}

.search-loading {
    text-align: center;
    color: var(--modal-texto);
    font-size: 18px;
    padding: 40px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-input {
        font-size: 18px;
        padding: 15px 50px 15px 15px;
    }
    
    .search-result-title {
        font-size: 18px;
    }
    
    .search-modal.active {
        padding-top: 5vh;
    }
}


.search-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

        padding-block: 0.5rem;
}

.search-icon:hover {
    opacity: 0.7;
}

.search-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}