/* Header Layout CSS - Extracted from Reference Site */
/* This CSS matches the exact layout of the reference Edudemy site */

/* Desktop Layout (min-width: 768px) - FROM REFERENCE */
@media(min-width:768px) {

    /* Logo Column - 25% like reference */
    .elementor-391 .elementor-element.elementor-element-b23c039 {
        width: 25% !important;
    }

    /* Navigation Column - 49.333% like reference (the ".333" matters!) */
    .elementor-391 .elementor-element.elementor-element-d6bd48d {
        width: 49.333% !important;
    }

    /* Phone/Email Column - 25% like reference */
    .elementor-391 .elementor-element.elementor-element-9788287 {
        width: 25% !important;
    }

    /* Shift navigation menu 20px to the right */
    .elementor-391 .elementor-element.elementor-element-b0b8c04 {
        margin-left: 150px !important;
    }
}

/* Tablet Layout (768px to 1024px) - FROM REFERENCE */
@media(max-width:1024px) and (min-width:768px) {
    .elementor-391 .elementor-element.elementor-element-b23c039 {
        width: 20% !important;
    }

    .elementor-391 .elementor-element.elementor-element-d6bd48d {
        width: 80% !important;
    }

    .elementor-391 .elementor-element.elementor-element-9788287 {
        width: 20% !important;
    }
}

/* Navigation Column - center justify from reference */
.elementor-391 .elementor-element.elementor-element-d6bd48d.elementor-column>.elementor-widget-wrap {
    justify-content: center !important;
}

/* Phone/Email Icon list - inline items layout from reference */
.elementor-391 .elementor-element.elementor-element-aaec923 .elementor-icon-list-items.elementor-inline-items {
    justify-content: flex-end !important;
}

/* Main container - from reference */
.elementor-391 .elementor-element.elementor-element-18adfbd>.elementor-container {
    max-width: 1150px !important;
}

.elementor-391 .elementor-element.elementor-element-18adfbd>.elementor-container>.elementor-column>.elementor-widget-wrap {
    align-content: center !important;
    align-items: center !important;
}

/* Header Logo - Static Size (Prevent Resizing) */
.elementor-widget-image img.wp-image-1554 {
    width: 250px !important;
    max-width: none !important;
    height: auto !important;
    transform: none !important;
}

/* Un-nest "More" menu on mobile devices */
@media(max-width:1024px) {
    /* Hide the parent "More" link */
    li#menu-item-2210 > a {
        display: none !important;
    }
    
    /* Make the sub-menu visible inline as if it were top-level */
    li#menu-item-2210 > ul.sub-menu {
        display: block !important;
        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        transform: none !important;
        border: none !important;
        height: auto !important;
    }
    
    /* Reset padding on list items to align with main menu */
    li#menu-item-2210 > ul.sub-menu > li {
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }
    
    /* Reset link styles to match top-level */
    li#menu-item-2210 > ul.sub-menu > li > a {
        padding-left: 20px !important;
        background: transparent !important;
        color: #ffffff !important;
    }

    /* Force absolutely flat alignment across the entire menu to fix staggering */
    .elementor-widget-jkit_nav_menu .jkit-menu-wrapper .jkit-menu > li,
    .elementor-widget-jkit_nav_menu .jkit-menu-wrapper .jkit-menu > li#menu-item-2210 > ul.sub-menu > li {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .elementor-widget-jkit_nav_menu .jkit-menu-wrapper .jkit-menu > li > a,
    .elementor-widget-jkit_nav_menu .jkit-menu-wrapper .jkit-menu > li#menu-item-2210 > ul.sub-menu > li > a {
        padding-left: 20px !important;
        margin-left: 0 !important;
    }

    /* Preserve indentation for the Login dropdown */
    li#menu-item-login > ul.sub-menu > li > a {
        padding-left: 40px !important;
    }
}

/* Mobile Header Layout - Align Hamburger to the Right */
@media(max-width:767px) {
    /* Fix the outer header container so it takes full width and removes negative margin */
    header.site-header {
        margin-right: 0 !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* Ensure all outer wrappers take full width so the inner flexbox can span the screen */
    header.site-header .elementor-391,
    header.site-header .elementor-391 .elementor-section.elementor-top-section,
    header.site-header .elementor-391 .elementor-top-column,
    header.site-header .elementor-391 .elementor-top-column > .elementor-widget-wrap {
        width: 100% !important;
        flex: 1 1 100% !important;
        display: block !important;
    }

    /* Force the header container into a flex row to fit both columns */
    .elementor-391 .elementor-element.elementor-element-18adfbd > .elementor-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Logo column takes available space */
    .elementor-391 .elementor-element.elementor-element-b23c039 {
        width: auto !important;
        flex: 1 1 auto !important;
    }

    /* Hamburger menu column aligns to the far right */
    .elementor-391 .elementor-element.elementor-element-d6bd48d {
        width: auto !important;
        flex: 0 0 auto !important;
    }
    
    .elementor-391 .elementor-element.elementor-element-d6bd48d .elementor-widget-wrap {
        justify-content: flex-end !important;
        width: 100% !important;
    }
    
    /* Ensure the hamburger button itself pushes right and is enlarged to match logo height */
    .elementor-widget-jkit_nav_menu .jkit-hamburger-menu {
        margin-left: auto !important;
        height: 55px !important;
        width: 55px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .elementor-widget-jkit_nav_menu .jkit-hamburger-menu i {
        font-size: 30px !important;
    }
}