/* ══════════════════════════════════════════════
   RESPONSIVE STYLES FOR ALL DEVICES
   Mobile First Approach - 320px to 2560px
══════════════════════════════════════════════ */

/* ══════════════════════════════════════════════
   BASE RESPONSIVE UTILITIES
══════════════════════════════════════════════ */
* {
    box-sizing: border-box;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent horizontal scroll without breaking sticky positioning */
body {
    overflow-x: clip;
    width: 100%;
}

/* Container responsive padding */
.container,
.container-fluid {
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}

/* ══════════════════════════════════════════════
   MOBILE DEVICES (320px - 480px)
══════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* Typography */
    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    h3 {
        font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
    }

    h4 {
        font-size: clamp(1.1rem, 4vw, 1.5rem) !important;
    }

    h5 {
        font-size: clamp(1rem, 3.5vw, 1.25rem) !important;
    }

    p,
    li,
    a {
        font-size: clamp(0.875rem, 3vw, 1rem) !important;
    }

    /* Spacing */
    section {
        padding: 40px 16px !important;
    }

    .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .col,
    [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Buttons */
    .btn,
    button,
    a.btn {
        font-size: 0.875rem !important;
        padding: 10px 20px !important;
        width: 100%;
        max-width: 100%;
    }

    /* Cards */
    .card,
    .service-card,
    .career-card {
        margin-bottom: 20px !important;
    }

    /* Hero sections */
    .hero,
    .hero-section {
        min-height: 60vh !important;
        padding: 60px 16px 40px !important;
    }

    .hero-headline,
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }

    /* Forms */
    input,
    textarea,
    select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 12px !important;
    }

    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ══════════════════════════════════════════════
   TABLETS (481px - 768px)
══════════════════════════════════════════════ */
@media (min-width: 481px) and (max-width: 768px) {

    /* Typography */
    h1 {
        font-size: clamp(2rem, 6vw, 3rem) !important;
    }

    h2 {
        font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
    }

    h3 {
        font-size: clamp(1.5rem, 4vw, 2rem) !important;
    }

    h4 {
        font-size: clamp(1.25rem, 3.5vw, 1.75rem) !important;
    }

    p,
    li,
    a {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem) !important;
    }

    /* Spacing */
    section {
        padding: 60px 24px !important;
    }

    /* Grid adjustments */
    .col-md-6,
    .col-sm-6 {
        width: 50% !important;
    }

    .col-md-12,
    .col-sm-12 {
        width: 100% !important;
    }

    /* Hero sections */
    .hero,
    .hero-section {
        min-height: 70vh !important;
        padding: 80px 24px 50px !important;
    }

    /* Buttons */
    .btn,
    button,
    a.btn {
        font-size: 0.95rem !important;
        padding: 12px 24px !important;
    }
}

/* ══════════════════════════════════════════════
   SMALL LAPTOPS (769px - 1024px)
══════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Typography */
    h1 {
        font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
    }

    h2 {
        font-size: clamp(2rem, 4vw, 3rem) !important;
    }

    h3 {
        font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
    }

    /* Spacing */
    section {
        padding: 80px 32px !important;
    }

    /* Hero sections */
    .hero,
    .hero-section {
        min-height: 80vh !important;
        padding: 100px 32px 60px !important;
    }
}

/* ══════════════════════════════════════════════
   LARGE SCREENS (1025px - 1440px)
══════════════════════════════════════════════ */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }

    section {
        /* padding: 100px 40px !important; */
    }
}

/* ══════════════════════════════════════════════
   EXTRA LARGE SCREENS (1441px+)
══════════════════════════════════════════════ */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }

    section {
        /* padding: 120px 60px !important; */
    }

    h1 {
        font-size: clamp(3rem, 4vw, 4.5rem) !important;
    }

    h2 {
        font-size: clamp(2.5rem, 3.5vw, 4rem) !important;
    }
}

/* ══════════════════════════════════════════════
   PAGE-SPECIFIC RESPONSIVE FIXES
══════════════════════════════════════════════ */

/* INDEX PAGE */
@media (max-width: 768px) {

    /* Hero Section */
    .hero {
        height: auto !important;
        min-height: 80vh !important;
        padding: 100px 20px 60px !important;
        justify-content: flex-start !important;
        text-align: center !important;
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 2.8rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 30px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-bottom {
        flex-direction: column !important;
        gap: 40px !important;
        position: static !important;
        margin-top: 20px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .bg-text {
        font-size: 20vw !important;
        opacity: 0.02 !important;
    }

    .stats-grid {
        flex-direction: column !important;
        gap: 30px !important;
        width: 100% !important;
        align-items: center !important;
    }

    .stat-item {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }

    /* Globe Visualization */
    .globe-sticky-wrapper {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        height: 100% !important;
        width: 100% !important;
        opacity: 0.5 !important;
        pointer-events: none !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .globe-container {
        width: 100vw !important;
        height: 100vw !important;
        max-width: 500px !important;
        max-height: 500px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
    }

    /* Services Section */
    .services {
        grid-template-columns: 1fr !important;
        padding: 60px 20px !important;
        min-height: auto !important;
        gap: 30px !important;
    }

    .services-content-left {
        display: none !important;
        /* Hide dynamic label layout on mobile */
    }

    .section-header h2 {
        font-size: 2.2rem !important;
        text-align: center !important;
    }

    .section-header p {
        text-align: center !important;
    }

    .service-card {
        position: sticky !important;
        top: 85px !important;
        margin-bottom: 60px !important;
        padding: 30px 20px !important;
        border-radius: 20px !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2) !important;
    }

    .service-card h3 {
        font-size: 1.5rem !important;
    }

    /* Industries Bar */
    .industries-bar {
        grid-template-columns: 1fr !important;
        padding: 30px 20px !important;
        gap: 20px !important;
        border-radius: 24px !important;
        margin: 20px !important;
    }

    .industry-item {
        padding: 10px 0 !important;
    }

    .industry-item::after {
        display: none !important;
    }

    /* About Us Arc Carousel */
    .au-wrap {
        padding: 60px 20px !important;
    }

    .au-text h1 {
        font-size: 2.2rem !important;
    }

    .au-cards-outer {
        height: 280px !important;
        margin-top: 40px !important;
    }

    .au-card {
        width: 180px !important;
        height: 240px !important;
    }

    /* TestimonialsRefinement (Testimonials has its own media queries in index.html, but we ensure it fits) */
    .box-container {
        perspective: 800px !important;
    }

    .flip-box,
    .panel {
        width: 90vw !important;
        max-width: 380px !important;
        height: auto !important;
        min-height: 420px !important;
    }

    .cta-section {
        padding: 60px 20px !important;
    }

    .cta-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }

    .cta-text {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
    }

    .cta-btn {
        width: 80px !important;
        height: 80px !important;
        font-size: 24px !important;
    }
}

/* ABOUT PAGE */
@media (max-width: 768px) {
    .about-hero {
        min-height: 60vh !important;
        padding: 60px 20px !important;
    }

    /* Journey Timeline Section */
    .journey {
        min-height: auto !important;
        padding: 40px 16px 24px !important;
    }

    .journey-title {
        font-size: clamp(1.9rem, 7vw, 2.8rem) !important;
        margin-bottom: 24px !important;
        padding-top: 20px !important;
    }

    .stage-clip {
        min-height: auto !important;
        height: auto !important;
    }

    .panel {
        position: relative !important;
        padding: 20px 16px !important;
        min-height: auto !important;
        display: flex !important;
    }

    .inner {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .img-card {
        width: clamp(120px, 40vw, 180px) !important;
        height: clamp(120px, 40vw, 180px) !important;
        display: block !important;
        opacity: 1 !important;
        margin: 0 auto !important;
    }

    .center-panel {
        max-width: 100% !important;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .j-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }

    .j-desc {
        font-size: 0.85rem !important;
        padding: 12px 10px !important;
    }

    .join-btn {
        font-size: 16px !important;
        padding: 12px 30px !important;
    }

    .slide-num {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        text-align: center !important;
        margin-top: 20px !important;
    }

    .timeline-bar {
        padding: 20px 16px 30px !important;
    }

    .tl-arrow {
        width: 36px !important;
        height: 36px !important;
    }

    .tl-yr.active {
        font-size: 1.7rem !important;
    }

    .tl-yr {
        font-size: 0.76rem !important;
        padding: 6px 10px !important;
    }

    .timeline-container {
        padding: 40px 20px !important;
    }

    .timeline-item {
        flex-direction: column !important;
        text-align: center !important;
    }

    .timeline-content {
        max-width: 100% !important;
    }

    .vision-mission-section {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        padding: 40px 20px !important;
    }

    /* Vision Mission Wrapper */
    .vm-wrapper {
        flex-direction: column !important;
        padding: 0 !important;
    }

    .vm-left,
    .vm-right {
        width: 100% !important;
    }

    .vm-img-slide {
        height: 260px !important;
    }
}

/* SERVICES PAGE */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .service-card {
        padding: 30px 20px !important;
    }

    .faq-section {
        padding: 40px 20px !important;
    }

    .faq-cards {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* BLOG PAGE */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .filter-container {
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 20px 16px !important;
    }

    .filter-btn {
        font-size: 0.75rem !important;
        padding: 8px 16px !important;
    }

    .blog-card {
        margin-bottom: 20px !important;
    }
}

/* CONTACT PAGE */
@media (max-width: 768px) {
    .contact-section {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        padding: 40px 20px !important;
    }

    .contact-form {
        padding: 30px 20px !important;
    }

    .contact-info {
        padding: 30px 20px !important;
    }

    .map-container {
        height: 300px !important;
    }
}

/* CAREER PAGE */
@media (max-width: 768px) {
    .career-cards-section {
        padding: 40px 20px !important;
    }

    .career-card {
        margin-bottom: 20px !important;
    }

    .career-card h3 {
        font-size: 1.25rem !important;
    }

    .career-image {
        height: 200px !important;
    }
}

/* OUR WORKS PAGE */
@media (max-width: 768px) {
    .hero-scroll-container {
        height: 100vh !important;
    }

    .hero-section {
        min-height: 50vh !important;
        padding-left: 20px !important;
    }

    .hero-title {
        font-size: 32px !important;
    }

    .scrolling-content {
        font-size: 80px !important;
    }

    .portfolio-col {
        width: 100% !important;
    }

    .portfolio-card {
        aspect-ratio: 1 / 1 !important;
    }

    .offset-center {
        margin-top: 0 !important;
    }

    .filter-container {
        padding: 20px 16px !important;
        gap: 10px !important;
    }
}

/* SERVICE DETAIL PAGES */
@media (max-width: 768px) {
    .service-hero {
        min-height: 60vh !important;
        padding: 60px 20px !important;
    }

    .service-content {
        padding: 40px 20px !important;
    }

    .service-features {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .pricing-section {
        padding: 40px 20px !important;
    }

    .pricing-cards {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ══════════════════════════════════════════════
   UTILITY CLASSES
══════════════════════════════════════════════ */

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Text alignment */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center !important;
    }
}

/* Full width on mobile */
@media (max-width: 768px) {
    .full-width-mobile {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Stack on mobile */
@media (max-width: 768px) {
    .stack-mobile {
        flex-direction: column !important;
    }
}

/* Navbar height in landscape handled by navbar-fix.css */

/* ══════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════ */
@media print {

    .navbar,
    .site-header,
    .header,
    footer,
    .ct-footer,
    .mobile-toggle,
    .header-cta,
    .cta-section {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
    }

    * {
        background: white !important;
        color: black !important;
    }
}
