/* ============================================
   responsive-custom.css
   Mobile-first overrides for all custom sections
   Breakpoints: 991px (tablet), 767px (mobile), 480px (small)
============================================ */

/* ===========================================
   GLOBAL — prevent horizontal overflow
=========================================== */
*, *::before, *::after { box-sizing: border-box; }
/* Only clip the outer wrapper, NOT body — Swiper needs body scroll */
.body_wrap { overflow-x: hidden !important; }
img { max-width: 100%; height: auto; }
/* Never clip swiper containers */
.swiper-container, .swiper-wrapper, .swiper-slide { overflow: visible; }
.swiper-container { overflow: hidden !important; }

/* ===========================================
   GLOBAL SPACING — reduce on mobile
=========================================== */
@media (max-width: 767px) {
    .pt-135  { padding-top:    60px !important; }
    .pt-150  { padding-top:    60px !important; }
    .pb-150  { padding-bottom: 60px !important; }
    .pb-130  { padding-bottom: 50px !important; }
    .pb-140  { padding-bottom: 55px !important; }
    .pt-md-140 { padding-top: 60px !important; }
    .mb-75   { margin-bottom: 35px !important; }
    .mb-70   { margin-bottom: 30px !important; }
    .mb-50   { margin-bottom: 24px !important; }
    .mt-150  { margin-top:    50px !important; }
    .mt-45   { margin-top:    20px !important; }
    .container.mxw-1650 { padding-left: 18px !important; padding-right: 18px !important; }
    .breadcrumb__title   { font-size: 26px !important; }
    .breadcrumb__content { padding-top: 80px !important; padding-bottom: 30px !important; }
    .xb-about-top .xb-title { font-size: 22px !important; line-height: 1.4 !important; }
    h2.title { font-size: 28px !important; }
}

/* ===========================================
   FOOTER
=========================================== */
@media (max-width: 991px) {
    .footer.footer-area               { padding-top: 60px !important; }
    .xb-footer-wrap                   { margin-bottom: 30px !important; }
    /* Stack both columns full width */
    .xb-footer-wrap .row .col-lg-6    { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
    /* Left: centre */
    .xb-footer-left                   { text-align: center !important; }
    .xb-footer-left .title            { font-size: 32px !important; }
    .xb-footer-btn                    { margin-top: 20px !important; display: flex !important; justify-content: center !important; }
    /* Inner grid: 2 cols */
    .xb-footer-inner                  { padding-left: 0 !important; grid-template-columns: 1fr 1fr !important; gap: 30px 20px !important; margin-top: 35px !important; }
    .xb-footer-inner .text-end        { text-align: left !important; }
    /* Bottom bar */
    .xb-footer_bottom                 { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 8px !important; padding: 20px 0 35px !important; }
}

@media (max-width: 767px) {
    .footer.footer-area               { padding-top: 45px !important; }
    .xb-footer-left .title            { font-size: 26px !important; }
    /* Single column */
    .xb-footer-inner                  { grid-template-columns: 1fr !important; gap: 24px !important; margin-top: 24px !important; }
    .xb-widget-title                  { font-size: 12px !important; margin-bottom: 10px !important; }
    .xb-footer_widget .xb-list li     { font-size: 14px !important; line-height: 1.6 !important; }
    .xb-footer_widget .xb-list li:not(:last-child) { margin-bottom: 6px !important; }
    .xb-footer_bottom                 { padding: 16px 0 28px !important; }
    .xb-footer_bottom p               { font-size: 12px !important; }
    .construction-btn                 { font-size: 16px !important; }
}

/* ===========================================
   ABOUT PAGE — about-intro section
=========================================== */

/* Watermark: scale down on tablet, hide on mobile */
.ai-watermark { overflow: hidden !important; }
@media (max-width: 991px) {
    .ai-watermark { font-size: 130px !important; }
}
@media (max-width: 767px) {
    .ai-watermark { display: none !important; }
}

/* Fix white gap above about-intro */
.about-intro { margin-top: 0 !important; }
.about_value + .about-intro { margin-top: 0 !important; }
section.about_value { margin-bottom: 0 !important; padding-bottom: 0 !important; }

/* Hero block */
@media (max-width: 991px) {
    .about-intro { padding: 70px 0 0 !important; }
    .ai-hero-block { margin-bottom: 40px !important; }
    .ai-main-heading { font-size: 56px !important; letter-spacing: -1px !important; }
    .ai-est-line { gap: 14px !important; }
    .ai-est-line > div { width: 40px !important; }
    .ai-divider { margin-bottom: 40px !important; }
}
@media (max-width: 767px) {
    .about-intro { padding: 50px 0 0 !important; }
    .ai-hero-block { margin-bottom: 30px !important; }
    .ai-main-heading { font-size: 36px !important; letter-spacing: -0.5px !important; }
    .ai-tagline { font-size: 11px !important; letter-spacing: 2px !important; white-space: normal !important; }
    /* Show est line but simplified */
    .ai-est-line { gap: 10px !important; flex-wrap: nowrap !important; }
    .ai-est-line > div { width: 30px !important; min-width: 30px !important; flex-shrink: 0 !important; }
    .ai-est-line > span { font-size: 10px !important; letter-spacing: 3px !important; white-space: nowrap !important; }
    .ai-divider { margin-bottom: 30px !important; }
}

/* About Us row */
@media (max-width: 991px) {
    .ai-about-row { margin-bottom: 40px !important; }
    .ai-about-heading-col { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
    .ai-about-text-col { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; padding-left: 0 !important; }
    .ai-about-heading { font-size: 52px !important; }
}
@media (max-width: 767px) {
    .ai-about-row { margin-bottom: 24px !important; }
    .ai-about-heading { font-size: 38px !important; margin-bottom: 16px !important; }
    .ai-body-text { font-size: 16px !important; line-height: 1.8 !important; margin-bottom: 16px !important; }
}

/* Tags */
@media (max-width: 767px) {
    .ai-tags-row { margin-bottom: 40px !important; padding-bottom: 40px !important; gap: 8px !important; }
    .ai-tag { padding: 10px 18px !important; font-size: 11px !important; }
}

/* Mission banner */
@media (max-width: 991px) {
    .ai-mission-banner { padding: 45px 0 !important; }
    .ai-mission-inner { gap: 30px !important; }
    .ai-mission-title h2 { font-size: 48px !important; }
}
@media (max-width: 767px) {
    .ai-mission-banner { padding: 35px 0 !important; }
    .ai-mission-inner { flex-direction: column !important; gap: 16px !important; }
    .ai-mission-divider { display: none !important; }
    .ai-mission-title h2 { font-size: 36px !important; }
    .ai-mission-text { font-size: 15px !important; min-width: 0 !important; }
}

/* ===========================================
   ABOUT PAGE — Company Profile (history)
=========================================== */
@media (max-width: 991px) {
    .xb-company-info-wrapper .row { flex-direction: column !important; }
    .xb-company-info-wrapper .col-lg-5,
    .xb-company-info-wrapper .col-lg-7,
    .xb-company-info-wrapper .col-lg-8 { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
}

/* ===========================================
   HISTORY PAGE — Stats banner
=========================================== */
.hist-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
@media (max-width: 991px) {
    .hist-stats-grid { grid-template-columns: 1fr 1fr !important; }
    .hist-stats-grid > div { border-right: none !important; border-bottom: 1px solid rgba(201,168,76,0.2) !important; }
}
@media (max-width: 480px) {
    .hist-stats-grid { grid-template-columns: 1fr !important; }
}

/* ===========================================
   HISTORY PAGE — Timeline
=========================================== */
@media (max-width: 767px) {
    .hist-timeline-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        margin-bottom: 50px !important;
    }
    .hist-timeline-row > .hist-tl-left,
    .hist-timeline-row > .hist-tl-right {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        text-align: left !important;
        width: 100% !important;
    }
    .hist-timeline-row > .hist-tl-dot { display: none !important; }
    #timeline-line,
    .hist-tl-track { display: none !important; }
    .hist-year-ghost { font-size: 48px !important; }
    section.hist-journey-heading h2 { font-size: 42px !important; }
    .hist-journey-watermark { display: none !important; }
}

/* ===========================================
   ABOUT — What We Build
=========================================== */
/* Bullet alignment fix — always top-aligned */
.wwb-list li { align-items: flex-start !important; }
.wwb-list li > span:first-child { margin-top: 6px !important; }

@media (max-width: 767px) {
    .about_work { background: #181818; }
    .ap-work-top { flex-direction: column !important; gap: 12px !important; }
    .ap-work-top .ap-work-content { max-width: 100% !important; font-size: 16px !important; }
    /* 3-col list grid → single col */
    .ap-work-wrap > div { display: flex !important; flex-direction: column !important; }
    .wwb-list { border-left: none !important; border-top: 1px solid rgba(201,168,76,0.3) !important; padding: 24px 16px !important; min-height: unset !important; justify-content: flex-start !important; gap: 18px !important; }
    .wwb-list li > span:last-child { font-size: 16px !important; }
}

/* ===========================================
   SERVICE PAGES — button fix
=========================================== */
.thm-btn { overflow: hidden !important; }

/* ===========================================
   GENERAL — cards, rows, images
=========================================== */
@media (max-width: 767px) {
    /* Bootstrap col overrides for custom grids */
    .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    /* Section overflow for custom sections only */
    .about-intro { overflow-x: hidden !important; }
}
