.site-header.brand-text {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.site-header .logo-container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1rem;
    z-index: 10;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}

.site-header .logo-container img {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    object-fit: contain;
    flex-shrink: 0;
}

.site-header .logo-container:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(0, 107, 63, 0.4));
}

.brand-text-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tacmex-white);
    letter-spacing: 0.5px;
    margin: 0;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 45px;
}

.main-nav {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInNav 0.8s ease-out 0.3s forwards;
    height: 60px;
}

@keyframes slideInNav {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100%;
}

.main-nav li {
    position: relative;
    margin: 0;
    display: flex;
    align-items: center;
}

.main-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    color: var(--tacmex-white) !important;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
    min-height: 44px;
    box-sizing: border-box;
}

.main-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
    transition: left 0.6s ease;
}

.main-nav a:hover::before {
    left: 100%;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tacmex-green), var(--tacmex-red));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--tacmex-white);
    transform: translateY(-2px);
    text-decoration: none;
}

.main-nav a:hover::after {
    width: 80%;
}

.main-nav a[href*="contacto"] {
    background: linear-gradient(135deg, var(--tacmex-green) 0%, #005533 100%);
    color: var(--tacmex-white) !important;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.main-nav a[href*="contacto"]::before {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.1)
    );
}

.main-nav a[href*="contacto"]:hover {
    background: linear-gradient(135deg, #005533 0%, var(--tacmex-green) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 107, 63, 0.4);
    transform: translateY(-3px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--tacmex-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 2px 0;
    display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.main-nav.mobile-nav-expanded {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(16, 23, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    display: block;
    height: auto;
}

.main-nav.mobile-nav-expanded.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.main-nav.mobile-nav-expanded ul {
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    width: 100%;
    height: auto;
}

.main-nav.mobile-nav-expanded a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    min-height: auto;
}

.main-nav.mobile-nav-expanded a:hover {
    background: rgba(0, 107, 63, 0.1);
    border-color: var(--tacmex-green);
    transform: translateX(5px);
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tacmex-green), var(--tacmex-red));
    transition: width 0.3s ease;
    width: 0%;
}

@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .main-nav ul {
        gap: 0.25rem;
    }
    
    .main-nav a {
        padding: 0.6rem 1rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 1rem;
    }

    .site-header .logo-container img {
        height: 40px;
    }

    .brand-text-logo {
        font-size: 1rem;
        height: 40px;
    }

    .main-nav {
        display: none;
        height: auto;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav.mobile-nav-expanded {
        top: 70px;
    }

    main {
        padding-top: 70px !important;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 65px;
        padding: 0 0.75rem;
    }

    .site-header .logo-container {
        gap: 0.5rem;
    }

    .site-header .logo-container img {
        height: 35px;
    }

    .brand-text-logo {
        font-size: 0.9rem;
        height: 35px;
    }

    .main-nav.mobile-nav-expanded ul {
        padding: 1.5rem;
    }

    .main-nav.mobile-nav-expanded a {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

    main {
        padding-top: 65px !important;
    }
}

main {
    padding-top: 80px;
}

body.scroll-down .brand-text,
body:not(.blog-page).scroll-down .brand-text {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}