/* Mobile Responsive Styles - Full Optimization */

/* Desktop Hidden Elements */
.hl-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hl-menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: #1a1c22;
    transition: 0.3s;
}

/* 1. Global Container */
@media screen and (max-width: 1200px) {
    .hl-container {
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* 2. Tablets and smaller (992px) */
@media screen and (max-width: 992px) {
    /* Header & Navigation */
    .hl-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        z-index: 1000;
        height: 70px;
    }
    .hl-header-inner {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        height: 100%;
    }
    .hl-logo img {
        height: 40px !important;
        width: auto;
    }
    
    .hl-menu-toggle {
        display: flex !important;
    }

    .hl-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #fff;
        transition: 0.4s;
        overflow-y: auto;
        padding: 40px 0;
        z-index: 999;
        margin-top: 0 !important;
        display: block !important; /* Ensure it's not hidden by display:none if any exists */
    }

    .hl-nav.active {
        left: 0;
    }

    .hl-nav-list {
        display: flex !important; /* Force display flex for the list */
        flex-direction: column !important;
        align-items: center;
        gap: 20px !important;
        padding: 0;
        margin: 0;
    }

    .hl-nav-list li {
        width: 100%;
        text-align: center;
        list-style: none;
    }

    .hl-nav-list li a {
        display: block;
        padding: 10px 0;
        font-size: 18px !important;
        font-weight: bold;
        color: #1a1c22;
        text-decoration: none;
    }

    .hl-nav-list li a.active {
        color: var(--hl-gold);
    }

    /* Hamburger Animation */
    .hl-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hl-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .hl-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Body scroll lock when menu open */
    body.menu-open {
        overflow: hidden;
    }

    /* Adjust page main to avoid fixed header overlap */
    main {
        padding-top: 70px !important;
    }
    .hl-banner {
        margin-top: 0;
    }

    .hl-lang-switch {
        display: block !important;
        text-align: center;
        margin-top: 40px;
    }

    /* Flex Layouts to Vertical */
    .hl-about-flex,
    .ct-form-flex,
    .ys-detail-item,
    .ys-detail-reverse,
    .hl-news-flex {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    .hl-about-left, .hl-about-right,
    .ct-form-left, .ct-form-right,
    .ys-detail-text, .ys-detail-img,
    .hl-news-left, .hl-news-right {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .hl-about-content-wrapper {
        padding: 0 15px !important;
    }

    .hl-about-left img {
        width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        object-fit: cover !important;
    }

    /* Grid Adjustments */
    .hl-stats-grid,
    .hl-business-grid,
    .hl-why-grid,
    .ct-info-grid,
    .zy-business-grid,
    .ab-faq-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* 3. Small Mobile Devices (768px) */
@media screen and (max-width: 768px) {
    /* Sections */
    section {
        padding: 50px 0 !important;
    }
    .hl-section-header {
        margin-bottom: 30px !important;
    }
    .hl-section-title {
        font-size: 24px !important;
    }

    /* Banners */
    .hl-banner {
        height: 200px !important;
    }
    .ab-banner {
        height: 160px !important;
    }
    .ab-banner-title {
        font-size: 22px !important;
    }

    /* Stats Section */
    .hl-stats-grid {
        grid-template-columns: 1fr !important;
    }
    .hl-stat-item {
        padding: 20px !important;
    }

    /* About Us Stats */
    .hl-about-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .hl-about-stat-num {
        font-size: 20px !important;
    }

    /* Business Grid */
    .hl-business-grid,
    .hl-why-grid,
    .ct-info-grid,
    .zy-business-grid,
    .ab-faq-grid {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
    }

    /* Scope Section (2 columns on mobile for compactness) */
    .hl-scope-grid {
        grid-template-columns: 1fr !important;
    }
    .hl-scope-item {
        height: auto !important;
        padding: 30px !important;
    }

    /* Detail Pages (Advantage/News) */
    .ys-detail-img {
        height: 200px !important;
    }
    .ys-detail-num {
        font-size: 50px !important;
        top: -30px !important;
    }
    .ys-detail-list {
        grid-template-columns: 1fr !important;
    }

    /* CTA Box */
    .zy-cta-box {
        flex-direction: column !important;
        text-align: center !important;
        padding: 30px !important;
    }

    /* Footer */
    .hl-footer-top {
        padding: 40px 0 !important;
    }
    .hl-footer-flex {
        flex-direction: column !important;
        gap: 30px !important;
        text-align: center !important;
    }
    .hl-footer-area-list {
        justify-content: center !important;
    }
    .hl-footer-contact li {
        justify-content: center;
    }

    /* News Item Horizontal to Vertical */
    .hl-news-item, .nl-item-link {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .hl-news-item-img, .nl-item-img {
        width: 100% !important;
        height: 180px !important;
        flex: 0 0 auto !important;
        margin-bottom: 15px;
    }

    /* Article Content */
    .nd-article-wrapper {
        padding: 20px !important;
    }
    .nd-article-title {
        font-size: 20px !important;
    }
    .nd-article-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* 4. Extra Small Devices (480px) */
@media screen and (max-width: 480px) {
    .hl-about-stats {
        grid-template-columns: 1fr !important;
    }
    .ct-map-container {
        height: 250px !important;
    }
    .ab-faq-item {
        padding: 15px !important;
    }
    .hl-pagination a, .hl-pagination span {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
}

/* 5. Fix for Swiper Arrows on Mobile */
@media screen and (max-width: 768px) {
    .hl-swiper-button-prev,
    .hl-swiper-button-next {
        display: none !important; /* Hide navigation arrows on small mobile to avoid clutter */
    }
}