/* ===================================================
   1. TIPOGRAFÍAS - SANTOS
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@900&display=swap');

@font-face {
    font-family: 'gordita_black';
    src: url('../fonts/gordita/Gordita-Black.otf');
}
@font-face {
    font-family: 'gordita_medium';
    src: url('../fonts/gordita/Gordita-Medium.otf');
}
@font-face {
    font-family: 'gordita_light';
    src: url('../fonts/gordita/Gordita-Light.otf');
}

body, p, span, a, li {
    font-family: var(--font-body);
}

h1:not(.nombre),
.title_section {
    font-family: var(--font-hero) !important;
    font-weight: 900;
}

h2, h3, .a_texto {
    font-family: var(--font-heading);
    text-transform: none;
}

.tup, .a_sub_texto, .nombre_seccion {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.btn_1, nav a {
    font-family: var(--font-heading);
    letter-spacing: var(--tracking-wide);
}

/* ===================================================
   2. HEADER — LOGO (IZQUIERDA)
   =================================================== */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: calc(var(--z-header) - 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow var(--ease-default);
}

.header-bar.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.header-brand {
    position: fixed;
    top: 8px;
    left: 20px;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    gap: 16px;
    height: 63px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--ease-default);
}

.header-logo-link:hover {
    transform: scale(1.03);
}

.logo-mini {
    width: 63px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-brand-name {
    font-family: var(--font-hero);
    font-weight: 900;
    font-size: 40px;
    color: var(--color-primary);
    line-height: 0.85;
    text-transform: capitalize;
}

/* Brand dentro del panel deslizante */
.side_menu-brand {
    position: absolute;
    top: 8px;
    left: 64px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
    pointer-events: none;
}

#menuToggle:checked ~ .side_menu .side_menu-brand {
    opacity: 1;
}

.side_menu-logo {
    width: 63px;
    height: auto;
}

.side_menu-brand-name {
    font-family: var(--font-hero);
    font-weight: 900;
    font-size: 40px;
    color: var(--color-white);
    line-height: 0.85;
    text-transform: capitalize;
}

/* ===================================================
   3. HEADER — RRSS + IDIOMA (DERECHA)
   =================================================== */
.header-nav {
    position: fixed;
    top: 8px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: var(--z-header);
    height: 63px;
}

/* Selector de idioma */
.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-btn {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    text-decoration: none;
    transition: transform var(--ease-default), box-shadow var(--ease-default);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lang-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ===================================================
   4. REDES SOCIALES
   =================================================== */
.header-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-social a {
    color: var(--color-primary);
    font-size: 20px;
    line-height: 1;
    transition: color var(--ease-default);
    display: flex;
    align-items: center;
}

.header-social a:hover {
    color: var(--color-accent);
}

/* ===================================================
   5. MENU HAMBURGUESA
   =================================================== */
.menuToggle {
    display: none;
}

.hamburger {
    width: 28px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2001;
}

.hamburger span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all var(--ease-snappy);
}

/* Transformación a X */
#menuToggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--color-white);
}
#menuToggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(15px);
}
#menuToggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    background: var(--color-white);
}

/* ===================================================
   6. CAPA DE FONDO (OVERLAY)
   =================================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#menuToggle:checked ~ .menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ===================================================
   7. MENÚ LATERAL (SIDE MENU) — DESDE LA IZQUIERDA
   =================================================== */
.side_menu {
    position: fixed;
    top: 0;
    left: -340px;
    width: 320px;
    height: 100vh;
    background: var(--color-primary);
    padding-top: 100px;
    transition: left 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    z-index: var(--z-menu);
    box-shadow: none;
    overflow-y: auto;
}

#menuToggle:checked ~ .side_menu {
    left: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.side_menu ul {
    list-style: none;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Animación cascada */
.side_menu ul li {
    opacity: 0;
    transform: translateX(-25px);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

#menuToggle:checked ~ .side_menu ul li {
    opacity: 1;
    transform: translateX(0);
}

.side_menu > ul > li:nth-child(1) { transition-delay: 0.1s; }
.side_menu > ul > li:nth-child(2) { transition-delay: 0.15s; }
.side_menu > ul > li:nth-child(3) { transition-delay: 0.20s; }
.side_menu > ul > li:nth-child(4) { transition-delay: 0.25s; }
.side_menu > ul > li:nth-child(5) { transition-delay: 0.30s; }
.side_menu > ul > li:nth-child(6) { transition-delay: 0.35s; }
.side_menu > ul > li:nth-child(7) { transition-delay: 0.40s; }
.side_menu > ul > li:nth-child(8) { transition-delay: 0.45s; }

.side_menu a {
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    color: var(--color-white);
    position: relative;
    display: inline-block;
    transition: color var(--ease-default);
    letter-spacing: 0.5px;
}

.side_menu a:hover {
    color: var(--color-accent-light);
}

.side_menu a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: width var(--ease-default);
}

.side_menu a:hover::after {
    width: 100%;
}

/* ── Submenú (Servicios) ── */
.submenu-toggle {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    color: var(--color-white);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: color var(--ease-default);
}

.submenu-toggle::after {
    content: " +";
    font-size: 13px;
    opacity: 0.5;
}

.has-submenu.open .submenu-toggle::after {
    content: " −";
}

.submenu-toggle:hover {
    color: var(--color-accent-light);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.has-submenu.open .submenu {
    max-height: 200px;
    margin-top: 14px;
}

.submenu li {
    padding-left: 16px;
    opacity: 1 !important;
    transform: none !important;
}

.submenu a {
    font-size: 15px !important;
    color: var(--color-accent-light) !important;
    opacity: 0.85;
}

.submenu a:hover {
    opacity: 1;
    color: var(--color-white) !important;
}

@media (max-height: 500px) {
    .side_menu ul { gap: 10px; }
    .side_menu a { font-size: 14px; }
    .submenu-toggle { font-size: 14px; }
    .submenu a { font-size: 13px !important; }
    .side_menu { padding-top: 60px; }
}

/* ===================================================
   8. RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
    .side_menu {
        width: 300px;
        left: -320px;
    }
    .side_menu ul {
        padding-left: 32px;
    }
}

@media (max-width: 768px) {
    .header-social {
        gap: 10px;
    }
    .header-social a {
        font-size: 18px;
    }
    .logo-mini {
        width: 50px;
    }
    .header-brand-name {
        font-size: 28px;
    }
    .header-bar {
        height: 65px;
    }
    .header-nav {
        height: 50px;
    }
    .header-brand {
        left: 14px;
        top: 8px;
        gap: 12px;
        height: 50px;
    }
    .side_menu {
        width: 280px;
        left: -300px;
        padding-top: 80px;
    }
    .side_menu ul {
        padding-left: 28px;
        gap: 16px;
    }
    .side_menu a {
        font-size: 16px;
    }
    .submenu-toggle {
        font-size: 16px;
    }
    .submenu a {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .header-social {
        display: none;
    }
    .header-bar {
        height: 56px;
    }
    .header-brand {
        top: 6px;
        left: 10px;
        gap: 10px;
        height: 44px;
    }
    .logo-mini {
        width: 44px;
    }
    .header-brand-name {
        font-size: 24px;
    }
    .header-nav {
        height: 44px;
    }
    .side_menu {
        width: 260px;
        left: -280px;
        padding-top: 70px;
    }
    .side_menu ul {
        padding-left: 24px;
        gap: 14px;
    }
    .side_menu a {
        font-size: 15px;
    }
    .submenu-toggle {
        font-size: 15px;
    }
}
