@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --verde-corporativo: #72BE44;
    --verde-hover: #5fa836;
    --azul-oscuro: #002A3F;
    --azul-oscuro-contraste: #001824;
    --blanco: #FFFFFF;
    --blanco-secundario: #f9f9f9;
    --gris-100: #f5f5f5;
    --gris-200: #e5e5e5;
    --gris-300: #d4d4d4;
    --gris-500: #737373;
    --gris-700: #404040;
    --gris-900: #171717;
    --sombra-sm: 0 1px 2px rgba(0,0,0,0.05);
    --sombra-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --sombra-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --sombra-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gris-900);
    background-color: var(--blanco);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

#loader-page-container {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--blanco) 0%, var(--gris-100) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-page-container.hidden {
    opacity: 0;
    visibility: hidden;
}

#loader-page {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gris-200);
    border-top-color: var(--verde-corporativo);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transicion);
    box-shadow: var(--sombra-sm);
}

#navbar.scrolled {
    height: 70px;
    box-shadow: var(--sombra-md);
}

#navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--verde-corporativo), transparent);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

#contenedor-logoPrincipal {
    height: 60px;
    transition: var(--transicion);
    display: flex;
    align-items: center;
}

#navbar.scrolled #contenedor-logoPrincipal {
    height: 50px;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-logos a {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(114, 190, 68, 0.1);
    border-radius: 12px;
    transition: var(--transicion);
}

.header-logos a:hover {
    background: rgba(114, 190, 68, 0.2);
    transform: translateY(-2px);
}

.header-logo {
    height: 60px;
    width: auto;
}

.header-talleres {
    font-size: 1.9rem;
    font-weight: 700;
    color: #2a5e36;
    border-radius: 8px;
    background: rgba(114, 190, 68, 0.1);
    text-align: center;
}

#idioma-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bandera {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transicion);
}

.bandera:hover {
    background-color: var(--gris-100);
    transform: scale(1.1);
}

.bandera img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--sombra-sm);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--verde-corporativo);
    border-radius: 2px;
    transition: var(--transicion);
}

main {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
}

@media (max-width: 1024px) {
    #navbar.scrolled {
        height: 70px;
    }

    main {
        padding-top: 70px;
    }
}

@media (max-width: 640px) {
    .navbar-container {
        padding: 0 1rem;
    }

    #contenedor-logoPrincipal {
        height: auto;
        padding: 0.5rem 0;
    }

    .header-logos {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-logo {
        height: 35px;
    }

    .header-talleres {
        font-size: 1.9rem;
        padding: 0.25rem 0.5rem;
    }

    .bandera img {
        width: 28px;
        height: 18px;
    }
}
