:root{
    --fondo1: #f9f9f9;
    --fondo2: #4f4f4f;
    --texto1: #333;
    --texto2: #fff;
    --azul1: #4a90e2;
    --azul2: #6ec6ff;
    --borde-redondo: 8px;
    --degradado: linear-gradient(90deg, var(--azul1), var(--azul2));
    --sombra: 0 4px 10px rgba(0, 0, 0, 0.1);
}

body{
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--fondo1);
    color: var(--texto1);
}

/*+++++++++++++++++ H E A D E R  ++++++++++++++++++++++++++++++++++++++++*/

header{
    background: var(--degradado);
    color: var(--texto2);
    padding: 2rem 2rem;
    text-align: center;


    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

header img{
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit:fill;
    box-shadow: var(--sombra);
}

/*+++++++++++++++++ N A V  ++++++++++++++++++++++++++++++++++++++++*/

nav{
    display: flex;
    justify-content: center;
    background-color: #fff;
    box-shadow: var(--sombra)
}

nav a{
    padding: 1rem;
    text-decoration: none;
    color: var(--texto1);
    font-weight: bold;
}

nav a:hover{
    color: var(--azul1);
}

/*+++++++++++++++++ I N I C I O ++++++++++++++++++++++++++++++++++++++++*/

section.inicio{
    position: relative;
    min-height: 600px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    color: var(--texto2);
/*Nuevo*/
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

section.inicio .contenido-inicio {
    position: relative;
    z-index: 1;
    width: 100%;
}


/* --- ESTRUCTURA PARA EL TEXTO ROTATIVO --- */

.rotador-texto {
    position: relative;
    height: 80px; /* Ajusta según el tamaño de tu fuente para evitar saltos de línea */
    display: flex;
    justify-content: center;
    align-items: center;
}

section.inicio .texto-animado {
    position: absolute;
    color: var(--texto2);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    font-size: 2.5rem;
    margin: 0;
    opacity: 0; /* Ocultos por defecto */
    width: 100%;
    
    /* Configuración de la animación: 
       Dura 12 segundos en total, se repite infinitamente */
    animation: rotarTexto 24s linear infinite;
}

/* Desfase de tiempos para cada frase (Ciclo total 12s / 3 textos = 4s por texto) */
section.inicio .texto-animado:nth-child(1) {
    animation-delay: 0s;
}

section.inicio .texto-animado:nth-child(2) {
    animation-delay: 8s;
}

section.inicio .texto-animado:nth-child(3) {
    animation-delay: 16s;
}

/* Nueva animación para alternar los 3 textos con efecto de subida y desvanecimiento */
@keyframes rotarTexto {
    0% { opacity: 0; transform: translateY(20px); }
    5% { opacity: 1; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(0); }
    35% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 0; }
}

section.inicio::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/fondo.jpeg'); 
    background-size: cover;
    background-position: center;
    filter: blur(0px); /* Ajusta los píxeles para más o menos desenfoque */
    transform: scale(1.1); /* Evita bordes blancos por el desenfoque */
    z-index: -1;

    /*Nuevo*/
    animation: pan-zoom 15s ease-in-out infinite alternate;
}

/* Mantiene el contenido por encima del fondo */
section.inicio div {
    position: relative;
    z-index: 1;
}

/* Cambia el color del título en inicio para que sea legible */
section.inicio h2 {
    color: var(--texto2);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Animación del fondo*/
@keyframes pan-zoom {
    0% { transform: scale(1.05) translate(0, 0); }
    100% { transform: scale(1.15) translate(-1%, -1%); }
}

/*+++++++++++++++++ C O N O C E N O S +++++++++++++++++++++++++++++++++++++*/

section.conocenos{
    max-width: 100%;
    background-color: var(--fondo1);
}

.conocenos-contenido{
    padding: 2rem;
    max-width: 1000px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.titulo_claro{
    text-align: center;
    color: var(--azul1);
    margin-bottom: 2rem;
}

.conocenos-contenido div{
    flex: 1;
}

.conocenos-contenido p{
    line-height: 2;
}

.conocenos-contenido h2{
    color: var(--azul1);
    margin-bottom: 1rem;
}

/*+++++++++++++++++ S E R V I C I O S +++++++++++++++++++++++++++++++++++++*/

section.servicios{
    max-width: 100%;
    background-color: var(--fondo2);
}

.servicios-contenido{
    display: flex;
    flex-direction: column;
    gap: 1.5;
    max-width: 1000px;
    margin: auto;
    padding: 2rem;
    color: var(--texto2);
}

.servicios-columnas{
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas del mismo tamaño */
    gap: 3rem; /* Espacio de separación entre columnas */
    width: 100%;
    align-items: start;
}

.servicios-columnas p{
    line-height: 1.5;
}

/*REVISAR*/
.titulo_oscuro{
    text-align: center;
    colosr: var(--texto2);
    margin-bottom: 2rem;
}

.servicios-columnas iframe{
    width: 100%;
    height: 350px;
    border: none;
    border-radius: var(--borde-redondo);
    box-shadow: var(--sombra);
}

/*+++++++++++++++++ G A L E R I A +++++++++++++++++++++++++++++++++++++*/

section.galeria {
    max-width: 100%;
    background-color: var(--fondo1);
}

.galeria-contenido {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* Bordes suavemente redondeados */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3); /* Sombra para dar profundidad */
    aspect-ratio: 4 / 3; /* Mantiene las imágenes con la misma proporción */
    cursor: pointer;
}

/* Estilo de las imágenes y animación de movimiento al pasar el cursor */
.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Transición suave para el movimiento */
}

/* Efecto de movimiento sutil (zoom) al pasar el mouse */
.galeria-item:hover img {
    transform: scale(1.1);
}

/* VENTANA MODAL (PANTALLA COMPLETA) */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        justify-content: center;
        align-items: center;
        user-select: none;
    }

    .modal.activo {
        display: flex;
    }

    /* Contenedor interno estructurado verticalmente */
    .modal-contenido {
        position: relative;
        max-width: 90%;
        max-height: 90%;
        display: flex;
        flex-direction: column; /* Alinea la imagen arriba y el texto abajo */
        justify-content: center;
        align-items: center;
    }

    .modal img {
        max-width: 100%;
        max-height: 80vh; /* Reducido ligeramente para dar espacio al texto */
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    }

    /* Texto descriptivo */
    .modal-descripcion {
        color: #ffffff;
        font-size: 1.2rem;
        margin-top: 15px;
        text-align: center;
        font-family: sans-serif;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        max-width: 100%;
        word-wrap: break-word;
    }

    /* Botones de navegación (Flechas) */
    .flecha {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
        border: none;
        font-size: 30px;
        padding: 15px 20px;
        cursor: pointer;
        border-radius: 5px;
        transition: background-color 0.3s, scale 0.2s;
        z-index: 1010;
    }

    .flecha:hover {
        background-color: rgba(255, 255, 255, 0.3);
        scale: 1.05;
    }

    .flecha-izq {
        left: -80px;
    }

    .flecha-der {
        right: -80px;
    }

    /* Botón de cerrar */
    .modal .cerrar {
        position: absolute;
        top: -50px;
        right: 0;
        color: #ffffff;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.3s;
    }

    .modal .cerrar:hover {
        color: #ff4d4d;
    }




    /* Adaptación para pantallas pequeñas (Celulares) */
    @media (max-width: 768px) {
        .flecha {
            font-size: 24px;
            padding: 10px 15px;
            background-color: rgba(0, 0, 0, 0.5);
        }
        .flecha-izq { left: 10px; }
        .flecha-der { right: 10px; }
        .modal .cerrar { top: 10px; right: 20px; }
        .modal-descripcion { font-size: 1rem; margin-top: 10px; }
    }


/*+++++++++++++++++ F O O T E R +++++++++++++++++++++++++++++++++++++*/

footer{
    background-color: var(--azul1);
    color: var(--texto2);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}