/* =========================================================
   RESPONSIVE FIXES (all pages)
   Loaded after style.css. Only adjusts sizing/spacing per screen,
   no colors, content or section order are changed.
========================================================= */

/* ---------- Global ---------- */
html, body {
    overflow-x: clip; /* stops sideways scroll from slide-in animations (iOS ignores overflow-x:hidden) */
}

html {
    scroll-padding-top: 90px; /* #anchor links land below the fixed navbar */
}

img, video, iframe {
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* ---------- Hero headings (service / industry / packages pages) ----------
   Same scale as the home page hero title (3.2rem) instead of display-3 (4rem),
   which was oversized inside the half-width hero column. */
.hero-section .col-lg-6 h1.display-3,
.hero-section .col-lg-6 h1.display-4 {
    font-size: 3.2rem;
    line-height: 1.18;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section .col-lg-6 h1.display-3,
    .hero-section .col-lg-6 h1.display-4 {
        font-size: 2.75rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section .col-lg-6 h1.display-3,
    .hero-section .col-lg-6 h1.display-4 {
        font-size: 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section .col-lg-6 h1.display-3,
    .hero-section .col-lg-6 h1.display-4 {
        font-size: 2rem;
    }
}

/* ---------- Navbar (mobile menu) ---------- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding-bottom: 12px;
    }

    .navbar-collapse .nav-link {
        margin: 0;
        padding: 10px 0;
    }

    .custom-dropdown .dropdown-menu {
        min-width: 0;
        box-shadow: none !important;
        margin-bottom: 8px;
    }

    .navbar-collapse .btn-gradient {
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        width: 150px !important;
    }
}

/* ---------- Consistent section spacing (all screens) ---------- */
section.about-section,
section.services-section,
section.why-us-section,
section.spotlight-section,
section.portfolio-showcase-section,
section.process-section,
section.testimonial-section,
section.case-studies-section,
section.problem-section,
section.why-boxes-section,
section.solvingsec {
    padding-top: 80px;
    padding-bottom: 80px;
}

section.jploft-process-section {
    padding: 80px 0 40px;
}

section.faq-section {
    padding: 80px 0 30px;
}

@media (max-width: 991.98px) {
    section.hero-section {
        padding-top: 130px;
        padding-bottom: 60px;
    }

    section.about-section,
    section.services-section,
    section.why-us-section,
    section.spotlight-section,
    section.portfolio-showcase-section,
    section.process-section,
    section.testimonial-section,
    section.case-studies-section,
    section.problem-section,
    section.why-boxes-section,
    section.solvingsec {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    section.jploft-process-section {
        padding: 64px 0 30px;
    }

    section.faq-section {
        padding: 64px 0 24px;
    }
}

@media (max-width: 575.98px) {
    section.hero-section {
        padding-top: 125px;
        padding-bottom: 50px;
    }

    section.about-section,
    section.services-section,
    section.why-us-section,
    section.spotlight-section,
    section.portfolio-showcase-section,
    section.process-section,
    section.testimonial-section,
    section.case-studies-section,
    section.problem-section,
    section.why-boxes-section,
    section.solvingsec {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    section.jploft-process-section {
        padding: 52px 0 20px;
    }

    section.faq-section {
        padding: 52px 0 16px;
    }

    footer {
        padding-top: 56px;
    }
}

/* ---------- Hero buttons & lead form on phones ---------- */
@media (max-width: 575.98px) {
    .hero-section .d-flex.flex-wrap > .btn {
        flex: 1 1 100%;
    }

    .hero-lead-card {
        padding: 24px 18px !important;
    }
}

/* ---------- Cards ---------- */
@media (max-width: 767.98px) {
    .service-row-item,
    .problem-card,
    .testimonial-card {
        padding: 24px;
    }

    .why-box-card {
        padding: 28px 24px;
    }

    .service-detail-card,
    .engagement-card {
        padding: 28px 22px;
    }
}

/* ---------- Process timeline ---------- */
/* Two-column timeline was too cramped on tablets: go single column below 992px */
@media (max-width: 991.98px) {
    .timeline-container {
        margin-top: 40px;
    }

    .timeline-container::before { left: 20px; }
    .timeline-dot { left: 20px; }
    .timeline-row { flex-direction: column; align-items: stretch; }
    .timeline-col { width: 100%; }

    .timeline-item.odd .timeline-card-col,
    .timeline-item.even .timeline-card-col {
        order: 2; padding-left: 50px; padding-right: 0; text-align: left;
    }

    .timeline-item.odd .timeline-step-col,
    .timeline-item.even .timeline-step-col {
        order: 1; padding-left: 50px; padding-right: 0; text-align: left; margin-bottom: 10px;
    }

    /* Pages whose timeline has no dots/columns: the centre line ran through the cards */
    .timeline-container:not(:has(.timeline-dot))::before {
        display: none;
    }

    .timeline-item {
        margin-bottom: 30px;
    }

    .step-label {
        font-size: 26px;
    }
}

@media (max-width: 575.98px) {
    .timeline-card {
        padding: 20px;
        gap: 14px;
        align-items: flex-start;
    }

    .timeline-icon-box {
        width: 46px;
        height: 46px;
        min-width: 46px;
        font-size: 18px;
        border-radius: 12px;
    }

    .timeline-card-title {
        font-size: 17px;
    }

    .timeline-item.odd .timeline-card-col,
    .timeline-item.even .timeline-card-col,
    .timeline-item.odd .timeline-step-col,
    .timeline-item.even .timeline-step-col {
        padding-left: 42px;
    }

    .timeline-container::before,
    .timeline-dot {
        left: 14px;
    }
}

/* ---------- Case study cards ---------- */
@media (max-width: 575.98px) {
    .portfolio-overlay-card {
        height: 360px;
    }

    .portfolio-overlay-content {
        padding: 22px;
    }

    .portfolio-title {
        font-size: 22px;
    }
}

/* Touch screens have no hover, so the hidden case-study details never appeared */
@media (hover: none) {
    .portfolio-overlay-card .portfolio-hover-details {
        max-height: 220px;
        opacity: 1;
        transform: none;
        margin-top: 12px;
    }
}

/* ---------- CTA banner ---------- */
@media (max-width: 991.98px) {
    .cta-banner {
        padding: 56px 32px;
    }
}

@media (max-width: 575.98px) {
    .cta-banner {
        padding: 42px 22px;
        border-radius: 22px;
    }

    .cta-banner .btn-lg {
        width: 100%;
    }
}

/* ---------- FAQ accordions ---------- */
@media (max-width: 575.98px) {
    .accordion-button,
    .blog-content .faq-accordion .accordion-button {
        font-size: 15px;
        padding: 16px 18px;
    }

    .accordion-body {
        padding: 16px 18px;
        font-size: 15px;
    }
}

/* ---------- Blog article pages ---------- */
@media (max-width: 991.98px) {
    div.blog-cta-card {
        position: static;
    }
}

@media (max-width: 767.98px) {
    header.blog-header {
        padding: 125px 0 50px;
    }

    main .blog-content {
        font-size: 1rem;
    }

    main .blog-content h2 {
        font-size: 1.55rem;
        margin-top: 32px;
    }

    main .blog-content h3 {
        font-size: 1.2rem;
    }

    table.blog-table {
        font-size: 0.875rem;
    }

    table.blog-table thead th,
    table.blog-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 575.98px) {
    header.blog-header .blog-title {
        font-size: 1.75rem;
    }
}

/* ---------- Footer ---------- */
@media (max-width: 575.98px) {
    .footer-title {
        margin-bottom: 16px;
    }
}

/* ---------- Accessibility: respect "reduce motion" setting ---------- */
@media (prefers-reduced-motion: reduce) {
    .scroll-anim {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .tech-marquee-track,
    .hero-glow-1,
    .hero-glow-2 {
        animation: none !important;
    }
}

/* Blog article: smaller gap between title area and featured image on phones */
@media (max-width: 767.98px) {
    main.container .blog-featured-img-wrapper {
        margin-top: 0;
        margin-bottom: 32px;
    }
}

/* Wide column gaps (.g-5) pushed content 12px off-screen on phones */
@media (max-width: 575.98px) {
    .row.g-5,
    .row.gx-5 {
        --bs-gutter-x: 1.5rem;
    }
}

/* Two light sections back to back (home About → Services): don't stack both paddings */
section.about-section + section.services-section {
    padding-top: 24px;
}

section.about-section .row.g-4.mb-4:last-child {
    margin-bottom: 0 !important;
}
