/* _________________ VARIABLES DE COLOR Y FUENTES _________________ */
:root {
    /* Colores primarios para Seriedad y Compromiso */
    --primary-dark: #003366;    /* Azul Oscuro Naval - Seriedad */
    --primary-medium: #005A9C;  /* Azul Medio - Profesionalismo */
    --accent-color: #D4AF37;    /* Dorado sutil para acentos */
    
    /* Colores de texto y fondo */
    --text-dark: #333333;
    --text-light: #f9f9f9;
    --bg-light: #f7f7f7;
    --bg-white: #ffffff;
    
    /* Fuentes: Roboto para legibilidad, Playfair para títulos formales */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
}

/* _________________ RESET BÁSICO Y ESTILOS GLOBALES _________________ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden; /* Evitar scroll horizontal en dispositivos móviles */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--primary-medium);
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

section {
    padding: 60px 0;
}

/* Botón principal */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-medium);
    color: var(--text-light);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 15px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}


/* _________________ ENCABEZADO Y NAVEGACIÓN _________________ */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

/* _________________ ESTILO DEL LOGO CON ÍCONO (CORREGIDO) _________________ */
.logo {
    display: flex; /* Para alinear el ícono y el texto horizontalmente */
    align-items: center; /* Centra verticalmente el ícono y el texto */
    gap: 12px; /* Espacio entre el ícono y el texto */
    color: var(--primary-dark); /* Color principal para todo el logo */
}

.logo-icon {
    font-size: 1.8rem; /* Tamaño del ícono, un poco más grande que el texto */
    color: var(--accent-color); /* Color dorado para destacar la balanza */
}

.logo span {
    font-size: 1.6rem; /* Mantiene el tamaño de fuente del texto del logo */
    font-weight: bold;
    color: var(--primary-dark);
    font-family: var(--font-heading);
    white-space: nowrap; 
}

/* Estilos de navegación */
.nav ul {
    list-style: none;
    display: flex;
}

.nav ul li {
    margin-left: 25px;
    position: relative;
}

.nav ul li a {
    display: block;
    padding: 10px 0;
    color: var(--text-dark);
    font-weight: 500;
    text-transform: uppercase;
}

.nav ul li a:hover {
    color: var(--primary-medium);
}

/* Dropdown Menu (SERVICIOS) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 220px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-top: 3px solid var(--accent-color);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-transform: none;
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-dark);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu-toggle {
    display: none; /* Oculto en escritorio */
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-dark);
}


/* _________________ SECCIÓN BANNER / SLIDER _________________ */
.slider-container {
    position: relative;
    width: 100%;
    height: 450px; /* Altura fija para el banner */
    overflow: hidden;
    background-color: var(--bg-light); /* Fondo de fallback */
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.active {
    opacity: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Capa oscura para mejor lectura */
    display: flex;
    align-items: center;
    text-align: center;
}

.slider-overlay h1 {
    color: var(--text-light);
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.slider-overlay .subtitle {
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 300;
}


/* _________________ SECCIÓN INICIO Y VALORES _________________ */
.values-section {
    background-color: var(--bg-white);
    padding: 80px 0;
}

.values-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.values-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.values-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.experience-text {
    font-style: italic;
    color: var(--primary-medium);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.values-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}


/* _________________ SECCIÓN DETALLE SERVICIOS _________________ */
.service-details-section {
    background-color: var(--bg-light);
    padding-top: 40px;
}

.service-card {
    background-color: var(--bg-white);
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-card h3 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.service-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.service-content p {
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.7;
}

.service-images {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 350px; /* Ancho fijo para el contenedor de imágenes */
}

.service-images.single-img {
    grid-template-columns: 1fr;
    width: 250px; 
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}


/* _________________ SECCIÓN MAPA Y UBICACIÓN _________________ */
.map-section {
    background-color: var(--bg-white);
    text-align: center;
}

.map-container {
    margin-top: 25px;
    border: 5px solid var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.address-text {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-dark);
}

.address-text i {
    margin-right: 10px;
    color: var(--accent-color);
}


/* _________________ SECCIÓN CONTACTOS Y FORMULARIO _________________ */
.contact-section {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.contact-section h2, .contact-intro {
    color: var(--text-light);
    text-align: center;
}

.contact-intro {
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.contact-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-body);
}

.contact-form textarea {
    grid-column: 1 / -1; /* Ocupa todo el ancho */
    resize: vertical;
}

.captcha-group {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.captcha-group label {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 5px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #f0c04f; /* Tono más claro del dorado */
}

#form-message {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
}

.hidden {
    display: none;
}
.success {
    background-color: #d4edda;
    color: #155724;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
}


/* _________________ PIE DE PÁGINA _________________ */
.footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 30px 0 10px;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info h3, .footer-social h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.footer-info p {
    margin-bottom: 8px;
}

.footer-info a {
    color: var(--text-light);
    transition: color 0.3s;
}

.footer-info a:hover {
    color: var(--accent-color);
}

.footer-info i {
    margin-right: 8px;
}

.footer-social a {
    color: var(--text-light);
    font-size: 1.8rem;
    margin-left: 15px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
}


/* _________________ BOTÓN FLOTANTE WHATSAPP _________________ */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366; /* Verde WhatsApp */
    color: var(--bg-white);
    border-radius: 30px;
    padding: 10px 20px 10px 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform 0.3s, background-color 0.3s;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.05);
}

.whatsapp-float i {
    font-size: 2rem;
    margin-right: 10px;
}

.whatsapp-float span {
    font-weight: bold;
    font-size: 1rem;
}


/* _________________ MEDIA QUERIES (RESPONSIVE DESIGN) _________________ */
@media (max-width: 992px) {
    /* Ajustes generales */
    h1 { font-size: 2.2rem; }
    .slider-container { height: 400px; }
    
    /* Inicio y Valores */
    .values-grid {
        grid-template-columns: 1fr; /* Una columna en tablets */
    }
    .values-image {
        order: -1; /* Mueve la imagen arriba en vista móvil/tablet */
        margin-bottom: 20px;
    }

    /* Servicios */
    .service-content {
        flex-direction: column; /* Apila contenido en tablets */
        gap: 20px;
    }
    .service-images {
        width: 100%; /* Imágenes toman todo el ancho */
        grid-template-columns: repeat(3, 1fr); /* 3 columnas de imagen */
    }
    .service-images.single-img {
        width: 100%;
        grid-template-columns: 1fr;
    }

    /* Formulario */
    .contact-form .form-grid {
        grid-template-columns: 1fr; /* Una columna en tablets/móviles */
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-info, .footer-social {
        margin-bottom: 20px;
    }
    .footer-social a {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    /* Navegación para Móviles */
    .menu-toggle {
        display: block; /* Muestra el botón hamburguesa */
    }
    .nav {
        display: none; /* Oculta la navegación principal */
        width: 100%;
        position: absolute;
        top: 70px; /* Debajo del header */
        left: 0;
        background-color: var(--bg-white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding-bottom: 10px;
        border-top: 1px solid var(--bg-light);
    }
    .nav.active {
        display: block; /* Muestra el menú cuando está activo (JS lo maneja) */
    }
    .nav ul {
        flex-direction: column;
        padding: 0 20px;
    }
    .nav ul li {
        margin: 0;
        border-bottom: 1px solid var(--bg-light);
    }
    .nav ul li:last-child {
        border-bottom: none;
    }
    .nav ul li a {
        padding: 15px 0;
    }
    
    /* Dropdown en móvil */
    .dropdown-content {
        position: static; /* Cambia a flujo normal */
        box-shadow: none;
        border-top: none;
        padding-left: 20px;
        background-color: var(--bg-light);
        margin-top: 5px;
    }
    .dropdown:hover .dropdown-content {
        display: none; /* Deshabilitamos el hover. JS manejará el toggle */
    }
    .dropdown.open .dropdown-content {
        display: block; /* Clase manejada por JS */
    }

    /* Logo en responsive */
    .logo {
        gap: 8px; 
    }
    .logo-icon {
        font-size: 1.5rem; 
    }
    .logo span {
        font-size: 1.4rem; 
    }

    /* Banner/Slider */
    .slider-container { height: 300px; }
    .slider-overlay h1 { font-size: 2rem; }
    .slider-overlay .subtitle { font-size: 1.1rem; }
    
    /* Botón Flotante de WhatsApp */
    .whatsapp-float span {
        display: none; /* Oculta el texto para ahorrar espacio */
    }
    .whatsapp-float {
        padding: 12px;
        border-radius: 50%;
    }
}

@media (max-width: 576px) {
    /* Servicios */
    .service-images {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas de imagen en móviles pequeños */
    }
}