/**
 * Vertex Social — Mobile UI Complete Restructure
 * Pure CSS override file for all mobile breakpoints.
 * No functionality changes — layout & visual only.
 *
 * Breakpoints used:
 *  - max-width: 991px  → tablets & smaller
 *  - max-width: 767px  → large phones
 *  - max-width: 480px  → standard phones (iPhone 14 etc.)
 *  - max-width: 375px  → small phones (iPhone SE)
 */


/* =============================================================
   PHASE 1 — GLOBAL BASE RESETS & NAVBAR
   ============================================================= */

/* Hide mobile navigation elements by default on desktop/laptop views */
.mobile-nav-drawer {
    display: none;
}
.mobile-nav-overlay {
    display: none;
}

/* Hide custom cursor on touch devices */
@media (max-width: 991px) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
}

/* --- GLOBAL SECTION SPACING ---------------------------------- */
@media (max-width: 991px) {
    section {
        padding: 5rem 0;
    }
}
@media (max-width: 767px) {
    section {
        padding: 4rem 0;
    }
}
@media (max-width: 480px) {
    section {
        padding: 3.5rem 0;
    }
}

/* --- SECTION HEADER ------------------------------------------ */
@media (max-width: 991px) {
    .section-header {
        margin-bottom: 3rem;
        padding: 0 1.5rem;
    }
    .section-header h2 {
        font-size: 2.1rem;
    }
}
@media (max-width: 767px) {
    .section-header h2 {
        font-size: 1.85rem;
    }
    .section-header {
        margin-bottom: 2.5rem;
    }
}
@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.65rem;
    }
}

/* --- GLASS CARD PADDING -------------------------------------- */
@media (max-width: 767px) {
    .glass-card {
        padding: 1.75rem;
    }
}
@media (max-width: 480px) {
    .glass-card {
        padding: 1.35rem;
    }
}

/* --- BUTTON STYLES ------------------------------------------- */
@media (max-width: 480px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* =============================================================
   NAVBAR — FULL REDESIGN FOR MOBILE
   ============================================================= */
@media (max-width: 991px) {
    /* Navbar container */
    header.navbar-container {
        padding: 0.95rem 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    header.navbar-container.navbar-home:not(.scrolled) {
        background: transparent !important;
        border-bottom: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    header.navbar-container.scrolled {
        padding: 0.65rem 0;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    }

    /* Nav wrapper — keep logo left, hamburger right */
    .nav-wrapper {
        padding: 0 1.25rem;
        position: relative;
    }

    /* Logo sizing */
    .logo img {
        height: 32px !important;
        max-height: 32px !important;
    }

    /* Company name in logo */
    .logo span {
        font-size: 1.15rem !important;
    }

    /* Hide desktop nav & CTA buttons in nav area */
    .desktop-nav {
        display: none !important;
    }

    /* Hide the "Contact" button in nav on mobile — just show hamburger */
    .nav-cta-wrapper .btn-emerald {
        display: none !important;
    }
    .nav-cta-wrapper .btn-whatsapp-nav {
        display: none !important;
    }

    /* Show the hamburger toggle */
    .mobile-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(7, 59, 58, 0.06);
        border: 1px solid rgba(20, 184, 166, 0.15) !important;
        font-size: 1.15rem !important;
        color: var(--color-primary-dark) !important;
        cursor: pointer;
        margin-left: 0 !important;
        transition: all 0.3s ease;
    }
    .mobile-toggle:hover {
        background: rgba(20, 184, 166, 0.1);
    }

    /* --------------------------------------------------------
       MOBILE DRAWER — FULL SCREEN PREMIUM OVERLAY
    --------------------------------------------------------- */
    .mobile-nav-drawer {
        position: fixed !important;
        top: 0 !important;
        right: -100%;                      /* NO !important — JS inline style overrides this */
        width: 100% !important;            /* Full screen on mobile */
        max-width: 360px !important;       /* Cap at 360px for tablets */
        height: 100vh !important;
        height: 100dvh !important;         /* Dynamic viewport height */
        background: #FFFFFF !important;
        box-shadow: -20px 0 60px rgba(7, 59, 58, 0.15) !important;
        z-index: 1100 !important;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        overflow-y: auto !important;
        border-left: 1px solid rgba(20, 184, 166, 0.1);
    }

    /* When drawer is open — toggled by JS classList */
    .mobile-nav-drawer.open {
        right: 0 !important;
    }

    /* Backdrop overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(7, 59, 58, 0.35);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1099;
    }
    .mobile-nav-overlay.active {
        display: block;
    }
}

/* On very small phones, use full width */
@media (max-width: 480px) {
    .mobile-nav-drawer {
        max-width: 100% !important;
    }
}


/* =============================================================
   PHASE 2 — HOME PAGE: HERO SECTION
   ============================================================= */
@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding-top: 110px !important;
        padding-bottom: 4rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        padding: 0 1.25rem;
    }

    .hero-left h1 {
        font-size: 2.65rem;
        margin-bottom: 1.25rem;
    }

    .hero-left p.lead {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .hero-ctas {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
        gap: 2rem;
        flex-wrap: wrap;
    }

    .hero-right {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding-top: 100px !important;
    }
    .hero-left h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: 90px !important;
    }
    .hero-left h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }
    .hero-left p.lead {
        font-size: 0.97rem;
    }
    .hero-ctas {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }
    .hero-ctas .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .hero-stats {
        gap: 1.5rem;
    }
    .stat-val {
        font-size: 2rem;
    }
    .stat-lbl {
        font-size: 0.78rem;
    }
}

/* =============================================================
   PHASE 2 — HOME PAGE & SERVICES PAGE: SERVICES SECTION & CTA
   ============================================================= */
@media (max-width: 991px) {
    .services-hero {
        padding-top: 85px !important;
        padding-bottom: 1.5rem !important;
    }
    .services-hero h1 {
        font-size: 1.85rem !important;
        line-height: 1.3 !important;
    }

    .services-section {
        padding: 2rem 0 !important;
    }
    .services-section > div[style],
    .services-section [style*="grid-template-columns"],
    .services-section [style*="minmax"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
        padding: 0 1.25rem !important;
    }
    .service-card {
        padding: 1.5rem !important;
        opacity: 1 !important;
        visibility: visible !important;
        border-radius: 16px !important;
    }

    .service-quote-section {
        padding: 2.5rem 0 !important;
    }
    .service-quote-card {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
        margin: 0 1.25rem !important;
        border-radius: 16px !important;
    }
    .service-quote-card h3 {
        font-size: 1.35rem !important;
        margin-bottom: 0.6rem !important;
    }
    .service-quote-card p {
        font-size: 0.88rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.55 !important;
    }
    .service-quote-card .btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 0.65rem 1.25rem !important;
        font-size: 0.88rem !important;
    }
    .service-quote-card [style*="height:250px"],
    .service-quote-card [style*="height: 250px"] {
        height: 200px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 767px) {
    .services-hero {
        padding-top: 80px !important;
        padding-bottom: 1rem !important;
    }
    .services-hero h1 {
        font-size: 1.7rem !important;
    }

    .services-section > div[style],
    .services-section [style*="grid-template-columns"],
    .services-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        gap: 1.15rem !important;
        padding: 0 1.25rem !important;
    }

    .service-quote-card {
        margin: 0 1.25rem !important;
        padding: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .services-hero {
        padding-top: 75px !important;
        padding-bottom: 0.75rem !important;
    }
    .services-hero h1 {
        font-size: 1.5rem !important;
    }

    .services-section > div[style],
    .services-section [style*="grid-template-columns"],
    .services-section [style*="minmax"] {
        padding: 0 1rem !important;
        gap: 1rem !important;
    }

    .service-card {
        padding: 1.25rem !important;
    }

    .service-quote-card {
        margin: 0 1rem !important;
        padding: 1.15rem !important;
    }
    .service-quote-card h3 {
        font-size: 1.25rem !important;
    }
    .service-quote-card [style*="height:250px"],
    .service-quote-card [style*="height: 250px"] {
        height: 180px !important;
    }
}

/* =============================================================
   PHASE 2 — HOME PAGE: PORTFOLIO / MASONRY
   ============================================================= */
@media (max-width: 991px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
        padding: 0 1.25rem !important;
    }
    .portfolio-img-box {
        aspect-ratio: 16 / 10 !important;
        height: auto !important;
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .portfolio-img-box {
        aspect-ratio: 16 / 10 !important;
        height: auto !important;
    }
}

/* =============================================================
   PHASE 2 — HOME PAGE: TESTIMONIALS
   ============================================================= */
@media (max-width: 767px) {
    .testimonials-section .glass-card {
        padding: 1.5rem !important;
    }
}

/* =============================================================
   PHASE 2 — HOME PAGE: PROCESS / WHY US / CLIENTS / CTA / BLOG
   ============================================================= */

/* Process Steps & Timeline Optimization */
@media (max-width: 991px) {
    .process-section {
        padding: 4rem 0 !important;
    }
    
    .timeline-container {
        margin: 2.5rem auto 0 auto !important;
        padding-left: 2.5rem !important;
        padding-right: 1.25rem !important;
        max-width: 100% !important;
    }

    .timeline-container::before {
        left: 10px !important;
    }

    .timeline-step {
        margin-bottom: 2.5rem !important;
    }

    .timeline-step::before {
        left: -33px !important;
        top: 4px !important;
        width: 14px !important;
        height: 14px !important;
    }

    .timeline-step h3 {
        font-size: 1.35rem !important;
        line-height: 1.35 !important;
        margin: 0.3rem 0 0.5rem 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .timeline-step p {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 767px) {
    .process-section {
        padding: 3.25rem 0 !important;
    }

    .process-section [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }

    .process-section .section-header h2 {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.5rem !important;
    }

    .process-section .section-header p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .timeline-container {
        margin: 2rem auto 0 auto !important;
        padding-left: 2.25rem !important;
        padding-right: 1rem !important;
    }

    .timeline-container::before {
        left: 8px !important;
    }

    .timeline-step {
        margin-bottom: 2rem !important;
    }

    .timeline-step::before {
        left: -31px !important;
        top: 3px !important;
        width: 13px !important;
        height: 13px !important;
    }

    .timeline-step span {
        font-size: 0.82rem !important;
        letter-spacing: 1px !important;
    }

    .timeline-step h3 {
        font-size: 1.18rem !important;
        line-height: 1.3 !important;
        margin: 0.25rem 0 0.4rem 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .timeline-step p {
        font-size: 0.88rem !important;
        line-height: 1.5 !important;
        color: var(--color-body) !important;
    }
}

@media (max-width: 480px) {
    .process-section {
        padding: 2.75rem 0 !important;
    }

    .process-section .section-header h2 {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.35rem !important;
    }

    .process-section .section-header p {
        font-size: 0.84rem !important;
        line-height: 1.45 !important;
    }

    .timeline-container {
        margin: 1.75rem auto 0 auto !important;
        padding-left: 2rem !important;
        padding-right: 0.85rem !important;
    }

    .timeline-container::before {
        left: 6px !important;
    }

    .timeline-step {
        margin-bottom: 1.65rem !important;
    }

    .timeline-step::before {
        left: -29px !important;
        top: 2px !important;
        width: 12px !important;
        height: 12px !important;
        border-width: 2px !important;
    }

    .timeline-step span {
        font-size: 0.78rem !important;
    }

    .timeline-step h3 {
        font-size: 1.05rem !important;
        line-height: 1.3 !important;
        margin: 0.2rem 0 0.35rem 0 !important;
    }

    .timeline-step p {
        font-size: 0.83rem !important;
        line-height: 1.45 !important;
    }
}

/* Why Us cards */
@media (max-width: 767px) {
    .why-us-section [style*="grid-template-columns"],
    .why_us-section [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Industries section */
@media (max-width: 767px) {
    .industries-section [style*="grid-template-columns"],
    .industries-section [style*="flex-wrap"] {
        flex-wrap: wrap !important;
        padding: 0 1.25rem !important;
    }
}

/* CTA Section */
@media (max-width: 767px) {
    .cta-section [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    .cta-section [style*="display: flex"],
    .cta-section [style*="display:flex"] {
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* Blog section card grid */
@media (max-width: 767px) {
    .blog-section [style*="grid-template-columns"],
    .blogs-section [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Clients / Logos marquee */
@media (max-width: 480px) {
    .clients-section [style*="gap"],
    .clients-section [style*="justify-content"] {
        gap: 1.5rem !important;
    }
}

/* =============================================================
   PHASE 2 — FAQ SECTION
   ============================================================= */
@media (max-width: 767px) {
    .faq-section [style*="max-width: 800px"] {
        padding: 0 1.25rem !important;
    }
    .faq-item {
        padding: 1.25rem 1.5rem !important;
    }
    .faq-trigger {
        font-size: 0.97rem !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .faq-item {
        padding: 1rem 1.25rem !important;
    }
    .faq-trigger {
        font-size: 0.9rem !important;
    }
}

/* =============================================================
   PHASE 2 — PACKAGES SECTION (HOME)
   ============================================================= */
@media (max-width: 991px) {
    .packages-section [style*="grid-template-columns"] {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
        padding: 0 1.25rem !important;
    }
}

@media (max-width: 640px) {
    .packages-section [style*="grid-template-columns"],
    .packages-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}


/* =============================================================
   PHASE 3 — INNER PAGES: HERO SECTIONS (shared)
   ============================================================= */

/* All inner page heroes (contact, about, services, packages, etc.) */
@media (max-width: 991px) {
    .contact-hero,
    .about-hero,
    .packages-page-hero,
    .blog-detail-hero,
    .service-detail-hero,
    .careers-hero,
    .portfolio-hero,
    .career-detail-hero,
    .case-studies-hero,
    .case-study-detail-hero,
    .blogs-hero {
        padding-top: 110px !important;
        padding-bottom: 2.5rem !important;
    }

    /* Hero h1 on inner pages */
    .contact-hero h1,
    .about-hero h1,
    .packages-page-hero h1,
    .service-detail-hero h1,
    .blog-detail-hero h1,
    .careers-hero h1,
    .portfolio-hero h1 {
        font-size: 2.4rem !important;
    }
}

@media (max-width: 767px) {
    .contact-hero h1,
    .about-hero h1,
    .packages-page-hero h1,
    .service-detail-hero h1,
    .blog-detail-hero h1,
    .careers-hero h1,
    .portfolio-hero h1 {
        font-size: 2rem !important;
    }

    .contact-hero [style*="padding-top"],
    .about-hero [style*="padding-top"],
    .packages-page-hero [style*="padding-top"],
    .blog-detail-hero [style*="padding-top"],
    .service-detail-hero [style*="padding-top"] {
        padding-top: 100px !important;
    }
}

@media (max-width: 480px) {
    .contact-hero h1,
    .about-hero h1,
    .packages-page-hero h1,
    .service-detail-hero h1,
    .blog-detail-hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
    }
}

/* =============================================================
   PHASE 3 — CONTACT PAGE
   ============================================================= */

@media (max-width: 991px) {
    /* Section padding when hero is NOT present (clearing mobile navbar ~65px) */
    .contact-details-form {
        padding-top: 95px !important;
        padding-bottom: 3.5rem !important;
    }

    /* When hero IS present */
    .contact-hero {
        padding-top: 95px !important;
        padding-bottom: 2rem !important;
    }
    .contact-hero + .contact-details-form {
        padding-top: 2rem !important;
        padding-bottom: 3.5rem !important;
    }

    /* Outer grid stack */
    .contact-details-form .grid-1-2-col,
    .contact-details-form [style*="grid-1-2-col"] {
        grid-template-columns: 1fr !important;
        gap: 1.75rem !important;
        padding: 0 1.25rem !important;
    }

    /* Info cards stack gap */
    .contact-details-form .grid-1-2-col > div:first-child {
        gap: 1rem !important;
    }

    /* Contact form card padding */
    #contact-form .glass-card {
        padding: 2rem 1.75rem !important;
    }
}

@media (max-width: 767px) {
    /* Section top padding without hero */
    .contact-details-form {
        padding-top: 85px !important;
        padding-bottom: 3rem !important;
    }

    /* Hero section */
    .contact-hero {
        padding-top: 85px !important;
        padding-bottom: 1.5rem !important;
    }
    .contact-hero + .contact-details-form {
        padding-top: 1.5rem !important;
        padding-bottom: 3rem !important;
    }

    /* Outer grid gap */
    .contact-details-form .grid-1-2-col,
    .contact-details-form [style*="grid-1-2-col"] {
        gap: 1.5rem !important;
        padding: 0 1.25rem !important;
    }

    /* Info column heading & subtitle */
    .contact-details-form .grid-1-2-col > div:first-child h2 {
        font-size: 1.55rem !important;
        margin-bottom: 0.25rem !important;
    }
    .contact-details-form .grid-1-2-col > div:first-child p {
        font-size: 0.88rem !important;
        margin-bottom: 0.6rem !important;
        line-height: 1.45 !important;
    }

    /* Info cards stack gap */
    .contact-details-form .grid-1-2-col > div:first-child {
        gap: 0.85rem !important;
    }

    /* Info card padding & internal gap */
    .contact-details-form .grid-1-2-col > div:first-child .glass-card {
        padding: 1rem 1.15rem !important;
        gap: 0.85rem !important;
        border-radius: 14px !important;
    }

    /* Info card icon box */
    .contact-details-form .grid-1-2-col > div:first-child .glass-card > div:first-child {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        font-size: 1.1rem !important;
        border-radius: 10px !important;
    }

    /* Info card title & text */
    .contact-details-form .grid-1-2-col > div:first-child .glass-card h4 {
        font-size: 0.98rem !important;
        margin-bottom: 0.2rem !important;
    }
    .contact-details-form .grid-1-2-col > div:first-child .glass-card p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    .contact-details-form .grid-1-2-col > div:first-child .glass-card a[href*="whatsapp"] {
        margin-top: 0.4rem !important;
        font-size: 0.78rem !important;
        gap: 0.35rem !important;
    }

    /* Contact form card padding */
    #contact-form .glass-card {
        padding: 1.5rem 1.25rem !important;
        border-radius: 16px !important;
    }

    /* Contact form heading & subtitle — removes excessive 2.5rem bottom gap */
    #contact-form h3 {
        font-size: 1.35rem !important;
        margin-bottom: 0.25rem !important;
    }
    #contact-form p {
        font-size: 0.85rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.45 !important;
    }

    /* Contact form input grid & gap */
    #contact-form form {
        gap: 0.85rem !important;
    }
    #contact-form form [style*="grid-template-columns:1fr 1fr"],
    #contact-form form [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    /* Form labels & inputs */
    #contact-form label {
        font-size: 0.72rem !important;
        margin-bottom: 0.3rem !important;
    }
    #contact-form input,
    #contact-form textarea {
        padding: 0.7rem 0.95rem !important;
        font-size: 0.88rem !important;
        border-radius: 10px !important;
    }
    #contact-form textarea {
        height: 95px !important;
    }
    #contact-form button[type="submit"] {
        padding: 0.85rem !important;
        font-size: 0.92rem !important;
        border-radius: 10px !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Section top padding without hero */
    .contact-details-form {
        padding-top: 75px !important;
        padding-bottom: 2.25rem !important;
    }

    /* Hero section */
    .contact-hero {
        padding-top: 75px !important;
        padding-bottom: 1.25rem !important;
    }
    .contact-hero + .contact-details-form {
        padding-top: 1rem !important;
        padding-bottom: 2.25rem !important;
    }

    /* Outer grid gap */
    .contact-details-form .grid-1-2-col,
    .contact-details-form [style*="grid-1-2-col"] {
        gap: 1.25rem !important;
        padding: 0 1rem !important;
    }

    /* Info column heading & subtitle */
    .contact-details-form .grid-1-2-col > div:first-child h2 {
        font-size: 1.35rem !important;
        margin-bottom: 0.2rem !important;
    }
    .contact-details-form .grid-1-2-col > div:first-child p {
        font-size: 0.82rem !important;
        margin-bottom: 0.45rem !important;
        line-height: 1.4 !important;
    }

    /* Info cards stack gap */
    .contact-details-form .grid-1-2-col > div:first-child {
        gap: 0.75rem !important;
    }

    /* Info card padding & internal gap */
    .contact-details-form .grid-1-2-col > div:first-child .glass-card {
        padding: 0.85rem 1rem !important;
        gap: 0.75rem !important;
        border-radius: 12px !important;
    }

    /* Info card icon box */
    .contact-details-form .grid-1-2-col > div:first-child .glass-card > div:first-child {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }

    /* Info card title & text */
    .contact-details-form .grid-1-2-col > div:first-child .glass-card h4 {
        font-size: 0.92rem !important;
        margin-bottom: 0.15rem !important;
    }
    .contact-details-form .grid-1-2-col > div:first-child .glass-card p {
        font-size: 0.82rem !important;
        line-height: 1.35 !important;
    }
    .contact-details-form .grid-1-2-col > div:first-child .glass-card a[href*="whatsapp"] {
        margin-top: 0.35rem !important;
        font-size: 0.75rem !important;
    }

    /* Contact form card padding */
    #contact-form .glass-card {
        padding: 1.25rem 1rem !important;
        border-radius: 14px !important;
    }

    /* Contact form heading & subtitle */
    #contact-form h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.2rem !important;
    }
    #contact-form p {
        font-size: 0.82rem !important;
        margin-bottom: 1rem !important;
    }

    /* Contact form input grid & gap */
    #contact-form form {
        gap: 0.75rem !important;
    }
    #contact-form form [style*="grid-template-columns:1fr 1fr"],
    #contact-form form [style*="grid-template-columns: 1fr 1fr"] {
        gap: 0.75rem !important;
    }

    /* Form labels & inputs */
    #contact-form label {
        font-size: 0.68rem !important;
        margin-bottom: 0.25rem !important;
    }
    #contact-form input,
    #contact-form textarea {
        padding: 0.65rem 0.85rem !important;
        font-size: 0.84rem !important;
        border-radius: 8px !important;
    }
    #contact-form textarea {
        height: 85px !important;
    }
    #contact-form button[type="submit"] {
        padding: 0.75rem !important;
        font-size: 0.88rem !important;
    }
}

/* =============================================================
   PHASE 3 — ABOUT PAGE
   ============================================================= */
@media (max-width: 991px) {
    /* About hero grid → stack */
    .about-hero .grid-2-1-col {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.25rem !important;
    }

    /* Founded year card — make smaller */
    .about-hero .glass-card {
        padding: 2rem !important;
        max-width: 200px !important;
        margin: 0 auto !important;
    }

    /* Mission section grid */
    .mission-section [style*="minmax(320px"] {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
        padding: 0 1.25rem !important;
    }

    /* Team grid */
    .team-section [style*="minmax(280px"] {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
        padding: 0 1.25rem !important;
    }
}

@media (max-width: 640px) {
    .mission-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
    .team-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .about-hero h1 {
        font-size: 1.75rem !important;
    }
    /* Founded card */
    .about-hero .glass-card [style*="font-size:4rem"],
    .about-hero .glass-card [style*="font-size: 4rem"] {
        font-size: 3rem !important;
    }
}

/* =============================================================
   PHASE 3 — SERVICE DETAIL PAGE
   ============================================================= */
@media (max-width: 991px) {
    /* Hero grid → stack */
    .service-detail-hero .grid-2-1-col {
        grid-template-columns: 1fr !important;
        gap: 1.75rem !important;
        padding: 0 1.25rem !important;
    }

    /* Service image box */
    .service-detail-hero [style*="max-width: 400px"] {
        max-width: 100% !important;
        height: 220px !important;
    }

    /* Overview grid → stack */
    .service-overview .grid-2-col {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.25rem !important;
    }

    /* Inquiry section grid → stack */
    .service-inquiry .grid-1-2-col {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.25rem !important;
    }

    /* Service h1 */
    .service-detail-hero h1 {
        font-size: 2.25rem !important;
    }

    /* Timeline */
    .timeline-container {
        padding-left: 2rem !important;
    }
}

@media (max-width: 767px) {
    .service-detail-hero h1 {
        font-size: 1.85rem !important;
    }
    .service-overview {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .service-inquiry {
        padding-top: 1.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Related services carousel header */
    .all-services-carousel-section [style*="justify-content:space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        padding: 0 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .service-detail-hero h1 {
        font-size: 1.6rem !important;
    }
    .service-inquiry .glass-card {
        padding: 1.5rem !important;
    }
}

/* =============================================================
   PHASE 3 — BLOG DETAIL PAGE
   ============================================================= */
@media (max-width: 991px) {
    /* Blog hero 2-col → stack */
    .blog-detail-hero [style*="grid-template-columns: 1.2fr 0.8fr"],
    .blog-detail-hero [style*="grid-template-columns:1.2fr 0.8fr"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Featured image height */
    .blog-detail-hero [style*="height:320px"],
    .blog-detail-hero [style*="height: 320px"] {
        height: 220px !important;
    }

    .blog-detail-hero h1 {
        font-size: 2rem !important;
    }
}

@media (max-width: 767px) {
    .blog-detail-hero h1 {
        font-size: 1.7rem !important;
    }

    /* Article content card padding */
    .blog-narrative-article {
        padding: 2rem !important;
        font-size: 1rem !important;
    }

    /* Comment card padding */
    .section-bg-light [style*="padding:1.5rem 2rem"] {
        padding: 1.25rem !important;
    }

    /* Comment form card padding */
    #comment-form {
        padding: 1.75rem !important;
    }

    /* 2-col comment form inputs → 1 col */
    #comment-form [style*="grid-template-columns: 1fr 1fr"],
    #comment-form [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .blog-detail-hero h1 {
        font-size: 1.45rem !important;
        line-height: 1.25 !important;
    }
    .blog-narrative-article {
        padding: 1.5rem 1.25rem !important;
    }
    .blog-narrative-article blockquote {
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
    }
    #comment-form {
        padding: 1.35rem 1.25rem !important;
    }
}

/* =============================================================
   PHASE 3 — PACKAGES PAGE
   ============================================================= */
@media (max-width: 767px) {
    /* Hero h1 */
    .packages-page-hero h1 {
        font-size: 2rem !important;
    }

    /* Comparison table — make it horizontally scrollable */
    .packages-page-hero ~ section [style*="overflow-x: auto"],
    section [style*="overflow-x: auto"] {
        padding: 0 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .packages-page-hero h1 {
        font-size: 1.65rem !important;
    }
}

/* =============================================================
   PHASE 3 — CAREERS PAGE
   ============================================================= */
@media (max-width: 991px) {
    .careers-section [style*="grid-template-columns"],
    .careers-hero ~ section [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Career Detail */
@media (max-width: 991px) {
    .career-detail-hero [style*="grid-template-columns"],
    .career-detail-hero ~ section [style*="grid-1-2-col"],
    .career-detail-hero ~ section [style*="grid-2-col"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
    .career-detail-hero h1 {
        font-size: 2.2rem !important;
    }
}

@media (max-width: 480px) {
    .career-detail-hero h1 {
        font-size: 1.75rem !important;
    }
}

/* =============================================================
   PHASE 3 — PORTFOLIO & CASE STUDIES PAGES
   ============================================================= */
@media (max-width: 991px) {
    /* Hero Section padding when present */
    .portfolio-hero {
        padding-top: 95px !important;
        padding-bottom: 1rem !important;
    }

    /* Filter & Search Panel — Top clearance when hero is absent */
    .portfolio-filter-panel {
        padding-top: 85px !important;
        padding-bottom: 1rem !important;
    }
    .portfolio-hero + .portfolio-filter-panel {
        padding-top: 0.75rem !important;
        padding-bottom: 1rem !important;
    }

    .portfolio-filter-panel > div {
        gap: 1.15rem !important;
        padding: 0 1.25rem !important;
    }

    /* Portfolio Section Spacing */
    .portfolio-section[style*="padding-top"],
    .portfolio-section {
        padding-top: 1.25rem !important;
        padding-bottom: 3.5rem !important;
    }

    /* Clean Mobile Portfolio Card Structure */
    .portfolio-section .masonry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
        padding: 0 1.25rem !important;
    }

    .portfolio-section .masonry-item {
        display: flex !important;
        flex-direction: column !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        background: #FFFFFF !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid var(--color-border) !important;
    }

    /* Clean Unobstructed Image Header */
    .portfolio-section .portfolio-img-box,
    .portfolio-img-box {
        width: 100% !important;
        height: 200px !important;
        position: relative !important;
        overflow: hidden !important;
        background: #F8FAFC !important;
        border-bottom: 1px solid var(--color-border) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.75rem !important;
    }

    .portfolio-section .portfolio-img-box img,
    .portfolio-img-box img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        border-radius: 6px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
        transform: none !important;
    }

    /* Dedicated Info Block Below Image */
    .portfolio-card-content {
        padding: 1.15rem 1.25rem !important;
        background: #FFFFFF !important;
    }

    .portfolio-card-title {
        font-size: 1.02rem !important;
        margin-bottom: 0.35rem !important;
        line-height: 1.35 !important;
    }

    .portfolio-card-meta {
        font-size: 0.8rem !important;
        margin-bottom: 0.85rem !important;
    }

    /* Portfolio Detail Page Top Hero Optimization */
    .portfolio-detail-hero {
        padding-top: 85px !important;
        padding-bottom: 2.25rem !important;
    }

    .portfolio-detail-nav {
        margin-bottom: 1rem !important;
    }

    .portfolio-back-btn {
        font-size: 0.78rem !important;
        padding: 0.35rem 0.85rem !important;
    }

    .portfolio-detail-header-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
        margin-top: 0.5rem !important;
    }

    .portfolio-detail-title {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
    }

    .portfolio-detail-live-btn {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0.65rem 1.25rem !important;
        font-size: 0.88rem !important;
    }

    .portfolio-meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        margin-top: 1.25rem !important;
    }

    .portfolio-meta-card {
        padding: 0.85rem 1rem !important;
        border-radius: 12px !important;
    }

    .portfolio-meta-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.95rem !important;
    }

    .portfolio-meta-info .meta-label {
        font-size: 0.68rem !important;
        margin-bottom: 0.15rem !important;
    }

    .portfolio-meta-info .meta-value {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }

    .portfolio-detail-showcase {
        margin-top: 1.5rem !important;
        border-radius: 16px !important;
        padding: 0.75rem !important;
        max-height: none !important;
    }

    .portfolio-detail-showcase img {
        max-height: none !important;
        width: 100% !important;
        height: auto !important;
    }

    .portfolio-detail-grid-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .portfolio-narrative-card {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }

    .portfolio-sidebar-box {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 767px) {
    .portfolio-hero {
        padding-top: 85px !important;
        padding-bottom: 0.75rem !important;
    }
    .portfolio-hero h1 {
        font-size: 1.85rem !important;
    }

    .portfolio-filter-panel {
        padding-top: 75px !important;
        padding-bottom: 0.85rem !important;
    }
    .portfolio-hero + .portfolio-filter-panel {
        padding-top: 0.5rem !important;
        padding-bottom: 0.85rem !important;
    }

    .portfolio-filter-panel > div {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
        padding: 0 1.25rem !important;
    }
    .portfolio-filter-panel form {
        width: 100% !important;
    }
    .portfolio-filter-panel form input[type="text"] {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 0.55rem 1rem !important;
        font-size: 0.85rem !important;
    }
    .portfolio-filter-panel .btn {
        padding: 0.45rem 1rem !important;
        font-size: 0.8rem !important;
    }

    .portfolio-section[style*="padding-top"],
    .portfolio-section {
        padding-top: 1rem !important;
        padding-bottom: 3rem !important;
    }

    .portfolio-section .masonry-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 0 1.25rem !important;
    }
    .portfolio-section .portfolio-img-box {
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
    }

    .portfolio-detail-hero h1,
    .case-study-detail-hero h1 {
        font-size: 1.85rem !important;
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        padding-top: 75px !important;
        padding-bottom: 0.5rem !important;
    }
    .portfolio-hero h1 {
        font-size: 1.6rem !important;
    }

    .portfolio-filter-panel {
        padding-top: 70px !important;
        padding-bottom: 0.75rem !important;
    }
    .portfolio-hero + .portfolio-filter-panel {
        padding-top: 0.4rem !important;
        padding-bottom: 0.75rem !important;
    }
    .portfolio-filter-panel > div {
        padding: 0 1rem !important;
        gap: 0.75rem !important;
    }

    .portfolio-section[style*="padding-top"],
    .portfolio-section {
        padding-top: 0.85rem !important;
        padding-bottom: 2.25rem !important;
    }

    .portfolio-section .masonry-grid {
        gap: 1rem !important;
        padding: 0 1rem !important;
    }
    .portfolio-section .portfolio-img-box {
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
    }

    .portfolio-card-content {
        padding: 1rem !important;
    }
    .portfolio-card-title {
        font-size: 0.98rem !important;
    }
    .portfolio-card-meta {
        font-size: 0.78rem !important;
        margin-bottom: 0.75rem !important;
    }

    .portfolio-detail-hero {
        padding-top: 75px !important;
        padding-bottom: 1.75rem !important;
    }

    .portfolio-detail-title {
        font-size: 1.45rem !important;
    }

    .portfolio-meta-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
    }

    .portfolio-meta-card {
        padding: 0.75rem 0.85rem !important;
    }

    .portfolio-detail-showcase {
        margin-top: 1.25rem !important;
        padding: 0.5rem !important;
        max-height: none !important;
    }
}

/* Case studies grid */
@media (max-width: 767px) {
    .case-studies-section [style*="grid-template-columns"],
    .case-studies-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* =============================================================
   PHASE 3 — LAYOUT HELPER GRIDS
   ============================================================= */
@media (max-width: 991px) {
    .grid-2-col,
    .grid-1-2-col,
    .grid-2-1-col {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .grid-2-col,
    .grid-1-2-col,
    .grid-2-1-col {
        padding: 0 1.25rem;
        gap: 1.5rem !important;
    }
}

/* =============================================================
   PHASE 4 — FOOTER
   ============================================================= */
@media (max-width: 991px) {
    footer.footer-section {
        padding: 4rem 0 2.5rem 0 !important;
        position: relative !important;
        z-index: 10 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        clear: both !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2.5rem !important;
        padding: 0 1.5rem 3rem 1.5rem !important;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2.25rem !important;
        padding: 0 1.25rem 2.5rem 1.25rem !important;
    }

    footer.footer-section {
        padding: 3.5rem 0 2rem 0;
    }
}

@media (max-width: 767px) {
    /* Footer bottom — stack address/email */
    .footer-bottom {
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center !important;
        padding: 1.75rem 1.25rem 0 1.25rem !important;
    }

    .footer-bottom [style*="display: flex"],
    .footer-bottom [style*="display:flex"] {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
}

/* Footer company name size */
@media (max-width: 480px) {
    .footer-col > a span {
        font-size: 1.2rem !important;
    }
    .footer-col h3 {
        font-size: 1rem !important;
        margin-bottom: 1.25rem !important;
    }
    .footer-links li {
        margin-bottom: 0.75rem !important;
    }
}

/* =============================================================
   PHASE 4 — LIVE CHAT WIDGET
   ============================================================= */
@media (max-width: 767px) {
    /* Position the widget further in from the edge */
    #live-chat-widget {
        bottom: 18px !important;
        right: 18px !important;
    }

    /* Chat modal — full width with margin on small screens */
    #chat-modal {
        width: calc(100vw - 2.5rem) !important;
        max-width: 340px !important;
        right: 0;
        border-radius: 16px !important;
    }
}

@media (max-width: 480px) {
    /* On very small phones, push the modal to the left to fit */
    #live-chat-widget {
        bottom: 14px !important;
        right: 14px !important;
    }

    #chat-modal {
        width: calc(100vw - 2rem) !important;
        max-width: 320px !important;
    }

    /* Chat toggle button — slightly smaller */
    #chat-toggle-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.2rem !important;
    }

    /* Chat header padding */
    #chat-modal > div:first-child {
        padding: 1rem 1.25rem !important;
    }

    /* Chat body padding */
    #chat-modal > div:nth-child(2) {
        padding: 1rem 1.25rem !important;
        max-height: 320px !important;
    }
}

/* =============================================================
   GENERAL UTILITY — PREVENT HORIZONTAL OVERFLOW
   ============================================================= */
@media (max-width: 991px) {
    /* Ensure no element causes horizontal scroll */
    body, html {
        overflow-x: hidden !important;
    }

    /* All sections with max-width containers */
    [style*="max-width: 1200px"],
    [style*="max-width:1200px"],
    [style*="max-width: 1100px"],
    [style*="max-width:1100px"],
    [style*="max-width: 900px"],
    [style*="max-width: 800px"],
    [style*="max-width: 1400px"] {
        max-width: 100% !important;
    }
}

/* Padding normalization for containers on mobile */
@media (max-width: 991px) {
    [style*="padding: 0 1.5rem"],
    [style*="padding:0 1.5rem"] {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    [style*="padding: 0 1.5rem"],
    [style*="padding:0 1.5rem"],
    [style*="padding: 0 1.25rem"] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* =============================================================
   EXTRA TARGETED FIXES
   ============================================================= */

/* Why Us section — ensure proper overflow on mobile */
@media (max-width: 600px) {
    .why-us-section [style*="minmax(300px"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* CTA Banner Section */
@media (max-width: 767px) {
    .cta-banner-section {
        padding: 3.5rem 0 !important;
    }
    .cta-banner-section h2 {
        font-size: 2rem !important;
    }
    .cta-banner-section p {
        font-size: 1rem !important;
    }
    .cta-banner-section [style*="gap: 1.5rem"] {
        gap: 0.85rem !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .cta-banner-section .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .cta-banner-section h2 {
        font-size: 1.65rem !important;
    }
    .cta-banner-section p {
        font-size: 0.9rem !important;
    }
}

/* Mission section - ensure auto-fit wraps correctly */
@media (max-width: 600px) {
    .mission-section [style*="auto-fit"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Team section - smaller cards on very small screens */
@media (max-width: 480px) {
    .team-section [style*="height:260px"],
    .team-section [style*="height: 260px"] {
        height: 220px !important;
    }
}

/* About hero h1 specific inline-style override */
@media (max-width: 767px) {
    .about-hero [style*="font-size:3.5rem"],
    .about-hero [style*="font-size: 3.5rem"] {
        font-size: 2rem !important;
    }
    .contact-hero [style*="font-size:3.5rem"],
    .contact-hero [style*="font-size: 3.5rem"] {
        font-size: 2rem !important;
    }
    .packages-page-hero [style*="font-size:3.5rem"],
    .packages-page-hero [style*="font-size: 3.5rem"] {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .about-hero [style*="font-size:3.5rem"],
    .about-hero [style*="font-size: 3.5rem"] {
        font-size: 1.65rem !important;
    }
    .contact-hero [style*="font-size:3.5rem"],
    .contact-hero [style*="font-size: 3.5rem"] {
        font-size: 1.65rem !important;
    }
    .packages-page-hero [style*="font-size:3.5rem"],
    .packages-page-hero [style*="font-size: 3.5rem"] {
        font-size: 1.6rem !important;
    }
}

/* Service detail h1 inline override */
@media (max-width: 767px) {
    .service-detail-hero [style*="font-size:3rem"],
    .service-detail-hero [style*="font-size: 3rem"] {
        font-size: 1.85rem !important;
    }
}

@media (max-width: 480px) {
    .service-detail-hero [style*="font-size:3rem"],
    .service-detail-hero [style*="font-size: 3rem"] {
        font-size: 1.55rem !important;
    }
}

/* Blog detail h1 inline override */
@media (max-width: 767px) {
    .blog-detail-hero [style*="font-size:2.65rem"],
    .blog-detail-hero [style*="font-size: 2.65rem"] {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 480px) {
    .blog-detail-hero [style*="font-size:2.65rem"],
    .blog-detail-hero [style*="font-size: 2.65rem"] {
        font-size: 1.45rem !important;
    }
}

/* Contact form 2-col grid inside contact page */
@media (max-width: 767px) {
    form [style*="grid-template-columns:1fr 1fr"],
    form [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Process section numbered steps */
@media (max-width: 640px) {
    .process-section [style*="auto-fit"],
    .process-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Packages cards section */
@media (max-width: 640px) {
    .packages-section [style*="auto-fit"],
    .packages-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Blog listing grid */
@media (max-width: 640px) {
    .blog-section [style*="auto-fit"],
    .blog-section [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Industries section */
@media (max-width: 640px) {
    .industries-section [style*="auto-fit"],
    .industries-section [style*="minmax"] {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 1.25rem !important;
    }
}

/* Blogs listing page */
@media (max-width: 767px) {
    .blogs-section [style*="auto-fit"],
    .blogs-section [style*="minmax"],
    .blogs-list [style*="auto-fit"],
    .blogs-list [style*="minmax"] {
        grid-template-columns: 1fr !important;
        padding: 0 1.25rem !important;
    }
}

/* Prevent glass-card hover-lift on mobile */
@media (hover: none) {
    .glass-card:hover {
        transform: none !important;
    }
}

/* Make sure all inline padding of inner-page sections work on phone */
@media (max-width: 480px) {
    .service-overview [style*="padding: 2.5rem 0"],
    .service-inquiry [style*="padding: 2.5rem 0"] {
        padding: 2rem 0 !important;
    }

    /* Blog article images should not overflow */
    .blog-narrative-article img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Comment meta flex */
    .blog-narrative-article ~ * [style*="display:flex; justify-content:space-between"] {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
}

/* Nav wrapper padding on very small phones */
@media (max-width: 375px) {
    .nav-wrapper {
        padding: 0 1rem !important;
    }
    header.navbar-container {
        padding: 0.85rem 0 !important;
    }
}
