/* 
 * Advanced Header Behavior - Uniform Capsule Design
 * Persistent floating header with frosted glass effect
 */

#header {
    /* Persistent Capsule Design */
    position: fixed !important;
    top: 20px;
    left: 5%;
    right: 5%;
    width: 90%;
    max-width: 1400px; /* Limit width on very large screens */
    margin: 0 auto;
    z-index: 9999;
    
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    padding: 12px 30px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s ease, 
                opacity 0.4s ease,
                top 0.4s ease;
    will-change: transform, opacity, top;
}

/* Ensure inner container doesn't break the capsule */
#header .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hidden State is no longer used for the persistent capsule design */
/* .header--hidden { transform: translateY(-150%); opacity: 0; } */

/* Shrink State */
.header--shrink {
    top: 10px;
    padding: 8px 25px !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Logo and Menu scaling in Shrink State */
#header .logo img,
#header .site-logo {
    max-height: 45px !important;
    width: auto !important;
    transition: max-height 0.4s ease;
}

.header--shrink .logo img,
.header--shrink .site-logo {
    max-height: 38px !important;
}

/* Menu items adjustment */
#header .menu > li > a {
    padding: 10px 15px !important;
}

/* Dark Skin Compatibility */
body.alpha-dark #header {
    background-color: rgba(30, 30, 30, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Sticky state logic - slightly enhance shadow when sticky */
.header--sticky {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    #header {
        top: 10px;
        width: 94%;
        left: 3%;
        right: 3%;
        padding: 8px 15px !important;
        }
    .header--shrink {
        top: 5px;
    }
}

/* Quick Application Page Layout Standardization (Page ID: 4504) */
.page-id-4504 .page-content {
    max-width: 1540px;
    margin: 40px auto;
    padding: 0 40px;
    box-sizing: border-box;
    background-color: #fff;
}

/* Ensure the content area is centered and aligned */
.page-id-4504 .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
}

/* Fix for heading alignment */
.page-id-4504 h1, 
.page-id-4504 h2, 
.page-id-4504 .elementor-heading-title {
    padding-left: 0 !important;
}

@media (max-width: 767px) {
    .page-id-4504 .page-content {
        margin: 20px auto;
        padding: 0 20px;
    }
}
