/* ===== VARIABLES (definidas aquí para páginas que no las tengan) ===== */
:root {
    --primary-color: #1d3557;
    --secondary-color: #457b9d;
    --accent-color: #a8dadc;
    --highlight-color: #e63946;
    --light-color: #f1faee;
    --dark-color: #333;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.navbar.sticky {
    background-color: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-contenido { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; }

/* Logo */
.nav-logo { display: flex; align-items: center; text-decoration: none; gap: 15px; }
.logo-icon { display: flex; align-items: center; }
.nav-logo-img { height: 80px; width: 80px; object-fit: contain; border-radius: 8px; }
.logo-texto { display: flex; flex-direction: column; }
.logo-nombre { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); line-height: 1.2; }
.logo-tagline { font-size: 0.9rem; color: var(--secondary-color); font-weight: 500; }

/* Menú principal */
.nav-menu { display: flex; list-style: none; gap: 5px; margin: 0; padding: 0; }
.nav-link {
    display: flex; align-items: center; gap: 8px; padding: 12px 20px;
    text-decoration: none; color: var(--dark-color); font-weight: 500;
    font-size: 1rem; border-radius: 8px; transition: all 0.3s ease; white-space: nowrap;
}
.nav-link i { font-size: 1.1rem; color: var(--primary-color); }
.nav-link:hover { background-color: rgba(29,53,87,0.05); color: var(--primary-color); transform: translateY(-2px); }
.nav-item.active .nav-link { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; }
.nav-item.active .nav-link i { color: white; }

/* Dropdown */
.nav-item.has-dropdown { position: relative; }
.has-dropdown .nav-link { padding-right: 40px; position: relative; }
.has-dropdown .nav-link .fa-chevron-down { position: absolute; right: 15px; font-size: 0.8rem; transition: transform 0.3s ease; }
.has-dropdown:hover .nav-link .fa-chevron-down { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: 100%; left: 0; right: auto;
    background: white; min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 8px;
    padding: 10px 0; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all 0.3s ease;
    list-style: none; z-index: 100;
}
.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    text-decoration: none; color: var(--dark-color); font-size: 0.95rem; transition: all 0.2s ease;
}
.dropdown-menu a:hover { background-color: rgba(29,53,87,0.05); color: var(--primary-color); padding-left: 25px; }

/* Botón móvil */
.nav-mobile { display: none; }
.menu-toggle { background: none; border: none; font-size: 1.8rem; color: var(--primary-color); cursor: pointer; padding: 10px; }

/* Overlay menú móvil */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.9); z-index: 1100;
    display: none; opacity: 0; transition: opacity 0.3s ease;
}
.mobile-menu-overlay.show { opacity: 1; }
.mobile-menu-contenido {
    position: fixed; top: 0; right: 0; bottom: 0; width: 320px;
    background: white; padding: 30px; overflow-y: auto;
    transform: translateX(100%); transition: transform 0.3s ease;
}
.mobile-menu-overlay.show .mobile-menu-contenido { transform: translateX(0); }

/* Cabecera menú móvil */
.mobile-menu-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #eaeaea;
}
.mobile-logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; color: var(--primary-color); }
.mobile-logo i { font-size: 1.8rem; }
.menu-close { background: none; border: none; font-size: 1.5rem; color: var(--dark-color); cursor: pointer; padding: 5px; }
.menu-close:hover { color: var(--highlight-color); }

/* Lista de navegación móvil */
.mobile-nav { list-style: none; padding: 0; margin: 0 0 30px 0; }
.mobile-nav li a {
    display: flex; align-items: center; gap: 12px; padding: 15px 10px;
    text-decoration: none; color: var(--dark-color); font-size: 1.1rem;
    font-weight: 500; border-radius: 8px; transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}
.mobile-nav li a:hover { background-color: rgba(29,53,87,0.05); color: var(--primary-color); }
.mobile-nav li a i { color: var(--primary-color); font-size: 1rem; }

/* Dropdown móvil */
.mobile-dropdown-toggle { justify-content: space-between; }
.mobile-dropdown-menu {
    list-style: none; padding: 0; margin: 0; display: none;
    background-color: #f8f9fa; border-radius: 8px; margin-top: 5px;
}
.mobile-dropdown.active .mobile-dropdown-menu { display: block; }
.mobile-dropdown-menu li a { padding: 12px 20px; font-size: 1rem; border-bottom: 1px solid #eee; }
.mobile-dropdown-menu li:last-child a { border-bottom: none; }

/* Contacto rápido móvil */
.mobile-contact { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 2px solid #eaeaea; }
.mobile-contact a {
    display: flex; align-items: center; gap: 12px; padding: 15px 20px;
    border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s ease;
}
.mobile-phone { background-color: var(--primary-color); color: white; align-items: center; }
.mobile-phone:hover { background-color: var(--secondary-color); color: white; }

.phone-info { display: flex; flex-direction: column; line-height: 1.25; }
.phone-label { font-size: 0.8rem; font-weight: 500; opacity: 0.85; }
.phone-num { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.3px; }
.mobile-whatsapp { background-color: #25d366; color: white; }
.mobile-whatsapp:hover { background-color: #128c7e; color: white; }
.mobile-email { background-color: #f8f9fa; color: var(--dark-color); border: 2px solid #eaeaea; }
.mobile-email:hover { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }

/* WhatsApp flotante - sin salto de línea en ninguna pantalla */
.whatsapp-fijo { white-space: nowrap; }

/* Tamaños fijos del navbar — igual en todas las páginas */
.navbar .logo-icon { font-size: 2.5rem; }
.navbar .nav-logo-img { height: 80px; width: 80px; }
.navbar .logo-nombre { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.navbar .logo-tagline { font-size: 0.9rem; }
.navbar .menu-toggle { font-size: 1.8rem; }
.navbar .nav-link { font-size: 1rem; }

/* Responsive */
@media (max-width: 992px) {
    .nav-menu { display: none; }
    .nav-mobile { display: block; }
    .nav-contenido { padding: 10px 0; }
    .navbar .nav-logo-img { height: 70px; width: 70px; }
}

@media (max-width: 576px) {
    .logo-nombre { font-size: 1.25rem; }
    .logo-tagline { font-size: 0.8rem; }
    .logo-icon { font-size: 2rem; }
    .navbar .nav-logo-img { height: 60px; width: 60px; }
    .nav-logo { gap: 10px; }
    .container { padding: 0 15px; }
    .mobile-menu-contenido { width: 290px; padding: 25px 20px; }
}

@media (max-width: 380px) {
    .logo-tagline { display: none; }
    .logo-nombre { font-size: 1.15rem; }
    .mobile-menu-contenido { width: 100%; }
}
