/* Diseñado y desarrollado por ORBEN */

:root {
    --color-primario: #264954;
    --color-secundario: #d0d6e0;
    --color-fondo: #f4f4f9;
    --color-texto-principal: #333333;
    --color-texto-secundario: #ffffff;
    --color-negro: #000000;
    --color-blanco: #DFDFF0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-texto-principal);
    background-color: var(--color-fondo);
}

/* --- Barra de Navegación --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.5rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.4s ease-out;
    border-bottom: 1px solid var(--color-secundario);
}

.main-nav.scrolled {
    transform: translateY(0);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--color-primario);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    padding: 1rem;
    text-decoration: none;
    color: var(--color-texto-principal);
    font-weight: 700;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--color-primario);
}

/* --- Header con altura completa al inicio --- */
.parallax-header {
    height: 100vh;
    background-image: url('../images/header.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-blanco);
    position: relative;
}

.parallax-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.header-content p {
    font-size: 1.5rem;
    font-weight: 300;
}

.content-section {
    min-height: 80vh;
    padding: 6rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--color-blanco);
    overflow: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content-section .section-background {
    position: absolute;
    top: -5%; left: -5%;
    width: 110%; height: 110%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease-out;
    z-index: -1;
}

.content-section:hover .section-background {
    transform: scale(1.05);
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* --- Clases para animación de scroll --- */
.hidden-section {
    opacity: 0;
    transform: translateY(30px);
}


#mision { background-image: url('../images/ayuda.jpg'); }
#pai { background-image: url('../images/pai.jpg'); }
#programa { background-image: url('../images/brain.jpg'); }
#mantencion { background-image: url('../images/separacion.jpg'); }
#contacto { background-image: url('../images/tren.jpg'); }

.section-container {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.section-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-container p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--color-primario);
    color: var(--color-blanco);
    border: 2px solid var(--color-blanco);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--color-blanco);
    color: var(--color-primario);
    transform: translateY(-3px);
}

/* --- Modal para imagen --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-texto-principal);
    color: var(--color-fondo);
    padding: 1.5rem 2rem;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.footer-column h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-blanco);
}

.footer-column p, .footer-column a {
    color: var(--color-secundario);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--color-blanco);
}

.social-links a {
    margin-right: 1rem;
    font-size: 1rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: var(--color-secundario);
    position: relative;
}

/* --- Badge ISO --- */
.iso-badge {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 60px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.iso-badge:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* --- Responsividad --- */

@media (max-width: 768px) {
    .main-nav {
        padding: 0.5rem 1rem;
    }
    .main-nav ul {
        display: none;
    }

    .nav-logo {
        height: 40px;
    }

    .header-content h1 {
        font-size: 2.5rem;
    }

    .header-content p {
        font-size: 1.2rem;
    }

    .content-section {
        min-height: 60vh;
        padding: 4rem 1rem;
    }

    .section-container h2 {
        font-size: 2rem;
    }

    .section-container p {
        font-size: 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .iso-badge {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 1rem auto;
        display: block;
        height: 50px;
    }

    .iso-badge:hover {
        transform: scale(1.1);
    }
}

/* --- Estilos de la Página de Documento --- */
.document-page {
    background-color: var(--color-fondo);
}

.document-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
    background-color: var(--color-blanco);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-top: 2rem; 
    margin-bottom: 4rem;
}

.document-container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primario);
    line-height: 1.2;
    text-align: center;
}

.document-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-texto-principal);
    border-bottom: 2px solid var(--color-secundario);
    padding-bottom: 0.5rem;
}

.document-container p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    color: var(--color-texto-principal);
}

.document-container strong {
    color: var(--color-primario);
    font-weight: 700;
}

/* Imagen centrada en documento */
.document-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 3rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 150px;
    right: 20px;
    background-color: #25d366;
    border-radius: 50px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}