/* =========================================================================
   GLOBAL RESPONSIVE BASELINE & MODERN CORPORATE HEADER (2025)
   ========================================================================= */

/* Protecciones globales contra overflow horizontal */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Asegurar responsividad completa de imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Videos también responsive */
video, iframe {
    max-width: 100%;
    height: auto;
}

header {
    background-color: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark header {
    background-color: #111f21;
    border-color: rgba(255, 255, 255, 0.05);
}

/* Scroll adjustments (height and shadow) */
header.scrolled {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.dark header.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

/* Fix for laptop scroll visibility (>=1024px) */
@media (min-width: 1024px) {
    header.scrolled {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
    }
}

/* Nav Link Hover Effect */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #F7942E;
    /* highlight color */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: #0e5a62;
    /* primary */
}

.dark .nav-link:hover {
    color: #19B7B0;
    /* accent */
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Overlay */
#mobile-menu {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark #mobile-menu {
    background: rgba(17, 31, 33, 0.98);
}

#mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Hamburger UI */
#mobile-burger {
    position: relative;
    z-index: 110;
}

.burger-line {
    width: 28px;
    height: 2px;
    background-color: #0e5a62;
    /* primary */
    border-radius: 99px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .burger-line {
    background-color: #19B7B0;
    /* accent */
}

.burger-open .line-1 {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-open .line-2 {
    opacity: 0;
    transform: translateX(-10px);
}

.burger-open .line-3 {
    transform: rotate(-45deg) translate(5px, -5px);
}