/* Custom Premium Header Styles */

:root {
    --header-bg: #ffffff;
    --header-text-normal: #1a2b3c;
    --header-logo: #141c25;
    --header-accent: #0050cc;
    --header-white: #ffffff;
}

.custom-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(20, 28, 37, 0.04);
    border-bottom: 1px solid rgba(26, 43, 60, 0.08);
    z-index: 1000;
    font-family: 'Plus Jakarta Sans', sans-serif;
    height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.custom-header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo styling */
.custom-header-logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--header-logo);
    text-decoration: none;
    letter-spacing: -0.8px;
    user-select: none;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
}

.custom-header-logo:hover {
    opacity: 0.85;
}

/* Nav Menu styling */
.custom-header-nav {
    display: flex;
    align-items: center;
    margin-right: 48px;
}

.custom-header-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 36px;
}

.custom-header-link {
    font-size: 15px;
    color: var(--header-text-normal);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
}

.custom-header-link:hover {
    color: var(--header-accent);
}

/* Underline animation for non-active links on hover */
.custom-header-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--header-accent);
    transition: width 0.2s ease;
}

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

/* Active Page style: Blue and permanently underlined as in the screenshot */
.custom-header-link.active {
    color: var(--header-accent);
}

.custom-header-link.active::after {
    width: 100%;
}

/* Contact CTA Button */
.custom-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--header-accent);
    color: var(--header-white);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 80, 204, 0.2);
    white-space: nowrap;
}

.custom-header-btn:hover {
    background-color: #0043aa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 80, 204, 0.35);
    color: var(--header-white);
}

.custom-header-btn:active {
    transform: translateY(0);
}

/* Dropdown styles */
.custom-header-has-dropdown {
    position: relative;
}

.custom-header-has-dropdown:hover .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.custom-header-has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-arrow {
    margin-left: 5px;
    transition: transform 0.25s ease;
    display: inline-block;
    vertical-align: middle;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background-color: var(--header-bg);
    box-shadow: 0 10px 30px rgba(20, 28, 37, 0.08), 0 1px 3px rgba(20, 28, 37, 0.02);
    border: 1px solid rgba(26, 43, 60, 0.08);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding-top: 12px; /* Gap bridge */
    pointer-events: none;
}

/* A invisible bridge to allow mouse movement from link to menu without closing */
.custom-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
}

.custom-dropdown-menu-inner {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-dropdown-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text-normal);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: left;
}

.custom-dropdown-item:hover {
    background-color: rgba(0, 80, 204, 0.05);
    color: var(--header-accent);
}

.custom-dropdown-item.active {
    background-color: rgba(0, 80, 204, 0.08);
    color: var(--header-accent);
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .custom-header {
        height: 70px;
    }

    .custom-header-container {
        padding: 0 20px;
    }

    /* Hide navigation links completely on mobile/tablet view */
    .custom-header-nav {
        display: none;
    }

    .custom-header-logo {
        font-size: 23px;
    }

    .custom-header-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}