/**
 * Header RESCOP
 */

/* === BARRA DE TRADUCCIÓN === */
.rescop-translation-bar {
    background-color: #404040 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
    z-index: 1000 !important;
}

.rescop-translation-content {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 clamp(1rem, 4vw, 4rem) !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

/* Resetear cualquier encabezado que pueda aparecer */
.rescop-translation-bar h1,
.rescop-translation-bar h2,
.rescop-translation-bar h3,
.rescop-translation-bar h4,
.rescop-translation-bar h5,
.rescop-translation-bar h6 {
    margin: 0 !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px !important;
    font-family: 'Merriweather Sans', sans-serif !important;
    font-weight: 300 !important;
    letter-spacing: 0.2px !important;
    display: inline !important;
    line-height: 1.2 !important;
}

/* Resetear estilos base del contenedor */
.rescop-translation-bar * {
    font-size: 13px !important;
    line-height: 1.2 !important;
}

/* Estilos específicos para GTranslate en la barra negra */
.rescop-translation-bar .gtranslate_wrapper {
    display: inline-block !important;
}

.rescop-translation-bar .gt_switcher {
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Merriweather Sans', sans-serif !important;
    font-weight: 300 !important;
    font-size: 13px !important;
    letter-spacing: 0.2px !important;
    word-spacing: 0.3em !important;
}

.rescop-translation-bar .gt_switcher a,
.rescop-translation-bar .glink {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-family: 'Merriweather Sans', sans-serif !important;
    font-weight: 300 !important;
    font-size: 13px !important;
    letter-spacing: 0.2px !important;
    transition: color 0.2s ease !important;
    padding: 0.5rem !important;
    display: inline-block !important;
}

.rescop-translation-bar .gt_switcher a:hover,
.rescop-translation-bar .glink:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Estilo para el idioma actual */
.rescop-translation-bar .gt-current-lang {
    color: rgba(255, 255, 255, 1) !important;
    font-weight: 400 !important;
}

.rescop-translation-bar .gt_switcher select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Merriweather Sans', sans-serif !important;
    font-weight: 300 !important;
    font-size: 13px !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.rescop-translation-bar .gt_switcher select:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Espaciado para elementos de lista si los hay */
.rescop-translation-bar .gt_switcher ul,
.rescop-translation-bar .gt_switcher li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.rescop-translation-bar .gt_switcher li {
    display: inline-block !important;
    margin-right: 12px !important;
}

.rescop-translation-bar .gt_switcher li:last-child {
    margin-right: 0 !important;
}

/* === CONTENEDOR PRINCIPAL === */
.rescop-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100px;
    background: white;
    z-index: var(--z-sticky, 1020);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: visible; 
}

.rescop-header.scrolled {
}

/* === CONTENEDOR INTERNO FLEXBOX === */
.rescop-header-inner {
    width: 100%;
    height: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 2rem;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* === LOGO RESPONSIVE MÁS AGRESIVO === */
.rescop-logo {
    flex: 0 0 auto;
    order: 1;
        display: flex;
    align-items: center;
    height: 100%;
    }
    
.rescop-logo img {
    max-width: 233px;
    max-height: 83px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: all 0.3s ease;
}

/* === RESPONSIVE LOGO PROPORCIONAL === */
/* Base: Asumiendo que modificaste la línea 62 con tu tamaño preferido */
/* Calculando proporciones basadas en el ratio original */

@media (max-width: 1680px) {
    .rescop-logo img {
        max-width: 85% !important;
        max-height: 85% !important;
    }
    }
    
@media (max-width: 1400px) {
    .rescop-logo img {
        max-width: 75% !important;
        max-height: 75% !important;
    }
    }

@media (max-width: 1024px) {
    .rescop-logo img {
        max-width: 65% !important;
        max-height: 65% !important;
    }
    }
    
@media (max-width: 768px) {
    .rescop-logo img {
        max-width: 55% !important;
        max-height: 55% !important;
    }
    }
    
@media (max-width: 480px) {
    .rescop-logo img {
        max-width: 45% !important;
        max-height: 45% !important;
    }
    }
    
/* === NAVEGACIÓN DESKTOP === */
.rescop-nav-desktop {
    flex: 1;
    order: 2;
        display: flex;
        justify-content: center;
        align-items: center;
    gap: 2rem;
    height: 100%;
    }
    
/* === ENLACES DE NAVEGACIÓN PRINCIPAL - RESET COMPLETO === */
.rescop-header .rescop-nav-desktop .rescop-nav-link {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    font-size: 24px !important;
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important;
    font-weight: 400 !important;
    line-height: 36px !important;
    text-decoration: none !important;
    text-transform: none !important;

    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    
    /* COLORES */
    color: #404040 !important; 
    background: transparent;
    transition: all 0.3s ease;
}



/* === ESTADOS DE NAVEGACIÓN PRINCIPAL === */
.rescop-header .rescop-nav-desktop .rescop-nav-link:hover {
    color: #BE252D !important;
}

.rescop-header .rescop-nav-desktop .rescop-nav-link.rescop-active {
    color: #BE252D !important;
}

/* === CTA BUTTON === */
.rescop-cta-container {
    flex: 0 0 auto;
    order: 3;
}

.rescop-cta-bg {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 193px;
    height: 40px;
    background: #BE252D;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.rescop-cta-bg:hover {
    background: #9E1E25; 
    transform: translateY(-1px);
}

.rescop-cta-text {
    color: white !important; 
    font-size: 24px !important; 
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important; 
    font-weight: 400 !important;
    line-height: 36px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    word-wrap: break-word;
    white-space: nowrap; 
}

/* === NAVEGACIÓN MÓVIL (oculta por defecto) === */
.rescop-nav-mobile {
    display: none;
}

/* === MENÚ HAMBURGUESA MÁS VISIBLE === */
.rescop-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    order: 2;

    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rescop-mobile-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.rescop-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 18px;
}

.rescop-hamburger-line {
    width: 100%;
    height: 3px;
    background: #404040;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.rescop-mobile-toggle.active .rescop-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.rescop-mobile-toggle.active .rescop-hamburger-line:nth-child(2) {
    opacity: 0;
}

.rescop-mobile-toggle.active .rescop-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === OVERLAY MENÚ MÓVIL === */
.rescop-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rescop-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}
.rescop-mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background: white;
    
    display: flex;
    flex-direction: column;
    
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.rescop-mobile-overlay.active .rescop-mobile-menu {
    transform: translateX(0);
}

/* === HEADER DEL MENÚ MÓVIL === */
.rescop-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.rescop-mobile-logo img {
    width: 120px;
    height: auto;
}

.rescop-mobile-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #404040;
    padding: 0.5rem;
}

/* === NAVEGACIÓN MÓVIL === */
.rescop-mobile-menu-nav {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rescop-nav-mobile-link {
    display: block;
    padding: 1rem;
    color: #404040 !important;
    font-size: 20px !important;
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.rescop-nav-mobile-link:hover,
.rescop-nav-mobile-link.rescop-active {
    color: #BE252D !important;
}

/* === CTA MÓVIL === */
.rescop-mobile-menu-cta {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.rescop-mobile-cta-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #BE252D; 
    color: white !important;
    font-size: 18px !important;
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important;
    font-weight: 400 !important;
    line-height: 24px !important; 
    text-transform: uppercase !important;
    text-align: center;
    text-decoration: none !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.rescop-mobile-cta-button:hover {
    background: #9E1E25; 
}

/* === RESPONSIVE BREAKPOINTS CORREGIDOS === */

/* Desktop large */
@media (min-width: 1681px) {
    .rescop-header-inner {
        padding: 0 4rem;
    }
}

/* Desktop large */
@media (max-width: 1680px) and (min-width: 1401px) {
    .rescop-header .rescop-nav-desktop .rescop-nav-link {
        font-size: 22px;
    }
    
    .rescop-cta-bg {
        width: 180px;
        height: 38px;
    }
    
    .rescop-cta-text {
        font-size: 22px !important; 
        line-height: 32px !important;
    }
}

/* Desktop medium */
@media (max-width: 1400px) and (min-width: 1025px) {
    .rescop-header {
        height: 80px;
    }

    .rescop-header .rescop-nav-desktop .rescop-nav-link {
        font-size: 20px;
        line-height: 30px;
    }
    
    .rescop-cta-bg {
        width: 160px;
        height: 36px;
    }
    
    .rescop-cta-text {
        font-size: 20px !important; 
        line-height: 30px !important;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .rescop-header {
        height: 70px;
    }

    .rescop-header .rescop-nav-desktop .rescop-nav-link {
        font-size: 18px;
        line-height: 28px;
        padding: 2px 6px;
    }

    .rescop-nav-desktop {
        gap: 1rem;
    }

    .rescop-cta-bg {
        width: 140px;
        height: 34px;
    }

    .rescop-cta-text {
        font-size: 18px !important; 
        line-height: 28px !important;
    }
}

/* === MOBILE BREAKPOINT === */
@media (max-width: 768px) {
    .rescop-header {
        height: 60px;
    }
    
    .rescop-header-inner {
        padding: 0 1rem;
        justify-content: space-between;
    }
    
    /* Mostrar hamburguesa */
    .rescop-mobile-toggle {
        display: flex !important;
    }

    /* Ocultar navegación desktop */
    .rescop-nav-desktop {
        display: none !important;
    }
    
    /* Logo móvil */
    .rescop-logo {
        order: 1;
    }

    /* CTA móvil */
    .rescop-cta-container {
        order: 3;
    }

    .rescop-cta-bg {
        width: 100px;
        height: 30px;
    }
    
    .rescop-cta-text {
        font-size: 14px !important; 
        line-height: 18px !important;
    }
}

/* Mobile small */
@media (max-width: 480px) {
    .rescop-header {
        height: 55px;
    }
    
    .rescop-header-inner {
        padding: 0 0.75rem;
    }
    
    .rescop-cta-bg {
        width: 80px;
        height: 26px;
    }
    
    .rescop-cta-text {
        font-size: 12px !important; 
        line-height: 16px !important;
    }
}

/* === ANIMACIONES === */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* === UTILIDADES === */
.rescop-header .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === MENÚ SECUNDARIO === */
.rescop-secondary-menu-container {
    flex: 0 0 auto;
    order: 4; 
    margin-left: 1rem;
}

.rescop-secondary-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    padding: 0;
}

.rescop-secondary-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.rescop-secondary-menu-icon {
    width: 24px;
    height: 36px;
    object-fit: contain;
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
    filter: brightness(0) saturate(100%) invert(25%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(94%);
}

.rescop-secondary-menu-icon::before,
.rescop-secondary-menu-icon::after {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: #404040;
    transition: all 0.3s ease;
}

.rescop-secondary-menu-icon {
    /* Crear las 3 líneas con pseudoelementos y la imagen original oculta */
    background: none;
}

/* Simular 3 líneas con border */
.rescop-secondary-menu-icon::before {
    margin-bottom: 4px;
}

.rescop-secondary-menu-icon::after {
    margin-top: 4px;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #404040;
    height: 3px;
    border-left: none;
    border-right: none;
}

.rescop-secondary-toggle.active .rescop-secondary-menu-icon {
    transform: rotate(90deg);
}

/* === OVERLAY MENÚ SECUNDARIO === */
.rescop-secondary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2001; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rescop-secondary-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rescop-secondary-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.rescop-secondary-overlay.active .rescop-secondary-menu {
    transform: translateX(0);
}

.rescop-secondary-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #F8F8F8;
}

.rescop-secondary-logo img {
    width: 120px;
    height: auto;
}

.rescop-secondary-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #404040;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rescop-secondary-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.rescop-secondary-menu-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
}

/* === ELEMENTOS DEL MENÚ JERÁRQUICO === */
.rescop-secondary-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.rescop-secondary-nav-item.level-0 {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.rescop-secondary-nav-item.level-1 {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rescop-secondary-nav-item:last-child {
    border-bottom: none;
}

/* === ELEMENTOS PADRE === */
.rescop-secondary-parent-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0;
    position: relative;
}

/* === SEPARAR COMPLETAMENTE LOS ESTILOS DEL MENÚ SECUNDARIO === */

/* MENÚ SECUNDARIO*/
.rescop-secondary-overlay .rescop-secondary-nav-link {
    display: block;
    padding: 1rem;
    color: #404040 !important;
    font-size: 14px !important;
    font-family: var(--rescop-font-primary, 'Merriweather Sans', serif) !important;
    font-weight: 400 !important;
    text-transform: none !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-radius: 6px;
    flex: 1;
}

.rescop-secondary-overlay .rescop-secondary-nav-link.level-0 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #BE252D !important;
}

.rescop-secondary-overlay .rescop-secondary-nav-link.level-1 {
    font-size: 16px !important;
    font-weight: 500 !important;
    padding-left: 2rem !important;
    color: #404040 !important;
}

.rescop-secondary-overlay .rescop-secondary-nav-link.level-2 {
    font-size: 14px !important;
    font-weight: 400 !important;
    padding-left: 3rem !important;
    color: rgba(0, 0, 0, 0.70) !important;
}

.rescop-secondary-overlay .rescop-secondary-nav-link:hover,
.rescop-secondary-overlay .rescop-secondary-nav-link.rescop-active {
    color: #BE252D !important;
}

.rescop-secondary-submenu-toggle {
    background: none;
    border: none;
    padding: 1rem 0.75rem;
    cursor: pointer;
    color: #404040;
    transition: all 0.3s ease;
    border-radius: 4px;
    min-width: 44px; 
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rescop-secondary-nav-item:has(.rescop-secondary-submenu .rescop-secondary-nav-item:not(.oculto)) .rescop-secondary-submenu-toggle {
    display: flex !important;
}

.rescop-secondary-nav-item:not(:has(.rescop-secondary-submenu .rescop-secondary-nav-item:not(.oculto))) .rescop-secondary-submenu-toggle {
    display: none !important;
}

.rescop-secondary-nav-item .rescop-secondary-submenu:has(.rescop-secondary-nav-item:not(.oculto)) ~ .rescop-secondary-parent-wrapper .rescop-secondary-submenu-toggle {
    display: flex !important;
}

.rescop-secondary-submenu-toggle:hover {
    background: rgba(190, 37, 45, 0.1);
    color: #BE252D;
}

.rescop-secondary-submenu-toggle.active {
    background: rgba(190, 37, 45, 0.15);
    color: #BE252D;
}

.rescop-submenu-arrow {
    font-size: 14px; 
    transition: transform 0.3s ease;
    font-weight: bold;
}

.rescop-secondary-submenu-toggle.active .rescop-submenu-arrow {
    transform: rotate(180deg);
}

/* === SUBMENÚS CON ANIMACIÓN MEJORADA === */
.rescop-secondary-submenu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease-out;
    background: rgba(190, 37, 45, 0.02);
    border-left: 3px solid transparent;
    margin: 0;
}

.rescop-secondary-submenu.active {
    max-height: 1000px; 
    padding: 0.5rem 0;
}

.rescop-secondary-submenu .rescop-secondary-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rescop-no-secondary-menu {
    color: rgba(0, 0, 0, 0.60) !important;
    font-size: 16px !important;
    font-family: var(--rescop-font-primary, 'Merriweather Sans', serif) !important;
    text-align: center;
    padding: 2rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .rescop-secondary-menu-container {
        order: 4;
        margin-left: 0.5rem;
    }

    .rescop-secondary-toggle {
        width: 36px;
        height: 36px;
    }

    .rescop-secondary-menu-icon {
        width: 20px;
        height: 16px;
    }
    
    .rescop-secondary-menu-icon::before,
    .rescop-secondary-menu-icon::after {
        width: 16px;
    }
}

.rescop-secondary-overlay .rescop-secondary-nav-item.oculto,
.rescop-secondary-nav-item.oculto {
    display: none !important;
}

.rescop-secondary-nav-item.oculto .rescop-secondary-parent-wrapper,
.rescop-secondary-nav-item.oculto .rescop-secondary-submenu {
    display: none !important;
}


/* === MÓVIL: ocultar toggle secundario, solo mostrar hamburguesa === */
@media (max-width: 768px) {
    .rescop-secondary-menu-container {
        display: none !important;
    }
}
