/* style.css */

/* Variables de color para fácil modificación */
:root {
    --header-bg-color: #ffffff; /* Fondo blanco para el encabezado */
    --header-text-color: #333; /* Color de texto oscuro para enlaces y logo */
    --header-hover-color: #007bff; /* Azul para el hover de los enlaces */
    --border-bottom-color: #f0f0f0; /* Línea sutil en la parte inferior del encabezado */
    --body-bg-color: #f8f8f8; /* Fondo general de la página */
    --text-primary-color: #333; /* Color de texto principal */
    --link-color: #007bff; /* Color para enlaces generales */
    --box-shadow-color: rgba(0, 0, 0, 0.08); /* Sombra para elementos */
    --hero-overlay-color: rgba(0, 0, 0, 0.5); /* Overlay oscuro para el texto del hero */
    --hero-text-color: #ffffff; /* Color de texto para el hero */
    --btn-bg-color: #007bff; /* Color del botón primario */
    --btn-text-color: #ffffff; /* Color del texto del botón */
    --btn-hover-color: #0056b3; /* Color del botón al pasar el ratón */
}

/* ------------------------------------- */
/* --- ESTILOS BASE Y GENERALES --- */
/* ------------------------------------- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--body-bg-color);
    color: var(--text-primary-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--header-hover-color);
}

h1, h2, h3 {
    color: var(--text-primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

/* ------------------------------------- */
/* --- BOTONES --- */
/* ------------------------------------- */
.btn-primary {
    display: inline-block;
    background-color: var(--btn-bg-color);
    color: var(--btn-text-color);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.btn-primary:hover {
    background-color: var(--btn-hover-color);
    transform: translateY(-2px);
}


/* ------------------------------------- */
/* --- ENCABEZADO (HEADER) --- */
/* ------------------------------------- */
.main-header {
    background-color: var(--header-bg-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px var(--box-shadow-color);
    border-bottom: 1px solid var(--border-bottom-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--header-text-color);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: var(--header-text-color);
    font-weight: 500;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: var(--header-hover-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease-in-out;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* ------------------------------------- */
/* --- SECCIÓN HERO (PÁGINA DE INICIO) --- */
/* ------------------------------------- */
.hero-section {
    background: url('../img/hero_background.jpg') no-repeat center center/cover; /* Imagen de fondo */
    height: 60vh; /* Altura del hero */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    color: var(--hero-text-color); /* Color de texto sobre la imagen */
}

.hero-overlay {
    background-color: var(--hero-overlay-color); /* Capa semi-transparente sobre la imagen */
    padding: 40px;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 20px;
}

.hero-section h1 {
    font-size: 3.8em;
    margin-bottom: 15px;
    color: var(--hero-text-color); /* Asegura que el título sea blanco */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Sombra para el texto */
}

.hero-section p {
    font-size: 1.5em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: var(--hero-text-color); /* Asegura que el párrafo sea blanco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------- */
/* --- SECCIONES DE CONTENIDO GENERAL --- */
/* ------------------------------------- */
.content-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px var(--box-shadow-color);
    border-radius: 8px;
    text-align: center;
}

.content-section p {
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------------- */
/* --- PÁGINA DE CONTACTO (contacto.html) --- */
/* ------------------------------------- */
.contact-page {
    text-align: center;
    padding-top: 50px; /* Un poco de espacio arriba */
    padding-bottom: 50px;
}

.contact-page h1 {
    font-size: 2.8em;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-page p {
    max-width: 900px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
}

.contact-info-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Permite que los elementos se envuelvan en pantallas pequeñas */
    gap: 30px; /* Espacio entre los items de contacto */
    margin-top: 30px;
}

.contact-item {
    background-color: var(--body-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex: 1; /* Permite que los items crezcan */
    min-width: 280px; /* Ancho mínimo para cada item */
    max-width: 350px; /* Ancho máximo para cada item */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-item .icon {
    font-size: 3em; /* Tamaño grande para los iconos */
    color: var(--header-hover-color);
    margin-bottom: 15px;
    display: block; /* Para que ocupe su propia línea */
}

.contact-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.contact-item p {
    font-size: 1.1em;
    margin: 0; /* Elimina margen inferior */
    text-align: center; /* Centra el texto */
}

.contact-item a {
    font-weight: 500;
    color: var(--text-primary-color); /* Mantiene el color del texto del contacto */
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--header-hover-color);
}

/* ------------------------------------- */
/* --- PIE DE PÁGINA (FOOTER) --- */
/* ------------------------------------- */
.main-footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------------------- */
/* --- RESPONSIVIDAD --- */
/* ------------------------------------- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        padding: 15px;
    }

    .logo {
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .main-nav ul li {
        margin: 10px 0;
    }

    .main-nav ul li a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-section {
        height: 50vh; /* Menos altura en móvil */
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1.1em;
    }

    .content-section {
        padding: 20px;
    }

    .contact-info-grid {
        flex-direction: column; /* Apila los items de contacto en móvil */
        align-items: center; /* Centra los items apilados */
    }

    .contact-item {
        width: 90%; /* Ocupa más ancho en móvil */
        min-width: unset;
    }
}