
/* ==========================================================================
   Modern Header Theme - Blue & White Glassmorphism
   Senior Frontend Engineer Edition
   ========================================================================== */

/* --- Variables --- */
:root {
    --header-height: 72px;
    --primary-blue: #006eff;
    --primary-hover: #0056cc;
    --text-main: #333333;
    --text-sub: #666666;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-blur: blur(12px);
    --nav-text-color: #333;
    --nav-hover-color: #006eff;
    --dropdown-bg: rgba(255, 255, 255, 0.95);
    --transition-speed: 0.3s;
}

/* --- Global Reset & Base --- */
.idcmaster-nav {
    width: 100%;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: fixed; /* Sticky header */
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.head_main {
    width: 100%;
    max-width: 1400px; /* Wider container for modern look */
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
    border-bottom: none; /* Remove old border */
}

/* --- Logo Section --- */
.idcmaster-logo {
    float: none; /* Flexbox handling */
    display: flex;
    align-items: center;
    height: 100%;
}

.idcmaster-logo a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
}

.idcmaster-logo img {
    height: 36px; /* Optimized logo size */
    width: auto;
    max-height: unset;
    margin: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.idcmaster_name {
    font-size: 20px;
    color: var(--primary-blue);
    font-weight: 700;
    margin-left: 12px;
    font-style: normal;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-top: 0;
}

/* --- Navigation Menu --- */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center; /* Center navigation */
    height: 100%;
}

.header-nav ul {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-nav-li {
    float: none;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 4px; /* Spacing between items */
}

.header-nav-li > a {
    display: flex;
    align-items: center;
    height: 40px; /* Pill shape height */
    padding: 0 20px;
    color: var(--nav-text-color);
    font-size: 15px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.2s ease;
    line-height: normal;
}

.header-nav-li:hover > a,
.header-nav-li.active > a {
    color: var(--primary-blue);
    background: rgba(0, 110, 255, 0.06);
}

.nav-item-name {
    color: inherit; /* Inherit from parent a */
    font-size: inherit;
    font-weight: inherit;
}

/* --- User Actions (Right Side) --- */
.idcmaster-user-top {
    display: flex;
    align-items: center;
    height: 100%;
}

.idcmaster-user-top li {
    float: none;
    padding: 0;
    margin-left: 16px;
    line-height: normal;
}

.idcmaster-user-top li a {
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.idcmaster-user-top li a:hover {
    color: var(--primary-blue);
}

/* Buttons */
.btn-login {
    /* Implicit style */
}

.btn-register {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 36px !important;
    padding: 0 24px !important;
    background: linear-gradient(135deg, #006eff 0%, #0056cc 100%);
    color: #fff !important;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 110, 255, 0.4);
    opacity: 1; /* Override default opacity hover */
}

.btn-register:before {
    display: none; /* Remove old icon */
}

/* --- Mega Menu / Dropdown (Glassmorphism) --- */
.apy-pop-list,
.domain-dropdown,
.domain-dropdown2,
.dropdown-menu,
.dropdown-menu1 {
    top: var(--header-height) !important;
    background: var(--dropdown-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
    border-radius: 0 0 12px 12px !important;
    padding: 30px 0 !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* Mega Menu Content Layout */
.clearfix {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.product-any {
    gap: 40px;
}

.apy-pop-item {
    padding: 0 !important;
}

.apy-pop-item-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: block;
    padding-left: 10px;
    border-left: 3px solid var(--primary-blue);
    line-height: 1;
}

/* Product Links in Dropdown */
.product-server-item {
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.product-server-item:hover {
    background: rgba(0, 110, 255, 0.05);
}

.product-server-item img, 
.product-server-item svg {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.product-server-item a {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.product-server-item:hover a {
    color: var(--primary-blue);
}

.product-server-item p {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Simple Dropdown Menu */
.dropdown-menu, 
.dropdown-menu1 {
    min-width: 160px;
    border-radius: 12px !important;
    padding: 8px !important;
    left: 50% !important;
    transform: translateX(-50%);
    top: calc(100% + 10px) !important; /* Slight offset */
}

.dropdown-menu::before,
.dropdown-menu1::before {
    top: -6px;
    left: 50%;
    margin-left: -8px;
    background: var(--dropdown-bg);
    border-top: 1px solid rgba(255,255,255,0.6);
    border-left: 1px solid rgba(255,255,255,0.6);
    box-shadow: none;
}

.dropdown-item {
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(0, 110, 255, 0.06);
    color: var(--primary-blue);
}

/* Override existing background images/gradients */
.apy-pop-list {
    background: var(--dropdown-bg) !important;
}

/* Scrollbar in Dropdown */
.product-server-item-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.product-server-item-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

/* --- Fixes for Mobile/Responsive (Basic protection) --- */
@media (max-width: 1200px) {
    .idcmaster-nav {
        background: #fff; /* Solid background for mobile */
    }
    .head_main {
        padding: 0 16px;
    }
    .header-nav {
        display: none; /* Usually hidden on mobile in favor of hamburger */
    }
}

/* Enhanced Dropdown Menu Arrows */
.header-nav-li > a i.fa-angle-down {
    margin-left: 6px;
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.header-nav-li:hover > a i.fa-angle-down {
    transform: rotate(180deg);
    opacity: 1;
}

/* User Menu Dropdown Adjustment */
.idcmaster-user-top {
    position: relative;
}

.idcmaster-user-top .dropdown-menu {
    right: 0;
    left: auto !important;
    transform: none !important;
    top: calc(100% + 15px) !important;
}

.idcmaster-user-top .dropdown-menu::before {
    left: auto;
    right: 20px;
}

/* Glassmorphism for Mobile Menu */
@media (max-width: 1200px) {
    .menu-box-mobile {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
}
