/* --- 1. Variables y Estilos Base (Globales) --- */
:root {
    --bg-light: #cbd2cb;
    --bg-mid: #e8ede7;
    --bg-dark: #3d4b45;
    --text-light: #ffffff;
    --text-on-dark: #e2eae2;
    --text-dark: #3d4b45;
    --accent: #a9b4a9;
    --font-body: 'Libre Baskerville', serif;
    --font-heading: 'Cinzel', serif;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3.25rem;
    --space-xxl: 5.25rem;
    --transition-fast: all 0.2s ease-in-out;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* --- 2. Encabezado y Navegación (Global) --- */
.main-header { position: sticky; top: 0; z-index: 1000; background-color: rgba(203, 210, 203, 0.9); backdrop-filter: blur(8px); padding: 1rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-dark); }
.logo-icon { width: 48px; height: auto; }
.logo-text { font-family: var(--font-body); font-size: 1.5rem; font-weight: 700; }
.header-controls { display: flex; align-items: center; gap: 1rem; }
/* Estilo del botón de WhatsApp en escritorio */
.whatsapp-btn { display: flex; align-items: center; gap: 0.5rem; background-color: var(--bg-dark); color: var(--text-light); padding: 0.5rem 1rem; border-radius: 50px; text-decoration: none; transition: var(--transition-fast); }
.whatsapp-btn:hover { opacity: 0.85; }
.whatsapp-btn svg { width: 24px; height: 24px; fill: currentColor; }

/* --- Navegación de Escritorio --- */
.main-nav { list-style: none; display: flex; gap: 2rem; }
.main-nav li { position: relative; }
.main-nav a { text-decoration: none; color: var(--text-dark); font-size: 1rem; padding-bottom: 0.25rem; border-bottom: 2px solid transparent; transition: var(--transition-fast); }
.main-nav > li > a:hover { border-color: var(--text-dark); }

/* Dropdown Menu (Escritorio) */
.nav-item--has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-item--has-dropdown > a::after {
    content: '▼';
    font-size: 0.6em;
    display: inline-block;
    transition: var(--transition-fast);
}
.nav-item--has-dropdown:hover > a::after {
    transform: rotate(180deg);
}
.dropdown-menu {
    display: block;
    position: absolute;
    top: 150%; /* Oculto fuera de la pantalla */
    left: -1rem;
    background-color: #e8ede7;
    border-radius: 5px;
    padding: 0.5rem 0;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: top 0.3s ease, opacity 0.3s ease;
}
.nav-item--has-dropdown:hover .dropdown-menu {
    top: 100%;
    opacity: 1;
    pointer-events: auto;
}
.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    border-bottom: none;
    white-space: nowrap;
}
.dropdown-menu li a:hover {
    background-color: var(--accent);
}

/* --- Navegación Móvil --- */
.menu-toggle { display: none; font-size: 2rem; cursor: pointer; background: none; border: none; z-index: 1001; }
.nav-container { display: none; }

@media (max-width: 991px) {
    /* Ocultamos la navegación de escritorio */
    .nav-desktop { display: none; }
    
    /* Hacemos visible el botón de WhatsApp del header y le damos el estilo de ícono */
    .header-controls .whatsapp-btn {
        display: flex; 
        background-color: #25D366; /* Verde de WhatsApp */
        color: var(--text-light);
        padding: 0.5rem; /* Hace que el área sea pequeña */
        border-radius: 50%; /* Lo hace redondo */
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    
    /* Ocultamos el texto 'WhatsApp' en móvil */
    .header-controls .whatsapp-btn span {
        display: none;
    }
    
    /* Ajustamos el ícono */
    .header-controls .whatsapp-btn svg {
        fill: var(--text-light);
        width: 24px; 
        height: 24px;
    }
    
    .menu-toggle { display: block; color: var(--text-dark) !important; }
    
    .nav-container { display: flex; z-index: 1002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-dark); flex-direction: column; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; }
    .nav-container.is-open { opacity: 1; pointer-events: auto; }
    .close-menu-btn { position: absolute; top: 1rem; right: 1.5rem; font-size: 2.5rem; color: var(--text-light); background: none; border: none; cursor: pointer; }
    
    .mobile-nav { list-style: none; padding: 0; text-align: center; width: 80%; }
    .mobile-nav li { margin-bottom: 0.5rem; }
    .mobile-nav a { color: var(--text-light); font-size: 1.5rem; line-height: 2; border: none; text-decoration: none; display: block; }
    
    /* Acordeón (Móvil) */
    .mobile-nav-item--has-submenu > a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    .mobile-nav-item--has-submenu > a::after {
        content: '+';
        font-size: 1.5rem;
        transition: var(--transition-fast);
    }
    .mobile-nav-item--has-submenu.is-open > a::after {
        transform: rotate(45deg);
    }
    .mobile-submenu {
        list-style: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }
    .mobile-submenu.is-open {
        max-height: 500px; /* Suficiente para mostrar los ítems */
    }
    .mobile-submenu a {
        font-size: 1.1rem;
        color: #dcd0d0;
    }
}
 .clarity-call-banner {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        background-color: #344D47; /* Color from your logo */
        color: #ffffff;
        text-decoration: none;
        font-family: 'Cinzel';
    font-size: 21px !important;
        font-weight: bold;
        font-size: 1rem;
        text-align: center;
        transition: background-color 0.3s ease;
    }
    .clarity-call-banner:hover {
        background-color: #4a6b63; /* A slightly lighter shade for the hover effect */
    }
    .clarity-call-banner img {
        height: 25px;
        width: 25px;
        margin-right: 10px;
    }

/* --- 3. Footer (Global) --- */
.main-footer { background-color: var(--bg-dark); color: var(--text-on-dark); padding: var(--space-xxl) 0 var(--space-lg) 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; text-align: center; }
.footer-grid h4 { color: var(--text-light); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-email-address { font-size: 0.9em; opacity: 0.8; display: block; margin-bottom: 0.25rem; }
.footer-grid a { color: var(--text-on-dark); text-decoration: none; transition: color 0.3s; }
.footer-grid a:hover { color: var(--text-light); }
.footer-copyright { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--accent); font-size: 0.9rem; }

@media (min-width: 992px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr); text-align: left; }
}