/* ============================================================
   SSV EXIM — MOBILE RESPONSIVE STYLESHEET
   Loaded on every page after style.css
   Covers: Navigation, Hamburger Menu, All Page Sections
   Breakpoints: 1199, 991, 767, 575, 400
   ============================================================ */

/* ── 1. SHARED NAVBAR — LOGO FIX ───────────────────────────────────────── */

/* Logo: correct size desktop */
.site_logo_area img,
.main_logo img,
a.main_logo img,
.ssv_nav_inner .site_logo_area img {
    max-width: 200px !important;
    width: auto !important;
    height: auto !important;
    max-height: 80px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Nav container padding */
.main_menu_area .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Navbar row: allow wrapping so hamburger can appear */
.main_menu_area .row,
.main_menu_area > .container-fluid > .row {
    flex-wrap: wrap !important;
    min-height: unset !important;
    max-height: unset !important;
    height: auto !important;
}

/* Ensure the navbar itself is auto-height, compact */
.main_menu_area {
    min-height: unset !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 !important;
}

/* Nav inner padding — compact on all screens */
.ssv_nav_inner {
    padding: 6px 0 !important;
}

/* ── 2. HAMBURGER BUTTON (injected by script.js or shown via CSS) ───────── */
.ssv_hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 26px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
    outline: none;
    z-index: 10001;
    flex-shrink: 0;
}

.ssv_hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1B5E20;
    border-radius: 3px;
    transition: all 0.35s ease;
    transform-origin: center;
}

.ssv_hamburger.open span:nth-child(1) {
    transform: translateY(11.5px) rotate(45deg);
}
.ssv_hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.ssv_hamburger.open span:nth-child(3) {
    transform: translateY(-11.5px) rotate(-45deg);
}

/* ── 3. SLIDE-IN DRAWER MENU ────────────────────────────────────────────── */
.ssv_drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 290px;
    max-width: 85vw;
    height: 100%;
    background: #1a3b1a;
    z-index: 10000;
    overflow-y: auto;
    transition: left 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 0 40px;
    box-shadow: 4px 0 25px rgba(0,0,0,0.35);
}

.ssv_drawer.open {
    left: 0;
}

.ssv_drawer_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: #1B5E20;
}

.ssv_drawer_header img {
    max-width: 130px;
    height: auto;
    background: #fff;
    padding: 6px 10px;
    border-radius: 8px;
}

.ssv_drawer_close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}
.ssv_drawer_close:hover {
    color: #D4AF37;
}

.ssv_drawer_nav {
    list-style: none;
    margin: 0;
    padding: 15px 0;
}

.ssv_drawer_nav li {
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ssv_drawer_nav li a {
    display: block;
    padding: 14px 24px;
    color: #e8f5e9;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.ssv_drawer_nav li a:hover,
.ssv_drawer_nav li a.active {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.08);
    padding-left: 30px;
}

.ssv_drawer_cta {
    margin: 20px 24px 0;
    display: block;
    text-align: center;
    background: #D4AF37;
    color: #1a3b1a !important;
    padding: 13px 20px !important;
    border-radius: 30px;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none;
    transition: background 0.25s;
}
.ssv_drawer_cta:hover {
    background: #c49b28 !important;
    color: #1a3b1a !important;
}

.ssv_drawer_contact {
    margin: 25px 24px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.ssv_drawer_contact p {
    color: #aaa;
    font-size: 12px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ssv_drawer_contact p i {
    color: #D4AF37;
}

/* Overlay behind drawer */
.ssv_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.ssv_overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ── 4. DESKTOP NAV — hide desktop items on mobile ──────────────────────── */
@media (max-width: 991px) {

    /* Show hamburger */
    .ssv_hamburger {
        display: flex !important;
    }

    /* Hide desktop inline nav links + CTA + search */
    .inner_main_nav_area,
    .beutty_right_area,
    .menu_btn {
        display: none !important;
    }

    /* Mobile navbar: compact height, logo + hamburger side by side */
    .main_menu_area {
        padding: 0 !important;
    }

    .ssv_nav_inner {
        padding: 8px 16px !important;
        min-height: 60px !important;
        height: auto !important;
    }

    .main_menu_area .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* BIGGER logo on mobile — clearly visible */
    .site_logo_area img,
    .main_logo img,
    a.main_logo img,
    .ssv_nav_inner .site_logo_area img {
        max-width: 160px !important;
        width: 160px !important;
        height: auto !important;
        max-height: 52px !important;
        min-width: 120px !important;
    }

    /* Logo column on mobile */
    .main_menu_area .col-auto {
        padding: 0 !important;
    }
}

/* ── 5. BANNER ──────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .single_banner_area {
        padding: 70px 0 !important;
    }
    .inner_single_banner_content h1 {
        font-size: 30px !important;
        line-height: 1.25;
    }
}
@media (max-width: 575px) {
    .single_banner_area {
        padding: 50px 0 !important;
    }
    .inner_single_banner_content h1 {
        font-size: 22px !important;
    }
}

/* ── 6. HERO SLIDER ─────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .inner_slider_area {
        height: 70vh;
        min-height: 400px;
    }
    .inner_slider_content {
        width: 90%;
        text-align: center;
    }
    .inner_slider_content h2 { font-size: 36px; }
    .inner_slider_content h3,
    .inner_slider_content h3 .ssv_text,
    .inner_slider_content h3 .exim_text { font-size: 40px; }
    .inner_slider_content p { width: 100%; font-size: 15px; }
    .b_btn { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .b_btn a { margin: 0; padding: 10px 24px; font-size: 13px; }
}
@media (max-width: 575px) {
    .inner_slider_area {
        height: 60vh;
        min-height: 320px;
    }
    .inner_slider_content h2 { font-size: 26px; }
    .inner_slider_content h3,
    .inner_slider_content h3 .ssv_text,
    .inner_slider_content h3 .exim_text { font-size: 28px; }
    .inner_slider_content h1 { font-size: 12px; letter-spacing: 1px; }
    .inner_slider_content p { font-size: 13px; }
    .b_btn a { padding: 9px 18px; font-size: 12px; }
}

/* ── 7. FEATURE BOXES ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .feature_area { padding: 40px 0 20px; }
    .main_feature { padding: 25px 15px; margin-bottom: 20px; }
    .main_feature h2 a { font-size: 17px; }
}

/* ── 8. ABOUT SECTION ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .about_area { padding: 50px 0; }
    .about_active h2 { font-size: 28px; }
    .single_about_img { margin-bottom: 30px; }
}
@media (max-width: 767px) {
    .about_active h2 { font-size: 24px; }
    .inner_counter_sub_cont h3 { font-size: 44px; }
    .inner_counter_sub_cont span { font-size: 30px; }
}

/* ── 9. CERTIFICATIONS ──────────────────────────────────────────────────── */
@media (max-width: 575px) {
    .cert_full_item { max-width: 100px; padding: 6px; }
    .cert_full_item img { max-height: 65px; }
    .cert_label { font-size: 11px; }
}

/* ── 10. SECTION TITLES ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .section_title h2 { font-size: 24px !important; }
    .section_title h4 { font-size: 13px; letter-spacing: 1px; }
    .section_subtitle { font-size: 14px; }
}

/* ── 11. CONTACT PAGE ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .getintouch_section { padding: 50px 0; }
}
@media (max-width: 767px) {
    .contact_info_card { padding: 20px 15px; margin-bottom: 20px; }
    .contact_info_card i { font-size: 22px; margin-bottom: 10px; }
    .contact_info_card h5 { font-size: 15px; }
    .contact_info_card p { font-size: 13px; }

    .touch_form_wrap {
        padding: 25px 20px !important;
    }
    .touch_form_wrap h3 {
        font-size: 22px;
        text-align: center;
    }
    .touch_form_wrap h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    .form_group input,
    .form_group textarea {
        font-size: 14px;
        padding: 12px 14px;
    }
    .touch_submit_btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}
@media (max-width: 575px) {
    .touch_form_wrap { padding: 20px 14px !important; }
}

/* ── 12. PRODUCTS PAGE ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
    /* Unstick the sidebar on tablets/mobile */
    .products_list_wrap {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
        margin-bottom: 30px;
    }

    /* Product button grid: 3 columns */
    #productsGrid,
    .products_grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    /* Product card: stack image above specs */
    .product_specs_section .row {
        flex-direction: column;
    }
    .product_specs_section .specs_img_wrap {
        margin-bottom: 20px;
    }
    .product_specs_section .specs_img_wrap img {
        height: 220px !important;
    }
}

@media (max-width: 767px) {
    #productsGrid,
    .products_grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .product_btn { font-size: 11px !important; padding: 10px 6px !important; }

    .section_title_left h2 { font-size: 22px; }
    .specs_table td { font-size: 12px; padding: 7px 10px; }
    .specs_btn .dtbtn,
    .specs_btn .specs_link {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    #productsGrid,
    .products_grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .product_btn { font-size: 10px !important; padding: 8px 4px !important; }
}

/* ── 13. GALLERY PAGE ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* The gallery uses inline CSS grid — override it */
    .gallery_section .row[style*="grid-template-columns"],
    .row[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .gallery-item img,
    .gallery_img_wrap img {
        height: 190px !important;
    }
    .gallery_section { padding: 40px 0; }
}

@media (max-width: 480px) {
    .row[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .gallery-item img,
    .gallery_img_wrap img {
        height: 150px !important;
    }
}

/* ── 14. FOOTER ─────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .footer_area { padding: 50px 0 30px !important; }
    .footer_widget { margin-bottom: 35px; }
    .footer_widget:last-child { margin-bottom: 0; }
}
@media (max-width: 767px) {
    .footer_widget h4 { font-size: 17px; margin-bottom: 15px; padding-bottom: 10px; }
    .footer_widget p { font-size: 13px; }
    .footer_nav ul li a { font-size: 13px; }
    .inner_subscribe_form_area input { font-size: 13px; padding: 10px 12px; }
    .footer_address_text p { font-size: 13px; }
    .copyright_area { padding: 15px 0 !important; }
    .copyright_area .col-lg-6 { text-align: center !important; }
    .sitemap_link { text-align: center !important; margin-top: 8px; }
    .sitemap_link a { font-size: 12px; }
}

/* ── 15. IMAGE POPUP MODAL ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .popup_close_btn {
        top: -35px;
        right: 0;
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
    .popup_container { max-width: 95%; }
    .popup_container img { max-height: 75vh; }
}

/* ── 16. GENERAL UTILITY ────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Ensure container has correct padding on small screens */
    .container { padding-left: 16px; padding-right: 16px; }

    /* Reduce all section padding uniformly */
    .about_area,
    .feature_area,
    .project_area,
    .gallery_section,
    .getintouch_section,
    .certifications_section,
    .certified_section {
        padding: 40px 0;
    }

    /* Prevent overflow on all elements */
    img { max-width: 100%; height: auto; }
    table { word-break: break-word; }
}

/* ── 17. PREVENT BODY SCROLL WHEN DRAWER OPEN ──────────────────────────── */
body.ssv_menu_open {
    overflow: hidden !important;
}

/* ── 18. SMOOTH SCROLL ──────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}
