/* ================= Lists (Unused) ================= */

ul, ol, summary {
    list-style: none;
}

/* ================= Form Elements (Unused) ================= */

input {
    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }
}

/* ================= Utilities (Unused) ================= */

.flex {
    display: flex;
}

.wrap {
    flex-wrap: wrap;
}

.w-100 {
    width: 100%;
}

/* ================= Header & Navigation ================= */

.header {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #0d1126;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    font-family: 'Inter', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem clamp(1.5rem, 4vw, 4rem);
    background: #0d1126;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.3s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.header-social a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.header-social i {
    font-size: 1rem;
}

.header-lang {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.header-lang:hover {
    color: #ffffff;
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.header-search:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.header-search input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    width: 200px;
    color: #ffffff;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.header-search i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f5f5f5;
    padding-left: 1.25rem;
}

.search-result-item i {
    color: #00695c;
    font-size: 0.9rem;
}

.search-result-item span {
    font-weight: 500;
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

.header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 4rem);
    background: #0d1126;
    min-height: 60px;
}

.header-dona-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #f2ad48 0%, #e89447 100%);
    color: #0d1126;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(242, 173, 72, 0.3);
    white-space: nowrap;
}

.header-dona-btn:hover {
    background: linear-gradient(135deg, #e89447 0%, #f2ad48 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 173, 72, 0.4);
    color: #0d1126;
}

.header img {
    width: auto;
    max-height: 120px;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.header a:has(img) {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header a:has(img):hover img {
    opacity: 0.85;
}

.header.shrink .header-top {
    padding: 1rem clamp(1.5rem, 4vw, 4rem);
}

.header.shrink img {
    max-height: 80px;
}

.header.shrink .header-bottom {
    min-height: 50px;
}

.header .navbar {
    width: 100%;
    padding: 0;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.header .navbar ul,
.header .navbar li {
    margin: 0;
}

.header .navbar-list {
    align-items: center;
    gap: 0;
    height: 100%;
}

.header .navbar-list > li {
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.header .navbar-list > li:last-child {
    border-right: none;
}

.header .navbar-list > li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header .nav-link {
    padding: 1.25rem 1.75rem;
    border-bottom: 0;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
    display: block;
}

.header .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.header.shrink .nav-link {
    padding: 1rem 1.5rem;
}

.header .link {
    display: block;
    padding: 0.875rem 1.75rem;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 400;
    white-space: nowrap;
    text-align: left;
    font-size: 0.9rem;
    background: white;
}

.header .link:hover {
    color: #00695c;
    background: #f5f5f5;
    padding-left: 2rem;
}

.header .link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #00695c;
    transition: height 0.3s ease;
}

.header .link:hover::before {
    height: 70%;
}

.header .navbar li:has(.selected) .nav-link {
    position: relative;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.header input.mobile-menu-toggle {
    display: none;
}

.header label.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    color: var(--white);
    background: transparent;
    border: none;
    font-size: 1.25rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.header .dropdown {
    display: none;
    position: absolute;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 91, 190, 0.2);
    border-radius: 4px;
    flex-direction: column;
    margin: 0;
    margin-top: 0.5rem;
    z-index: 18;
    min-width: 220px;
    overflow: hidden;
    text-align: left;
}

.header .dropdown li {
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header .dropdown li:last-child {
    border-bottom: none;
}

.header li:hover > .dropdown {
    display: flex;
    animation: fadeInDropdown 0.25s ease;
}

/* Nested dropdown container */
.header .dropdown .dropdown {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0.5rem;
    margin-top: 0;
    z-index: 19;
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 91, 190, 0.2);
    border-radius: 4px;
    flex-direction: column;
    min-width: 220px;
    overflow: hidden;
    text-align: left;
}

/* Show nested dropdown on hover */
.header .dropdown li.has-submenu:hover > .dropdown {
    display: flex !important;
    animation: fadeInDropdown 0.2s ease;
}

/* Mega Menu Styles */
.header .mega-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 91, 190, 0.2);
    border-radius: 4px;
    margin-top: 0;
    z-index: 18;
    min-width: 900px;
    max-width: 1100px;
    animation: fadeInDropdown 0.25s ease;
}

/* Puente invisible para mantener hover activo */
.header .navbar-list > li:nth-child(2)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
    background: transparent;
    z-index: 17;
}

.header li:hover > .mega-menu,
.header li:focus-within > .mega-menu {
    display: block;
}

.header .mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.header .mega-menu-column {
    display: flex;
    flex-direction: column;
}

.header .mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.header .mega-menu-column li {
    border-bottom: none;
}

.header .mega-menu-title {
    color: #00695c;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00695c;
}

.header .mega-menu .link {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #333;
    background: transparent;
    white-space: normal;
}

.header .mega-menu .link:hover {
    color: #00695c;
    background: transparent;
    padding-left: 0.5rem;
}

.header .mega-menu .link::before {
    display: none;
}

.header .mega-menu .link:hover::before {
    display: block;
    width: 2px;
    height: 100%;
    left: 0;
}

.header .dropdown li {
    position: relative;
}

.header .dropdown li > a {
    position: relative;
    display: block;
}

.header .dropdown li.has-submenu > a {
    padding-right: 35px;
}

.header .dropdown li.has-submenu > a::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: #005bbe;
    font-weight: bold;
    line-height: 1;
}

.header .dropdown li.has-submenu:hover > a {
    background-color: rgba(0, 91, 190, 0.05);
}

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

@media (max-width: 1024px) {
    .header-top {
        padding: 1rem;
    }

    .header-utilities {
        gap: 0.75rem;
    }

    .header-search {
        display: none;
    }

    /* Mega menu responsive */
    .header .mega-menu {
        position: static;
        min-width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        margin: 0;
        border-radius: 0;
    }

    .header .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .header .mega-menu-title {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }

    .header .mega-menu .link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .header label.mobile-menu-toggle {
        display: flex;
        font-size: 1.5rem;
        transition: all 0.3s ease;
        color: #333;
    }

    .header label.mobile-menu-toggle:hover {
        color: #00695c;
    }

    .header .navbar {
        position: relative;
    }

    .header .navbar-list {
        height: 100dvh;
        width: min(85%, 340px);
        position: fixed;
        background: white;
        flex-direction: column;
        z-index: 1000;
        top: 0;
        right: -110%;
        padding-top: 1.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0.25rem;
        overflow-y: auto;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    }

    .header #mobile-menu-toggle:checked ~ .navbar-list {
        right: 0;
    }

    .header .navbar-list > li {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .header .nav-link {
        padding: 1rem 1.25rem;
    }

    .header .link {
        padding: 0.875rem 1.5rem;
    }

    .header-dona-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.8rem;
    }

    .header-bottom {
        padding: 0 1rem;
    }
}

/* ================= Desktop Enhancements ================= */
@media (min-width: 1025px) {
    .header .navbar-list {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .header .navbar-list > li > .nav-link {
        font-weight: 500;
    }

    .header .dropdown {
        min-width: 240px;
    }

    /* Smooth scroll behavior for dropdown appearance */
    .header .dropdown li {
        animation: slideInItem 0.2s ease-out backwards;
    }

    .header .dropdown li:nth-child(1) { animation-delay: 0.05s; }
    .header .dropdown li:nth-child(2) { animation-delay: 0.1s; }
    .header .dropdown li:nth-child(3) { animation-delay: 0.15s; }
    .header .dropdown li:nth-child(4) { animation-delay: 0.2s; }
    .header .dropdown li:nth-child(5) { animation-delay: 0.25s; }

    @keyframes slideInItem {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}
