/* Custom Navigation Enhancements */

/* Active link styling for desktop navigation */
.cs_nav_list li a.active {
    color: #274760 !important;
    font-weight: 600;
    position: relative;
}

.cs_nav_list li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #274760;
}

/* Hover effect for nav links */
.cs_nav_list li a:hover {
    color: #8E9FAC !important;
    transition: color 0.3s ease;
}

/* Mobile navigation in sidebar */
.cs_mobile_nav a {
    transition: all 0.3s ease;
}

.cs_mobile_nav a:hover {
    color: #8E9FAC !important;
    padding-left: 10px !important;
    transition: all 0.3s ease;
}

/* Smooth sidebar animations */
.cs_sidenav {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs_sidenav_in {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff !important;
}

.cs_sidenav_overlay {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Prevent body scroll when sidebar is open */
body.cs_sidenav_active {
    overflow: hidden;
}

/* Better close button visibility and interaction */
.cs_sidenav_in .cs_close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
}

.cs_sidenav_in .cs_close:hover {
    transform: rotate(90deg);
}

/* ─── Sidebar contact details: compact icons & text ─── */
.cs_sidenav_in .cs_iconbox.cs_style_11 {
    padding: 18px 20px;
    gap: 14px;
}

.cs_sidenav_in .cs_iconbox.cs_style_11 .cs_iconbox_icon {
    max-width: 36px;
    flex: 0 0 36px;
}

.cs_sidenav_in .cs_iconbox.cs_style_11 .cs_iconbox_icon img {
    width: 100%;
    height: auto;
}

.cs_sidenav_in .cs_iconbox.cs_style_11 .cs_iconbox_title {
    font-size: 16px;
    line-height: 1.3;
}

.cs_sidenav_in .cs_iconbox.cs_style_11 .cs_iconbox_subtitle {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

/* ─── Sidebar newsletter section: more compact ─── */
.cs_sidenav_in .cs_newsletter.cs_style1 .cs_newsletter_title {
    font-size: 20px;
    line-height: 1.3em;
    margin-bottom: 4px;
}

.cs_sidenav_in .cs_newsletter.cs_style1 .cs_newsletter_subTitle {
    font-size: 13px;
}

.cs_sidenav_in .cs_newsletter.cs_style1 .cs_newsletter_form {
    margin-top: 12px;
}

.cs_sidenav_in .cs_newsletter.cs_style1 .cs_newsletter_input {
    height: 50px;
    padding: 8px 130px 8px 20px;
    font-size: 13px;
}

.cs_sidenav_in .cs_newsletter.cs_style1 .cs_btn.cs_style_1 {
    top: 6px;
    right: 6px;
    padding: 6px 16px;
    font-size: 13px;
}

/* Reduce spacing between sidebar sections */
.cs_sidenav_in .cs_height_60 {
    height: 30px;
}

.cs_sidenav_in .cs_height_70 {
    height: 30px;
}

/* ─── Sidebar "Follow Us" section: compact & balanced ─── */
.cs_sidenav_in .cs_social_links_wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.cs_sidenav_in .cs_social_links_wrap h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.cs_sidenav_in .cs_social_links {
    gap: 10px;
}

.cs_sidenav_in .cs_social_links a {
    height: 36px;
    width: 36px;
    font-size: 15px;
}

/* SIMPLE FIX: Make hamburger clickable with large tap target */
.cs_sidebar_toggle_btn {
    position: relative !important;
    z-index: 99999 !important;
    padding: 10px !important;
    margin: -10px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.cs_sidebar_toggle_btn svg {
    pointer-events: none !important;
}

/* Disable cursor effects that interfere */
.cursor,
#client_cursor,
.cs_cursor_lg,
.cs_cursor_sm {
    pointer-events: none !important;
}

/* ─── Mobile navigation (sidebar navigation links) ─── */
/* Hide sidebar mobile nav on desktop (≥1200px) */
@media (min-width: 1200px) {
    .cs_mobile_nav {
        display: none;
    }
}

/* ─── Responsive header: tablet & below (≤1199px) ─── */
/* Matches the theme's breakpoint so we fully take over mobile nav */
@media (max-width: 1199px) {
    /* Hide desktop nav links – they move to the sidebar */
    .cs_nav {
        display: none !important;
    }

    /* Hide the theme's built-in hamburger (we use sidebar toggle instead) */
    .cs_menu_toggle {
        display: none !important;
    }

    /* Override theme hiding the sidebar toggle button */
    .cs_toolbox .cs_sidebar_toggle_btn {
        display: flex !important;
    }

    /* Hide Sign In / Sign Up / Dashboard / Logout in header – available in sidebar */
    .cs_header_action_links {
        display: none !important;
    }

    /* Shrink header height */
    .cs_site_header.cs_style1 .cs_main_header_in {
        height: 70px !important;
    }

    /* Reduce logo text size */
    .cs_site_branding span {
        font-size: 18px !important;
    }

    /* Tighten toolbox gap */
    .cs_toolbox {
        gap: 10px !important;
    }

    /* Remove theme's extra padding (was for .cs_menu_toggle absolute positioning) */
    .cs_site_header.cs_style1 .cs_main_header_right {
        padding-right: 10px !important;
    }
}

/* ─── Small tablets & phones (≤767px) ─── */
@media (max-width: 767px) {
    .cs_site_header.cs_style1 .cs_main_header_in {
        height: 65px !important;
    }

    .cs_site_branding img {
        height: 36px !important;
    }

    .cs_site_branding span {
        font-size: 17px !important;
    }
}

/* ─── Small phones (≤575px) ─── */
@media (max-width: 575px) {
    .cs_site_header.cs_style1 .cs_main_header_in {
        height: 60px !important;
    }

    .cs_site_branding img {
        height: 32px !important;
    }

    .cs_site_branding span {
        font-size: 15px !important;
    }

    .cs_sidebar_toggle_btn svg {
        width: 28px !important;
        height: 24px !important;
    }
}
