/* Reset básico y fuentes */
:root {
    --primary-color: #005A9C; /* Azul oscuro profesional */
    --secondary-color: #00AEEF; /* Azul claro vibrante */
    --accent-color: #FFC107; /* Amarillo dorado para acentos */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #fff;
    --font-family: 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Utilidades */
.py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
.bg-light {
    background-color: var(--light-gray);
}

/* Encabezado */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--accent-color);
}

/* Sección Hero */
#hero {
    background-color: var(--secondary-color); /* Color de fondo si la imagen no carga o es semitransparente */
    color: var(--white);
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* Para contener la imagen de fondo */
}

#hero .hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre todo el espacio, puede recortar */
    z-index: 1;
    opacity: 0.3; /* Para que el texto sea legible */
}

#hero .container {
    position: relative; /* Para que el contenido esté sobre la imagen */
    z-index: 2;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e6ac00; /* Un poco más oscuro */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
}
.btn-secondary:hover {
    background-color: #004175; /* Un poco más oscuro */
}


/* Secciones Generales */
section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    color: var(--primary-color);
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-item img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.service-item h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Sobre Nosotros */
.about-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.about-content img {
    max-width: 40%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-content p {
    flex: 1;
    font-size: 1.1rem;
}

/* Contacto */
#contactForm {
    max-width: 700px;
    margin: auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
footer {
    background: var(--text-color);
    color: var(--light-gray);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Para responsividad */
}

.footer-info, .footer-links {
    flex-basis: 48%; /* Aproximadamente mitad y mitad con un pequeño espacio */
    margin-bottom: 1rem; /* Espacio en móviles */
}

.footer-info p, .footer-links p {
    margin-bottom: 0.5rem;
}

.footer-info a, .footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-info a:hover, .footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
    border-top: 1px solid #555;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Páginas de contenido (Política de Privacidad, Cookies) */
.content-page h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}
.content-page h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: left; /* Sobrescribir el centrado general de h2 */
    font-size: 1.8rem;
}
.content-page p, .content-page ul {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.content-page ul {
    list-style-position: inside;
    padding-left: 20px;
}
.content-page a {
    color: var(--secondary-color);
}
.content-page a:hover {
    text-decoration: underline;
}

/* Banner de Consentimiento de Cookies */
#cookieConsentBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    flex-wrap: wrap; /* Para mejor visualización en pantallas pequeñas */
}

#cookieConsentBanner p {
    margin: 0;
    margin-right: 1rem; /* Espacio antes del botón */
    flex-grow: 1; /* Ocupa el espacio disponible */
    margin-bottom: 0.5rem; /* Espacio en móviles si el botón va abajo */
}

#cookieConsentBanner a {
    color: var(--accent-color);
    text-decoration: underline;
}

#cookieConsentBanner button {
    padding: 0.6rem 1rem;
    white-space: nowrap; /* Evita que el texto del botón se parta */
}

/* Responsividad */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    header nav ul {
        flex-direction: column;
        margin-top: 1rem;
    }
    header nav ul li {
        margin: 0.5rem 0;
    }

    #hero h1 {
        font-size: 2.2rem;
    }
    #hero p {
        font-size: 1rem;
    }

    .about-content {
        flex-direction: column;
    }
    .about-content img {
        max-width: 80%;
        margin-bottom: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-info, .footer-links {
        flex-basis: 100%;
        margin-bottom: 1.5rem;
    }

    #cookieConsentBanner {
        flex-direction: column;
        text-align: center;
    }
    #cookieConsentBanner p {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}