/* ===== VARIABLES DE COLOR ===== */
/* ¡Puedes cambiar estos colores para que coincidan con los de tu colegio! */
:root {
    --color-primario: #005a9c; /* Un azul "tecnológico" */
    --color-primario-oscuro: #003d6b;
    --color-secundario: #f0a500; /* Un acento en naranja/amarillo */
    --color-fondo: #f4f7f6;
    --color-texto: #333;
    --color-blanco: #ffffff;
    --fuente-principal: 'Roboto', sans-serif;
}

/* ===== RESETEO BÁSICO Y FUENTES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Para que el scroll al hacer clic en el menú sea suave */
}

body {
    font-family: var(--fuente-principal);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--color-primario);
}

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

.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0 2rem;
}

.section__title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--color-primario-oscuro);
}

.button {
    display: inline-block;
    background-color: var(--color-secundario);
    color: var(--color-primario-oscuro);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #ffc107;
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--color-blanco);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 100; /* Para que esté por encima de todo */
}

.nav {
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--color-primario-oscuro);
    font-size: 1.25rem;
}

.nav__logo img {
    width: 40px; /* Ajusta el tamaño de tu logo */
    height: 40px;
    margin-right: 0.5rem;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav__link {
    font-weight: 700;
    color: var(--color-primario);
    transition: color 0.3s ease;
}

.nav__link:hover {
    color: var(--color-secundario);
}

/* Botón de hamburguesa (inicialmente oculto en escritorio) */
.nav__toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-primario-oscuro);
}

/* ===== SECCIÓN HERO (INICIO) ===== */
.hero {
    /* Usa una foto grande y de buena calidad de fondo */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/fondo-hero.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh; /* Ocupa toda la altura de la pantalla */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 4rem; /* Para compensar el header fijo */
}

.hero__container {
    color: var(--color-blanco);
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero__subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* ===== SECCIÓN SOBRE NOSOTROS ===== */
.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about__img {
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.about__text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* ===== SECCIÓN PROYECTOS (TARJETAS) ===== */
.projects__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--color-blanco);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden; /* Para que la imagen no se salga del borde redondeado */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card__img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Asegura que la imagen cubra el espacio sin deformarse */
}

.card__content {
    padding: 1.5rem;
}

.card__title {
    font-size: 1.5rem;
    color: var(--color-primario-oscuro);
    margin-bottom: 0.5rem;
}

.card__description {
    font-size: 0.95rem;
}

/* ===== SECCIÓN GALERÍA ===== */
.gallery__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery__img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery__img:hover {
    transform: scale(1.05);
}

/* ===== SECCIÓN CONTACTO ===== */
.contact__container {
    text-align: center;
    background-color: var(--color-blanco);
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact__container p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

/* ===== PIE DE PÁGINA ===== */
.footer {
    background-color: var(--color-primario-oscuro);
    color: var(--color-fondo);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    font-size: 0.9rem;
}

/* ===== DISEÑO RESPONSIVO (PARA CELULARES) ===== */
@media screen and (max-width: 768px) {
    /* Muestra el botón de hamburguesa */
    .nav__toggle {
        display: block;
    }

    /* Oculta el menú de escritorio */
    .nav__menu {
        position: fixed;
        top: 4rem; /* Debajo del header */
        left: -100%; /* Inicia oculto a la izquierda */
        background-color: var(--color-blanco);
        width: 100%;
        height: 100vh;
        padding-top: 2rem;
        transition: left 0.4s ease;
    }

    /* Clase que el JS agregará para mostrar el menú */
    .nav__menu.show-menu {
        left: 0;
    }

    .nav__list {
        flex-direction: column; /* Apila los enlaces verticalmente */
        align-items: center;
        gap: 2.5rem;
    }

    .nav__link {
        font-size: 1.25rem;
    }

    .hero {
        height: 80vh;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.2rem;
    }

    .section__title {
        font-size: 1.75rem;
    }

    /* Apila la imagen y el texto en la sección "Nosotros" */
    .about__container {
        grid-template-columns: 1fr;
    }

    .about__img {
        /* Ordena la imagen para que aparezca primero en móvil */
        order: -1; 
    }
}