/* ============= RESET Y VARIABLES ============= */
:root {
    --header-purple: #6A0DAD;
    --header-orange: #FF8C00;
    --header-bg: #ffffff;
    --header-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --header-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

/* ============= HEADER PRINCIPAL ============= */
.ich-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.ich-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============= MÓVIL HEADER ============= */
.ich-mobile-header {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Parte superior móvil - Logos centrados */
.ich-mobile-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 15px;
    width: 100%;
}

.ich-mobile-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

/* Parte inferior móvil - Redes sociales y menú alineados */
.ich-mobile-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: 1px solid rgba(106, 13, 173, 0.1);
    width: 100%;
}

/* Redes sociales móvil - alineadas a la izquierda */
.ich-mobile-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Botón menú móvil - alineado a la derecha */
.ich-menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-purple);
    border: 2px solid var(--header-purple);
    transition: var(--header-transition);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
}

.ich-menu-toggle:hover {
    background: var(--header-purple);
    color: white;
}

/* ============= DESKTOP HEADER ============= */
.ich-desktop-header {
    display: none;
}

/* Primera fila desktop - Logos y redes sociales */
.ich-desktop-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    width: 100%;
}

.ich-desktop-logos {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

/* Redes sociales desktop - alineadas a la derecha */
.ich-desktop-socials {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Segunda fila desktop - Navegación */
.ich-desktop-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    border-top: 1px solid rgba(106, 13, 173, 0.1);
    width: 100%;
}

.ich-desktop-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}

/* ============= LOGOS ============= */
.ich-logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .ich-logo-img {
        height: 35px;
    }
}

@media (max-width: 480px) {
    .ich-logo-img {
        height: 30px;
    }
}

.ich-logo-link {
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.ich-logo-link:hover {
    opacity: 0.8;
}

.ich-logo-divider {
    width: 1px;
    height: 35px;
    background: linear-gradient(to bottom, transparent, #d1d5db, transparent);
}

/* ============= REDES SOCIALES ============= */
.ich-social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(106, 13, 173, 0.08);
    color: var(--header-purple);
    transition: var(--header-transition);
    font-size: 0.9rem;
    text-decoration: none;
}

.ich-social-icon:hover {
    background: var(--header-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

@media (max-width: 768px) {
    .ich-social-icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ich-social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

.ich-social-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 8px;
}

/* ============= BOTONES ============= */
.ich-contact-btn {
    background: linear-gradient(90deg, var(--header-purple) 0%, var(--header-orange) 100%);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--header-transition);
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ich-contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
    color: white;
}

/* ============= NAVEGACIÓN DESKTOP ============= */

/* Quitar subrayado permanente de los enlaces de menú principal */
.ich-nav-link {
    color: #333;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--header-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Línea de hover solo en menú principal */
.ich-nav-link:hover::before,
.ich-dropdown:hover>.ich-nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 16px;
    right: 16px;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    height: 2px;
    background: linear-gradient(90deg, var(--header-purple) 0%, var(--header-orange) 100%);
    border-radius: 1px;
    transition: max-width 0.3s ease;
}

/* Quitar línea inferior de los iconos sociales y botón contacto */
.ich-social-icon,
.ich-contact-btn {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* ============= DROPDOWNS DESKTOP ============= */
.ich-dropdown {
    position: relative;
}

.ich-dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--header-transition);
    z-index: 1000;
}

/* Flecha dropdown */
.ich-dropdown>.ich-nav-link::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.8rem;
    border: none;
    transition: transform 0.3s ease;
}

/* Hover en desktop - abre dropdown */
@media (min-width: 992px) {
    .ich-dropdown:hover>.ich-dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .ich-dropdown:hover>.ich-nav-link::before {
        max-width: calc(100% - 32px);
    }

    .ich-dropdown:hover>.ich-nav-link::after {
        transform: rotate(180deg);
    }

    .ich-nav-link:hover {
        color: var(--header-purple);
    }
}

/* ============= ITEMS DROPDOWN ============= */

.ich-dropdown-item {
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    transition: var(--header-transition);
    text-decoration: none !important;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ich-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.08) 0%, rgba(255, 140, 0, 0.08) 100%);
    color: var(--header-purple);
    padding-left: 24px;
}

/* Headers dentro de dropdowns */
.ich-dropdown-header {
    padding: 10px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--header-purple);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(106, 13, 173, 0.1);
    margin-bottom: 5px;
}

.ich-dropdown-divider {
    height: 1px;
    background: rgba(106, 13, 173, 0.1);
    margin: 8px 0;
}

/* ============= SUBMENÚS LATERALES DESKTOP ============= */
.ich-submenu-trigger {
    position: relative;
}

.ich-submenu-toggle {
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--header-purple);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--header-transition);
    font-family: inherit;
}

.ich-submenu-toggle:hover {
    background: rgba(106, 13, 173, 0.05);
    padding-left: 24px;
}

.ich-submenu-arrow {
    font-size: 0.7rem;
    color: var(--header-orange);
    transition: transform 0.3s ease;
}

/* SUBMENÚ LATERAL */
.ich-submenu-content {
    position: absolute;
    left: 100%;
    top: -8px;
    min-width: 240px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: var(--header-transition);
    z-index: 1001;
}

/* Hover sobre el trigger muestra el submenú */
@media (min-width: 992px) {
    .ich-submenu-trigger:hover .ich-submenu-content {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .ich-submenu-trigger:hover .ich-submenu-arrow {
        transform: rotate(90deg);
    }
}

/* ============= CORRECCIONES PARA DISEÑO MÓVIL MEJORADO ============= */

/* 1. MENÚ MÓVIL DESPLEGABLE - MÁS COMPACTO */
.ich-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    overflow-y: auto;
    padding: 0 !important;
}

.ich-mobile-menu.open {
    transform: translateX(0);
}

.ich-mobile-menu-content {
    padding: 70px 16px 30px !important;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch !important;
}

/* 2. TÍTULO MÁS COMPACTO */
.ich-mobile-title {
    margin-bottom: 20px !important;
    text-align: left;
}

.ich-mobile-title-text {
    font-size: 1.3rem !important;
    font-weight: 700;
    color: var(--header-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px !important;
}

.ich-mobile-title-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--header-purple) 0%, var(--header-orange) 100%);
    border-radius: 2px;
    margin: 0;
}

/* 3. NAVEGACIÓN MÓVIL MÁS COMPACTA */
.ich-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px !important;
    width: 100%;
}

/* 4. BOTONES MÓVIL - MENOS ESPACIADO, MÁS CONTRASTE */
.ich-mobile-nav-link {
    padding: 12px 16px !important;
    margin: 2px 0 !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    color: #5a0a9c !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%) !important;
    border: 1px solid rgba(106, 13, 173, 0.15) !important;
    text-align: left !important;
    width: 100%;
}

.ich-mobile-nav-link:hover {
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.2) 0%, rgba(255, 140, 0, 0.1) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(106, 13, 173, 0.15) !important;
}

/* 5. DROPDOWNS MÓVIL - MÁS COMPACTOS */
.ich-mobile-dropdown {
    border-radius: 6px !important;
    overflow: hidden;
    border: 1px solid rgba(106, 13, 173, 0.2) !important;
    background: rgba(106, 13, 173, 0.05) !important;
    margin: 4px 0 !important;
    width: 100%;
}

.ich-mobile-dropdown-toggle {
    width: 100%;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%) !important;
    border: none;
    text-align: left !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    color: #5a0a9c !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    margin: 2px 0 !important;
}

.ich-mobile-dropdown-toggle:hover {
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.2) 0%, rgba(255, 140, 0, 0.1) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(106, 13, 173, 0.15) !important;
}

.ich-mobile-dropdown-arrow {
    font-size: 0.75rem !important;
    color: var(--header-orange) !important;
    transition: transform 0.3s ease !important;
}

.ich-mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.ich-mobile-dropdown-content.open {
    max-height: 2000px;
    box-shadow: inset 0 2px 4px rgba(106, 13, 173, 0.05) !important;
}

/* 6. ITEMS DROPDOWN MÓVIL - MÁS COMPACTOS */
.ich-mobile-dropdown-item {
    padding: 10px 16px 10px 24px !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    color: #4a4a4a !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: block;
    border-top: 1px solid rgba(106, 13, 173, 0.08) !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
}

.ich-mobile-dropdown-item:hover {
    background: rgba(106, 13, 173, 0.08) !important;
    color: var(--header-purple) !important;
    padding-left: 28px !important;
}

/* 7. HEADERS DROPDOWN MÓVIL - MÁS SUBTILES */
.ich-mobile-dropdown-header {
    padding: 10px 16px 10px 24px !important;
    font-size: 0.75rem !important;
    font-weight: 700;
    color: var(--header-purple) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(106, 13, 173, 0.15) !important;
    background: rgba(106, 13, 173, 0.08) !important;
    margin-top: 4px !important;
}

/* 8. SUBMENÚS MÓVIL - MÁS COMPACTOS */
.ich-mobile-submenu-trigger {
    position: relative;
    width: 100%;
}

.ich-mobile-submenu-toggle {
    width: 100%;
    padding: 10px 16px 10px 24px !important;
    background: rgba(106, 13, 173, 0.05) !important;
    border: none;
    text-align: left;
    font-size: 0.9rem !important;
    font-weight: 700;
    color: #5a0a9c !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease !important;
    border-top: 1px solid rgba(106, 13, 173, 0.08) !important;
    margin: 0 !important;
}

.ich-mobile-submenu-arrow {
    font-size: 0.65rem !important;
    color: var(--header-orange) !important;
    transition: transform 0.3s ease !important;
}

.ich-mobile-submenu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(106, 13, 173, 0.02) !important;
    width: 100%;
}

.ich-mobile-submenu-content.open {
    max-height: 1000px !important;
    height: auto !important;
    position: relative !important;
    box-shadow: inset 0 2px 4px rgba(106, 13, 173, 0.05) !important;
    display: block !important;
    overflow: visible !important;
    visibility: visible !important;
}

.ich-mobile-submenu-item {
    /* Increased indentation from 32px to 48px for better visual hierarchy */
    padding: 8px 16px 8px 48px !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    color: #555 !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: block;
    border-top: 1px solid rgba(106, 13, 173, 0.05) !important;
    /* Added left border for visual cue */
    border-left: 3px solid transparent !important;
    transition: all 0.2s ease !important;
}

.ich-mobile-submenu-item:hover {
    background: rgba(106, 13, 173, 0.06) !important;
    color: var(--header-purple) !important;
    /* Maintain relative indentation on hover */
    padding-left: 52px !important;
    border-left-color: var(--header-purple) !important;
}

/* 9. BOTÓN CONTACTO MÓVIL MÁS INTEGRADO */
.ich-mobile-contact-btn {
    margin-top: 20px !important;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 24px !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
}

/* 10. BOTÓN CERRAR MÁS COMPACTO */
.ich-mobile-close {
    position: absolute;
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px;
    background: rgba(106, 13, 173, 0.1) !important;
    border: 1px solid var(--header-purple) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-purple);
    cursor: pointer;
    transition: var(--header-transition);
    z-index: 1041;
}

.ich-mobile-close:hover {
    background: var(--header-purple);
    color: white;
}

/* 11. EFECTOS TÁCTILES MEJORADOS PARA MÓVIL */
@media (hover: none) and (pointer: coarse) {

    .ich-mobile-nav-link:active,
    .ich-mobile-dropdown-toggle:active,
    .ich-mobile-dropdown-item:active,
    .ich-mobile-submenu-item:active {
        background: linear-gradient(135deg, rgba(106, 13, 173, 0.25) 0%, rgba(255, 140, 0, 0.15) 100%) !important;
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
}

/* 12. DIVISORES MÁS SUBTILES */
.ich-dropdown-divider {
    height: 1px !important;
    background: rgba(106, 13, 173, 0.1) !important;
    margin: 6px 0 !important;
}

/* ============= RESPONSIVE ============= */
@media (min-width: 992px) {
    .ich-mobile-header {
        display: none !important;
    }

    .ich-desktop-header {
        display: block !important;
    }
}

@media (max-width: 991px) {
    .ich-desktop-header {
        display: none !important;
    }

    .ich-mobile-header {
        display: flex !important;
    }

    /* Ajustes para móvil */
    .ich-mobile-logos {
        gap: 12px;
    }

    .ich-mobile-socials {
        gap: 8px;
        justify-content: flex-start;
    }

    .ich-menu-toggle {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .ich-mobile-top {
        padding: 10px 15px;
    }

    .ich-mobile-bottom {
        padding: 8px 15px;
    }

    .ich-mobile-logos {
        gap: 10px;
    }

    .ich-logo-divider {
        height: 30px;
    }
}

/* 13. AJUSTES PARA PANTALLAS MUY PEQUEÑAS */
@media (max-width: 480px) {
    .ich-mobile-top {
        padding: 8px 12px !important;
    }

    .ich-mobile-bottom {
        padding: 6px 12px !important;
    }

    .ich-mobile-logos {
        gap: 8px !important;
    }

    .ich-logo-img {
        height: 28px !important;
    }

    .ich-mobile-socials {
        gap: 6px;
    }

    .ich-social-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.75rem !important;
    }

    .ich-menu-toggle {
        width: 34px !important;
        height: 34px !important;
    }

    .ich-mobile-menu-content {
        padding: 60px 12px 25px !important;
    }

    .ich-mobile-title-text {
        font-size: 1.2rem !important;
    }

    .ich-mobile-nav-link,
    .ich-mobile-dropdown-toggle {
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
    }

    .ich-mobile-dropdown-item {
        padding: 8px 14px 8px 22px !important;
        font-size: 0.85rem !important;
    }

    .ich-mobile-submenu-item {
        padding: 7px 14px 7px 28px !important;
        font-size: 0.8rem !important;
    }

    .ich-contact-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* 14. MEJORAR SCROLL EN MENÚ MÓVIL */
.ich-mobile-menu-content::-webkit-scrollbar {
    width: 4px !important;
}

.ich-mobile-menu-content::-webkit-scrollbar-track {
    background: rgba(106, 13, 173, 0.05) !important;
}

.ich-mobile-menu-content::-webkit-scrollbar-thumb {
    background: var(--header-purple) !important;
    border-radius: 2px !important;
}

/* 15. ESTADOS ACTIVOS MÁS VISIBLES */
.ich-mobile-dropdown-toggle.active,
.ich-mobile-submenu-toggle.active {
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.15) 0%, rgba(255, 140, 0, 0.08) 100%) !important;
    border-color: var(--header-purple) !important;
}

/* ============= ANIMACIONES ============= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============= UTILIDADES ============= */
.text-uppercase {
    text-transform: uppercase !important;
}

.font-bold {
    font-weight: 700 !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

.rotate-90 {
    transform: rotate(90deg);
}

/* Prevenir scroll cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}