/* CHESA Static Site Fixes
   This file contains all CSS fixes for the static site conversion.
   Linked from all pages instead of inline styles.
*/

/* =========================================
   CSS-Only Dropdown Navigation (Desktop)
   ========================================= */
.css-dropdown-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}
.css-dropdown-nav > li {
    position: relative;
    display: inline-block;
}
.css-dropdown-nav > li > a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}
.css-dropdown-nav > li > a:hover {
    color: #e48a13;
}
.css-dropdown-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    border-radius: 4px;
}
.css-dropdown-nav .dropdown-menu li {
    margin: 0;
}
.css-dropdown-nav .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.css-dropdown-nav .dropdown-menu a:hover {
    background: #f5f5f5;
    color: #e48a13;
}
.css-dropdown-nav > li:hover > .dropdown-menu {
    display: block;
}
.css-dropdown-nav .dropdown-menu:hover {
    display: block;
}

/* =========================================
   Offcanvas Navigation Fix
   ========================================= */
.right-sidebar-menu {
    display: none !important;
}
.right-sidebar-menu:target {
    display: block !important;
}
.right-sidebar-menu.active {
    display: block !important;
}
/* Hide the default active menu when ANY other menu is targeted */
.right-first-menu:has(.right-sidebar-menu:target) .right-sidebar-menu.active:not(:target) {
    display: none !important;
}
.side-menu-left li a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
}
.side-menu-left li a:hover {
    color: #e48a13;
}
.right-sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.right-sidebar-menu .submenu li {
    margin-bottom: 15px;
}
.right-sidebar-menu .submenu li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
}
.right-sidebar-menu .submenu li a:before {
    content: "→";
    margin-right: 10px;
}
.right-sidebar-menu .submenu li a:hover {
    text-decoration: underline;
}

/* =========================================
   Mobile Responsive (< 999px)
   Hide desktop dropdown, show hamburger menu
   ========================================= */
@media only screen and (max-width: 999px) {
    .css-dropdown-nav {
        display: none !important;
    }

    /* Hide desktop header on mobile to prevent logo duplication */
    #site-header {
        display: none !important;
    }

    /* Ensure hamburger menu elements are visible */
    #wprmenu_bar,
    #mg-wprm-wrap {
        display: block;
    }

    /* Fix hamburger position - move to left, align with logo */
    #wprmenu_bar {
        display: flex !important;
        flex-direction: row-reverse !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    #wprmenu_bar .hamburger {
        float: none !important;
        position: relative !important;
        right: auto !important;
        order: 1;
    }

    #wprmenu_bar .menu_title {
        float: none !important;
        order: 2;
    }

    /* Fix content being hidden under fixed navbar */
    html {
        padding-top: 78px !important;
    }

    /* Ensure main content has proper spacing */
    .site-content,
    .entry-content,
    main#site-content {
        padding-top: 0 !important;
    }
}

/* =========================================
   Elementor Responsive Visibility Classes
   ========================================= */
@media only screen and (min-width: 1025px) {
    .elementor-hidden-desktop {
        display: none !important;
    }
}
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .elementor-hidden-tablet {
        display: none !important;
    }
}
@media only screen and (max-width: 768px) {
    .elementor-hidden-phone {
        display: none !important;
    }
}

/* =========================================
   Disabled Form Styles
   ========================================= */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper textarea {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"] {
    background-color: #999 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    border: none !important;
}
