{% load static %}
/* ================= VARIABLES ================= */
:root {
    --gef-blue-dark: #0D4E75;      /* Azul oscuro GEF */
    --gef-green-light: #98D066;    /* Verde claro bordes/detalles */
    --gef-text-white: #FFFFFF;
    --gef-text-body: #C5D8E3;
    --font-main: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-main);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* ================= LOADER (Corregido) ================= */
.site-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1A4381 0%, #143c77 50%, #153769 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.site-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  position: relative;
}

.loader-logo {
  width: 260px;
  height: auto;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 2;
}

.loader-text {
  margin-top: 30px;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  animation: pulse 2s ease-in-out infinite;
}

/* Animaciones */
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes float {
  0%, 100% {
      transform: translateY(0px);
  }
  50% {
      transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
      opacity: 1;
  }
  50% {
      opacity: 0.5;
  }
}

@keyframes pulse2 {
0%, 100% {
    transform: scale(1);
}
50% {
    transform: scale(1.05);
}
}

/* Responsive */
@media (max-width: 768px) {
  .loader-logo {
      width: 180px;
  }
  
  .loader-text {
      font-size: 1rem;
      margin-top: 25px;
  }
}

@media (max-width: 576px) {
    .loader-logo {
        width: 180px;
    }
    
    .loader-text {
        font-size: 0.9rem;
        margin-top: 20px;
    }
    .hero-image-side {
        height: 150px; /* Aún más corto en celulares pequeños */
    }
    .brand-logo img {
        width: 110px;  /* Logo proporcional */
    }
    .hero-title {
        font-size: 1.8rem;
    }

}


/* ================= HERO (SPLIT DESIGN) ================= */
.gef-hero-wrapper {
    display: flex;
    /* min-height: 100vh; */
    position: relative;
    flex-wrap: wrap; /* Para responsive */
}

/* Izquierda: Imagen Playa */
.hero-image-side {
width: 30%;
    background-image: url('../img/left_banner.jpg');
    background-size: cover;
    background-position: center;
    min-height: 300px;
    
    /* NUEVAS PROPIEDADES PARA ALINEAR EL LOGO */
    display: flex;
    justify-content: center; /* Centra el logo horizontalmente */
    align-items: flex-start; /* Alínea el logo arriba */
    padding-top: 40px;       /* Mismo padding superior que el lado derecho para igualar altura */
}

/* Derecha: Contenido Azul */
.hero-content-side {
    width: 70%;
    background: linear-gradient(135deg, var(--gef-blue-dark) 30%, #15668a 100%);
    padding: 40px 60px; /* Este 40px dicta la altura inicial, por eso pusimos 40px a la izq */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Navbar dentro del Hero */
.gef-navbar { margin-bottom: 60px; z-index: 10; width: 100%;}
.brand-logo img { width: 260px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.nav-links { gap: 30px; }
.nav-links a {
    color: var(--gef-text-white);
    font-size: 0.85rem; font-weight: 700;
}

/* Textos Hero */
.hero-text-container {
    max-width: 800px; z-index: 5; margin-top: 20px;
}
.hero-title {
    font-size: 3.5rem; font-weight: 800; color: white;
    line-height: 1.1; margin-bottom: 30px;
}
.hero-description {
    color: var(--gef-text-body); font-size: 1rem; line-height: 1.6;
    max-width: 90%; text-align: justify;
}

/* Decoración Red de fondo */
.geometric-overlay {
    position: absolute; bottom: -50px; right: -50px;
    width: 400px; height: 400px;
    background-image: radial-gradient(circle, rgba(152, 208, 102, 0.2) 2px, transparent 2px);
    background-size: 20px 20px; /* Simula puntos */
    opacity: 0.5; pointer-events: none;
}

/* ================= CARDS SECTION ================= */
.gef-cards-section {
    padding: 80px 0; background-color: #fff;
}
.section-title {
    color: #4A6F85; font-weight: 800; margin-bottom: 50px;
}
.gef-card-item {
    display: flex; flex-direction: column; align-items: center;
}
.gef-card-item:hover .gef-card-circle { transform: translateY(-5px); border-color: var(--gef-blue-dark); }

.gef-card-circle {
    width: 130px; height: 130px;
    border-radius: 50%;
    background-color: #DAE4F0;
    border: 6px solid #aace7777; /* Borde verde característico */
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.gef-card-circle img { width: 65%; height: auto; opacity: 0.8; }
.gef-card-label {
    color: #3F7C99; font-weight: 700; font-size: 0.9rem;
}

/* ================= GEOPORTAL SECTION ================= */
.gef-geoportal-section {
    background-color: #1A3E52; /* Azul oscuro mate */
    padding: 30px 0;
    border-top: 4px solid #3FBCC9; /* Linea superior cyan */
    color: white; overflow: hidden;
}
.geoportal-map-img { height: 300px; }
.geoportal-title { font-weight: 800; font-size: 2.2rem; line-height: 1.1; }
.dotted-separator {
    height: 3px; background-color: var(--gef-green-light);
    width: 50px; margin: 20px 0 20px auto;
}

/* ================= FOOTER ================= */
.gef-footer {
    background-color: var(--gef-blue-dark);
    padding: 60px 0; color: white; position: relative; overflow: hidden;
}
.footer-brand { font-weight: 800; margin-bottom: 20px; }
.footer-list li { margin-bottom: 8px; }
.footer-list a { color: #B0C4D1; font-size: 0.9rem; }
.footer-list a:hover { color: white; }
.footer-heading { font-size: 0.9rem; font-weight: 700; margin-bottom: 15px; }
.social-icons { display: flex; gap: 15px; }
.footer-corner-logo {
    position: absolute; bottom: -30px; right: -30px; opacity: 0.1; width: 200px;
}

/* ================= MOBILE MENU TOGGLE ================= */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Separa las líneas uniformemente */
    width: 30px;      /* Ancho fijo */
    height: 21px;     /* Alto fijo para que no se vea aplastado */
    background: transparent; /* IMPORTANTE: Quita el fondo gris */
    border: none;     /* IMPORTANTE: Quita el borde de botón */
    padding: 0;
    cursor: pointer;
    position: relative; /* Necesario para que z-index funcione */
    z-index: 10000;     /* Debe ser mayor que el menú (.nav-links tiene 999) */
    outline: none;    /* Quita el recuadro azul de selección en algunos navegadores */
}

/* Estilo de las 3 líneas */
.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;      /* Grosor de la línea */
    background-color: white; /* Color de las líneas */
    border-radius: 3px;
    transition: all 0.3s ease; /* Suaviza la animación si agregas JS después */
}

/* Opcional: Efecto hover para UX */
.mobile-menu-toggle:hover span {
    background-color: var(--gef-green-light);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
    
    .gef-hero-wrapper { 
        flex-direction: column; 
    }

    /* BANNER SUPERIOR (Imagen recortada) */
    .hero-image-side { 
        width: 100%;
        height: 120px;          /* Altura fija del banner (ajusta si lo quieres más delgado) */
        min-height: 0;          /* ¡CRÍTICO! Elimina el min-height de 300px del escritorio */
        padding-top: 0;         /* Sin padding extra */
        
        /* Alineación del logo */
        display: flex;
        align-items: center;    /* Centra el logo verticalmente */
        justify-content: center;/* Centra el logo horizontalmente */
        
        /* Comportamiento de la imagen de fondo */
        background-size: cover;    /* Cubre todo el ancho */
        background-position: 0% 0%; /* Se recorta arriba y abajo automáticamente */
    }
    
    /* Logo ajustado para el banner */
    .brand-logo img {
        width: 220px;           /* Tamaño ideal para banner de 160px */
        filter: drop-shadow(0 4px 4px rgba(0,0,0,0.6)); /* Sombra fuerte para legibilidad */
    }

    /* Contenido (Texto) */
    .hero-content-side { 
        width: 100%; 
        padding: 40px 25px;     /* Menos padding lateral en móvil */
        min-height: auto;       /* Dejar que crezca según el texto */
    }
    
    .hero-title { 
        font-size: 2rem; 
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
    }

    /* Ajustes generales móvil */
    .gef-navbar {
        margin-bottom: 20px;
        justify-content: flex-end !important; /* Mantiene botón hamburguesa a la derecha */
    }

    .geoportal-text-col { 
        text-align: center !important; 
        margin-top: 25px; 
    }
    
    .dotted-separator { 
        margin: 20px auto; 
    }

    /* Estilos del menú cuando está oculto en móvil */
    .nav-links {
        /* Se convierte en un menú superpuesto de pantalla completa */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #103348; /* Fondo oscuro sólido para el menú */
        z-index: 999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        
        /* Ocultar inicialmente, mover fuera del viewport */
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out; 
    }

    /* Estado ACTIVO: el menú entra en la pantalla */
    .nav-links.nav-active {
        transform: translateX(0);
        display: flex; /* Asegura que los elementos se muestren */
    }
    
    /* Estilos de los enlaces del menú activo */
    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--gef-text-white);
        opacity: 0; /* Ocultar enlaces inicialmente para animarlos después */
        transition: opacity 0.5s ease 0.3s; /* Retrasar la aparición de los enlaces */
    }
    
    .nav-links.nav-active a {
        opacity: 1; /* Mostrar enlaces cuando el menú está activo */
    }
    
    /* Animación del botón hamburguesa para transformarse en X */
    .mobile-menu-toggle span:nth-child(1) {
        transform-origin: 0% 100%;
    }
    .mobile-menu-toggle span:nth-child(3) {
        transform-origin: 0% 0%;
    }

    .mobile-menu-toggle.toggle-active span:nth-child(1) {
        transform: rotate(40deg) translate(0px, -1px);
    }
    .mobile-menu-toggle.toggle-active span:nth-child(2) {
        opacity: 0; /* Oculta la línea central */
    }
    .mobile-menu-toggle.toggle-active span:nth-child(3) {
        transform: rotate(-40deg) translate(0px, 1px);
    }

}