/* ============================================================
    VARIABLES Y ESTILOS GLOBALES
   ============================================================ */
:root {
    --primary: #2d3436;
    --accent: #00ffff; 
    --light: #f5f6fa;
    --white: #ffffff;
    --gray: #636e72;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    color: var(--primary); 
    background: var(--light); 
}

/* --- Navbar --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Color del enlace de COTECLA */
.link-autor {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.link-autor:hover {
    color: #ffffff;
    text-decoration: underline; 
}

/* --- Logo --- */
.logo img { height: 100px; width: auto; transition: transform 0.3s; }

/* --- Submenús --- */
.has-submenu { position: relative; }
.submenu {
    position: absolute; top: 100%; left: 0; background: var(--white);
    list-style: none; min-width: 220px; box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-radius: 8px; padding: 10px 0; visibility: hidden; opacity: 0;
    transform: translateY(15px); transition: all 0.3s ease; z-index: 1100;
    border-top: 2px solid var(--accent);
}
.has-submenu:hover .submenu { visibility: visible; opacity: 1; transform: translateY(5px); }
.submenu li a { padding: 10px 20px; display: block; text-decoration: none; color: var(--primary); font-size: 0.85rem; font-weight: 500; }
.submenu li a:hover { background: var(--light); }

/* --- WhatsApp en Menú --- */
.whatsapp-nav img {
    width: 40px;
    height: 40px;
    vertical-align: middle;
}
.whatsapp-nav::after { display: none !important; }

/* --- Navegación --- */
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.menu-links { list-style: none; display: flex; gap: 1.1rem; }
.menu-links a { text-decoration: none; color: var(--primary); font-weight: 500; font-size: 0.88rem; position: relative; }
.menu-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; left: 0; background: var(--accent); transition: 0.3s; }
.menu-links a:hover::after { width: 100%; }

/* --- Selector de Idioma --- */
.lang-selector { position: relative; }
.lang-btn { background: var(--light); padding: 8px 15px; border-radius: 20px; cursor: pointer; font-size: 0.85rem; border: 1px solid #ddd; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.lang-options { position: absolute; right: 0; top: 110%; background: white; box-shadow: 0 8px 25px rgba(0,0,0,0.15); border-radius: 12px; overflow: hidden; visibility: hidden; opacity: 0; transition: 0.3s; min-width: 150px; }
.lang-selector:hover .lang-options { visibility: visible; opacity: 1; transform: translateY(5px); }
.lang-option { width: 100%; padding: 12px 18px; border: none; background: none; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.lang-option:hover { background: #f5f5f5; }
.lang-option.active { opacity: 0.4; pointer-events: none; background: #eee; }
.flag { width: 22px; height: 16px; object-fit: cover; }

/* --- Carrusel --- */
.carousel { position: relative; width: 100%; height: 140vh; overflow: hidden; }
.slider { display: flex; width: 300%; height: 100%; transition: transform 0.8s ease-in-out; }
.slide { width: 33.333%; height: 100%; background-size: cover; background-position: center; position: relative; display: flex; align-items: center; justify-content: center; }
.slide::before { content: ''; position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.45); }
.slide-content { position: relative; color: white; text-align: center; z-index: 2; padding: 40px; max-width: 900px; }
.slide-content h2 { font-size: 4.5rem; font-weight: 700; margin-bottom: 1.5rem; }

/* --- Footer --- */
footer { background: #1a1a1a; color: #d1d1d1; padding: 5rem 5% 2rem; margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4rem; }
.footer-col h3 { color: white; margin-bottom: 1.5rem; font-size: 1.2rem; }
.footer-col p, .footer-col ul { font-size: 0.9rem; line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col ul li a { color: #d1d1d1; text-decoration: none; transition: color 0.3s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); margin-top: 3rem; padding-top: 2rem; text-align: center; font-size: 0.85rem; }

/* --- Responsive Corregido --- */
@media (max-width: 768px) {
    /* Forzamos que el botón hamburguesa esté siempre arriba y visible */
    .menu-toggle { 
        display: flex !important; 
        flex-direction: column; 
        gap: 5px; 
        z-index: 1200; 
        cursor: pointer; 
        position: relative;
    }
    .menu-toggle span { width: 25px; height: 3px; background: var(--primary); }

    .nav-right {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: var(--white); flex-direction: column; justify-content: center;
        transition: 0.4s; box-shadow: -5px 0 15px rgba(0,0,0,0.1); gap: 2rem;
        z-index: 1100;
    }
    .nav-right.active { right: 0; }
    
    .menu-links { flex-direction: column; text-align: center; gap: 1.5rem; }
    .submenu { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; display: none; border: none; }
    .has-submenu:hover .submenu { display: block; }
    
    /* Aseguramos que los iconos del footer NO sean gigantes en móvil */
    .social-links li a img {
        width: 28px !important;
        height: 28px !important;
        max-width: 28px;
    }

    .carousel { height: 60vh; }
    .slide-content h2 { font-size: 2.2rem; }
}

@media (min-width: 769px) { .menu-toggle { display: none; } }

/* --- Ocultación Google Translate --- */
#google_translate_element, .goog-te-banner-frame, .goog-te-gadget, .skiptranslate { display: none !important; }
body { top: 0px !important; position: static !important; }

.reverse-email {
    unicode-bidi: bidi-override;
    direction: rtl;
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    text-align: left;
}

.reverse-email:hover { text-decoration: underline; }

/* Redes Sociales */
.social-container { margin: 15px 0 0 0; text-align: left; }
.social-links { list-style: none; display: flex; gap: 1.2rem; justify-content: flex-start; padding: 0; margin: 0; }

.social-links li a img {
    width: 28px;
    height: 28px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.social-links li a:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

.btn-asesoria {
    display: inline-block;
    background-color: #00ffff;
    color: #ffffff !important;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-asesoria:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-asesoria:active { transform: translateY(0); }