/* --- Variables CSS --- */
:root {
    --primary-color: #004d99; /* Azul oscuro, similar al de Fujisj */
    --secondary-color: #007bff; /* Azul más claro para acentos */
    --text-color: #333;
    --light-text-color: #666;
    --background-light: #f8f8f8;
    --border-color: #ddd;
    --white: #ffffff;
    --header-height: 80px; /* Altura fija del header */
    --accent-blue: #0056b3; /* Un azul adicional para consistencia */
}

/* --- Reseteo Básico y Box Sizing --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Estilos Generales del Body y Tipografía --- */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Header y Navegación --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 60px;
    vertical-align: middle;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    position: relative;
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    padding: 25px 0;
    display: block;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* --- Estilos para el Dropdown (Submenú) - CONTROLADO POR HOVER (CSS puro) --- */
.dropdown-content {
    display: none; /* Oculto por defecto */
    position: absolute;
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    min-width: 220px;
    z-index: 1;
    border-top: 3px solid var(--secondary-color);
    padding-top: 5px;
    top: calc(100% - 5px); /* Se posiciona justo debajo del elemento padre */
    left: 0; /* Alineado a la izquierda del elemento padre */
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: normal;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

/* Mostrar el dropdown al pasar el mouse por encima del elemento padre */
nav ul li.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Estilos para Botones --- */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
    margin-top: 20px;
}

.btn:hover {
    background-color: var(--accent-blue);
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 3px;
    margin-top: 15px; /* Asegura un espacio adecuado */
}

/* --- SECCIÓN HERO / BANNER PRINCIPAL --- */
.hero-banner {
    width: 100%;
    height: 500px; /* Altura fija para el banner */
    position: relative;
    overflow: hidden;
}

.banner-slide {
    display: none; /* Oculta todos por defecto */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.banner-slide.active {
    display: block; /* Muestra el slide activo */
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre el área manteniendo la relación de aspecto */
    filter: brightness(0.7); /* Oscurece la imagen para que el texto resalte */
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 1;
    max-width: 800px;
}

.banner-content h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.banner-content p {
    font-size: 1.5em;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* --- SECCIONES GENERALES DE CONTENIDO --- */
section {
    padding: 60px 0; /* Espaciado superior e inferior para las secciones */
}

.welcome-section {
    text-align: center;
    padding: 40px 0;
}

.welcome-section h2 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.welcome-section p {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto;
}

/* --- SECCIÓN SERVICIOS PRINCIPALES (en Index.html) --- */
.main-services {
    background-color: var(--background-light);
    text-align: center;
}

.main-services h2 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    justify-content: center;
    gap: 30px;
}

.service-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.service-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
}

.service-item h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 0.95em;
    color: var(--light-text-color);
    flex-grow: 1;
    margin-bottom: 15px;
}

/* --- SECCIÓN POR QUÉ ELEGIRNOS --- */
.why-choose-us {
    padding: 60px 0;
    text-align: center;
}

.why-choose-us h2 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    padding: 20px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.feature-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.feature-item h3 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.9em;
    color: var(--light-text-color);
}

/* --- FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px 0;
    font-size: 0.9em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.footer-col p, .footer-col ul {
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li a {
    color: var(--white);
    text-decoration: none;
    line-height: 2.2;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
}

.footer-col p {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 20px;
}

/* --- WhatsApp Floating Button --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    left: auto;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.4);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- Estilos para Títulos de Página Individuales (Ej. en servicios.html, contacto.html, sobre-nosotros.html) --- */
.page-title {
    background-color: var(--primary-color); /* Fondo azul oscuro */
    color: var(--white); /* Texto blanco */
    padding: 60px 0; /* Espaciado generoso */
    text-align: center;
    /* margin-top: -1px; Quitado ya que el header es sticky y no hay problema de espacio */
    background-image: url('../images/page-title-bg.jpg'); /* Opcional: una imagen de fondo para todos los títulos de página */
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
}

.page-title::before { /* Overlay oscuro para el título de página */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.page-title h1 {
    font-size: 3em;
    margin: 0;
    color: var(--white); /* Fuerza el color blanco para el título */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* --- Estilos para el Contenido de Secciones Individuales (reutilizables) --- */
.content-section {
    padding: 40px 0;
    background-color: var(--white); /* Fondo blanco por defecto */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid var(--border-color); /* Línea debajo del h2 */
    padding-bottom: 10px;
}

.content-section h3 {
    color: var(--secondary-color);
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-section ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.content-section ul li {
    margin-bottom: 8px;
}

.content-section strong {
    color: var(--primary-color);
    font-weight: bold;
}

/* --- Contacto Page Specific Styles --- */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.contact-card {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6em;
    font-weight: 600;
}

.contact-card p {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.contact-card strong {
    color: var(--text-color);
    font-weight: 700;
}

.map-section {
    margin-top: 60px;
    padding: 20px;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.map-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.map-section iframe {
    max-width: 100%;
    height: 450px;
    border-radius: 8px;
    margin-top: 20px;
    border: none;
}

.map-note {
    font-size: 1em;
    color: var(--text-color);
    margin-top: 15px;
    font-weight: 600;
}


/* --- RESPONSIVIDAD --- */

/* Para pantallas más pequeñas (tablets y móviles) */
@media (max-width: 992px) {
    header .container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .logo img {
        height: 50px;
        margin-bottom: 10px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        padding: 10px 0;
    }

    .dropdown-content {
        position: static; /* El dropdown se queda en el flujo normal para móviles */
        box-shadow: none;
        border-top: none;
        min-width: unset;
        width: 100%; /* Ocupa todo el ancho del elemento padre */
    }

    /* Mostrar dropdown al pasar el mouse (y mantenerlo visible en móvil si se usa clic con JS para cerrar) */
    nav ul li.dropdown:hover .dropdown-content {
        display: block;
    }

    .hero-banner {
        height: 400px;
    }

    .banner-content h1 {
        font-size: 2.5em;
    }

    .banner-content p {
        font-size: 1.2em;
    }

    .services-grid,
    .features-grid,
    .contact-info-grid,
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .page-title {
        padding: 40px 0;
    }

    .page-title h1 {
        font-size: 2.2em;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 30px;
        right: 30px;
    }

    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}

/* Para móviles pequeños */
@media (max-width: 576px) {
    .hero-banner {
        height: 300px;
    }

    .banner-content h1 {
        font-size: 1.8em;
    }

    .banner-content p {
        font-size: 1em;
    }

    .services-grid,
    .features-grid,
    .contact-info-grid,
    .footer-grid {
        grid-template-columns: 1fr; /* Una columna para móviles */
    }

    .service-item, .feature-item, .footer-col {
        padding: 15px;
    }

    section {
        padding: 40px 0;
    }

    .welcome-section h2, .main-services h2, .why-choose-us h2, .content-section h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .map-section iframe {
        height: 300px;
    }
}