/* ==========================================================================
   Dfly Inc — Responsive Rules
   Breakpoints: sm 576px | md 768px | lg 992px | xl 1200px | xxl 1400px
   Mobile-first base lives in style.css; overrides here adjust upward.
   ========================================================================== */

/* --- Container steps (reference Bootstrap grid): 1320 / 1140 / 960 / 720 /
   540, fluid below 576px; 12px gutters throughout. --------------------------- */
@media (max-width: 1399px) {
  :root {
    --container-max: 1140px;
  }
}

@media (max-width: 1199px) {
  :root {
    --container-max: 960px;
  }
}

@media (max-width: 991px) {
  :root {
    --container-max: 720px;
  }
}

@media (max-width: 767px) {
  :root {
    --container-max: 540px;
  }
}

@media (max-width: 575px) {
  :root {
    --container-max: none;
  }
}

/* --- Header: responsive states (reference-measured) -------------------------
   >=992  one-row 46px utility bar, 81px bar, full nav + mega menus
          (desktop nav from 992px since 14 October 2026; was 1200px)
   768-991  utility bar wraps to two centred rows, nav collapses to panel
   576-767  utility bar keeps only the CTA; About/Contact move beside toggle
   <=575  utility bar hidden, 61px bar
   ========================================================================== */
@media (max-width: 991px) {
  .utility-bar-inner {
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding-block: 8px;
  }

  .utility-bar-left,
  .utility-bar-right {
    justify-content: center;
    min-height: 38px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Inline expansion (reference model): the nav opens inside the header
     bar, below the logo row, pushing content down. The page keeps
     scrolling; a long menu scrolls within the viewport height. */
  .site-header-inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    flex: 0 0 100%;
    display: block;
    max-height: 0;
    margin-left: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 350ms var(--ease-standard),
      visibility 0s linear 350ms;
  }

  .nav.is-open {
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    padding-top: 6px;
    padding-bottom: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: visible;
    transition: max-height 350ms var(--ease-standard), visibility 0s linear 0s;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    min-height: 42px;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    line-height: 30px;
    text-align: left;
  }

  .nav-dropdown-toggle {
    padding-right: 0;
  }

  .nav-indicator {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
    margin-left: 12px;
    transform: none;
  }

  /* Accordion submenus: shadowed card, scrolls internally past 300px.
     Never inherits the desktop mega-menu geometry. */
  .dropdown-menu,
  .dropdown-menu.mega-menu {
    position: static;
    width: auto;
    min-width: 0;
    max-height: 300px;
    margin: 2px 0 10px;
    padding: 10px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  }

  .nav-item.is-open > .dropdown-menu,
  .nav-item.is-open > .dropdown-menu.mega-menu {
    display: block;
  }

  .dropdown-menu a {
    padding: 2px 20px;
    font-size: 15px;
    white-space: normal;
  }

  .nav-panel-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
  }

  .nav-panel-extra a:not(.btn) {
    font-size: 15px;
    color: var(--color-navy);
  }

  .nav-panel-extra a[aria-current="page"] {
    color: var(--color-primary-dark);
  }

  .nav-panel-cta {
    width: 100%;
  }
}

@media (max-width: 991px) {
  /* 768-991: reference two-row utility bar is 100px visible. */
  .utility-bar-inner {
    padding-block: 12px;
  }
}

/* 401-767: slim CTA-only bar, CTA left-aligned; About/Contact move beside
   the toggle (reference). */
@media (max-width: 767px) {
  .utility-bar-inner {
    min-height: 0;
    padding-block: 0;
    align-items: flex-start;
  }

  .utility-bar-left,
  .utility-bar-right > :not(.utility-cta) {
    display: none;
  }

  .utility-bar-right {
    justify-content: flex-start;
    min-height: 32px;
  }

  .utility-bar a.utility-cta {
    margin-left: 0;
    border-radius: 0 0 4px 4px;
  }

  .header-quick-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    font-size: 16px;
    font-weight: var(--fw-medium);
    color: var(--color-navy);
  }
}

@media (max-width: 576px) {
  .utility-bar-right {
    min-height: 29px;
  }

  .utility-bar a.utility-cta {
    line-height: 27px;
  }

  .site-header {
    --header-h: 71px;
  }

  .site-header .logo img {
    height: 45px;
  }
}

@media (max-width: 480px) {
  .site-header {
    --header-h: 61px;
  }

  .site-header .logo img {
    height: 35px;
  }

  .header-quick-links {
    gap: 8px;
    font-size: 14px;
  }

  .site-header-inner {
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .utility-bar,
  .header-quick-links {
    display: none;
  }
}

/* --- Mobile typography (reference-measured at 375px) ------------------------
   H1 28/33.6, H2 stays 40/60, H3 18/32, body copy 14/26, buttons 14/21,
   form submit 18/27, FAQ 15/26. */
@media (max-width: 575px) {
  h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  h3 {
    font-size: 18px;
    line-height: 32px;
  }

  main p {
    font-size: 14px;
    line-height: 26px;
  }

  .eyebrow {
    font-size: 14px;
    line-height: 26px;
  }

  .btn {
    font-size: 14px;
    line-height: 21px;
  }

  .btn-lg,
  .lead-form-card .btn {
    padding: 8px 20px;
    font-size: 18px;
    line-height: 27px;
  }

  .faq-question {
    padding: 20px 15px 15px;
  }

  .faq-answer p {
    padding: 0 15px 15px;
    font-size: 15px;
    line-height: 26px;
  }
}

/* Reference stat typography stays large on mobile. */
@media (max-width: 767px) {
  .stat-number { font-size: 40px; line-height: 30px; }
  .stat-label { font-size: 16px; line-height: 26px; }
}

/* --- Up to 991px: collapse desktop nav into a slide-down panel ------------ */
@media (max-width: 991px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-hero.has-form .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .page-hero.has-form .page-hero-content {
    margin-inline: auto;
    max-width: 700px;
  }

  .idea-cta-grid-2col {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .slide.is-active {
    grid-template-columns: 1fr;
  }

  .slide-visual {
    min-height: 220px;
  }

  .help-tab-panel.is-active {
    grid-template-columns: 1fr;
  }

  .help-tab-panel .slide-visual {
    order: 1;
    min-height: 220px;
  }

  .help-tab-content {
    order: 2;
  }

  .growth-compare-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .card-carousel-track > * {
    flex-basis: calc((100% - 20px) / 2);
  }

  .testimonial-card {
    flex-basis: calc((100% - 20px) / 2);
  }

  .snapshot-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .sticky-conversion-item {
    font-size: var(--fs-xs);
    padding: var(--space-xs) var(--space-3xs);
    gap: 4px;
  }

  .sticky-conversion-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* --- About: stack visual above content --- */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
    min-height: 300px;
  }

  /* --- Process: 3-column, drop the horizontal connector (it assumes a
     single row and breaks once steps wrap) --- */
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
    row-gap: var(--space-2xl);
  }

  .process-step::before {
    display: none;
  }

  /* --- Contact: stack form under info --- */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* --- About page: team panel stacks under content --- */
  .team-grid {
    grid-template-columns: 1fr;
  }

  /* --- Services page: stack rows, visual always leads --- */
  .service-row {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .service-row:nth-of-type(even) .service-visual {
    /* Re-declared at matching specificity: without this, the desktop
       even-row rule (same selector) still wins on source order alone
       once the layout is single-column, reversing this row only. */
    order: -1;
  }

  .service-visual {
    min-height: 240px;
  }

  .process-steps-4,
  .process-steps-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Up to 767px: single column layouts, tighter spacing ------------------ */
@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding-block: 40px;
  }

  .section-lg {
    padding-block: var(--space-3xl);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2xs);
  }

  .process-steps {
    grid-template-columns: 1fr;
    row-gap: var(--space-xl);
    max-width: 320px;
    margin-inline: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    padding: var(--space-lg);
  }

  .page-hero {
    padding-block: var(--space-2xl) var(--space-xl);
  }

  .timeline-marker {
    width: 46px;
    height: 46px;
  }

  .timeline::before {
    left: 22px;
  }

  .timeline-item {
    gap: var(--space-md);
  }

  .discipline-panel {
    padding: var(--space-lg);
  }

  .discipline-bar-row {
    grid-template-columns: 100px 1fr 40px;
    gap: var(--space-2xs);
  }

  .work-teaser-content {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .work-teaser .btn-secondary {
    width: 100%;
  }

  .services-detail {
    gap: var(--space-2xl);
  }

  .cross-link-content {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  /* Long breadcrumb trails (e.g. long service names) wrapping at the <li>
     level can orphan a separator chevron alone on its own line. Scroll
     horizontally within the breadcrumb bar instead of wrapping. */
  .breadcrumb ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .breadcrumb ol::-webkit-scrollbar {
    display: none;
  }

  .breadcrumb li {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .cross-link-content .btn-secondary {
    width: 100%;
  }

  .card-carousel-track > * {
    flex-basis: 88%;
  }

  .testimonial-card {
    flex-basis: 88%;
  }
}

/* --- Up to 575px: compact controls ---------------------------------------- */
@media (max-width: 575px) {
  .stat-number { font-size: 40px; line-height: 30px; }
  .stat-label { font-size: 16px; line-height: 26px; }
  .footer-col h3 { font-size: 24px; }
  .breadcrumb ol { font-size: 16px; }
  .snapshot-gallery {
    grid-template-columns: 1fr;
  }

  .about-visual {
    min-height: auto;
  }

  .before-after {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

}

/* --- 1400px and up: cap grid density on very large screens ---------------- */
@media (min-width: 1400px) {
  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* --- Reference-composition components: responsive ---------------------------- */
@media (max-width: 1199px) {
  .home-hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .strength-box {
    padding: 44px 30px 40px;
  }

  .strength-item {
    padding: 26px 22px 28px;
  }

  .offer-tabs .tab-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .serve-grid li {
    flex-basis: calc((100% - 3 * 24px) / 4);
  }
}

@media (max-width: 991px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-form {
    max-width: 560px;
  }

  .who-visual {
    max-width: 520px;
    margin-inline: auto;
  }

  .strength-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .card-carousel-track > .svc-card,
  .card-carousel-track > .work-card,
  .card-carousel-track > .voice-card {
    flex-basis: calc((100% - 24px) / 2);
  }

  .why-carousel .slide-image {
    max-width: 480px;
  }

  .why-carousel .slide-carousel-controls {
    margin-top: 20px;
  }

  .help-tab-visual {
    order: 1;
    max-width: 560px;
  }

  .help-tab-content {
    order: 2;
  }

  .serve-grid li {
    flex-basis: calc((100% - 2 * 24px) / 3);
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-col-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .lead-form-grid {
    grid-template-columns: 1fr;
  }

  .strength-box {
    padding: 36px 16px;
    border-radius: 16px;
  }

  .strength-box h2 {
    margin-bottom: 28px;
  }

  .strength-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* Phones: icon beside the text keeps each card short. */
  .strength-item {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 20px 18px;
  }

  .strength-item::before {
    display: none;
  }

  .strength-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .strength-icon .icon {
    width: 24px;
    height: 24px;
  }

  .card-carousel.side-arrows {
    padding-inline: 0;
  }

  .carousel-arrow {
    top: auto;
    bottom: -8px;
    transform: none;
  }

  .carousel-arrow-prev {
    left: calc(50% - 40px);
  }

  .carousel-arrow-next {
    right: calc(50% - 40px);
  }

  .card-carousel-track > .svc-card,
  .card-carousel-track > .work-card,
  .card-carousel-track > .voice-card,
  .card-carousel-track > .review-tile {
    flex-basis: 88%;
  }

  .svc-track,
  .work-track {
    padding-bottom: 56px;
  }

  .certified-strip {
    justify-content: flex-start;
  }

  .platform-mark {
    font-size: 18px;
  }

  .city-mark {
    font-size: 20px;
  }

  .offer-box {
    padding: 30px 12px 12px;
  }

  .offer-tabs .tab-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .offer-tabs .tab-panels {
    padding: 20px 16px 24px;
  }

  .reviews-box {
    padding: 28px 16px 20px;
  }

  .serve-tabs {
    gap: 12px;
  }

  .serve-tab {
    padding: 8px 16px;
    font-size: 14px;
  }

  .serve-grid {
    gap: 12px;
  }

  .serve-grid li {
    flex-basis: calc((100% - 12px) / 2);
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .faq-toggle {
    right: 14px;
  }

  .faq-question {
    padding-right: 46px;
  }
}

/* --- Service / location templates: responsive ------------------------------- */
@media (max-width: 1199px) {
  .page-hero.has-form .container {
    grid-template-columns: 1fr 1fr;
  }

  .card-carousel-track > .num-card {
    flex-basis: calc((100% - 2 * 24px) / 3);
  }

  .industry-groups {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .page-hero.has-form .container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .page-hero.has-form .page-hero-content {
    margin-inline: 0;
  }

  .svc-intro-grid,
  .approach-panel {
    grid-template-columns: 1fr;
  }

  .svc-intro-visual {
    max-width: 560px;
  }

  .approach-section::before {
    display: none;
  }

  .approach-visual {
    max-width: 470px;
  }

  .card-carousel-track > .num-card {
    flex-basis: calc((100% - 24px) / 2);
  }

  .feature-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .card-carousel-track > .num-card {
    flex-basis: 82%;
  }

  .ttk-box {
    padding: 16px;
  }

  .ttk-panel {
    padding: 18px;
  }

  .approach-icons {
    gap: 8px;
  }

  .approach-icon {
    width: 54px;
    height: 54px;
  }

  .approach-panel {
    padding: 20px;
  }

  .feature-grid.grid-4,
  .industry-groups {
    grid-template-columns: 1fr;
  }
}

/* --- Inner pages: responsive --------------------------------------------- */
@media (max-width: 1199px) {
  .results-archive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .page-banner {
    min-height: 180px;
    padding-block: 40px;
  }

  .results-archive-grid {
    grid-template-columns: 1fr 1fr;
  }

  .results-archive-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .results-archive-toolbar .form-control {
    min-width: 0;
    width: 100%;
  }

  .result-showcase-head {
    flex-wrap: wrap;
  }

  .result-showcase-note {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 575px) {
  .results-archive-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky conversion bar: icon-only on phones (reference mobile bar). */
.sticky-conversion-item {
  min-width: 0;
}

@media (max-width: 575px) {
  .sticky-conversion-item span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .sticky-conversion-item .icon {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 575px) {
  .section-subtext,
  .page-intro-lead {
    font-size: 14px;
    line-height: 26px;
  }
}

@media (max-width: 767px) {
  /* Arrow carousels keep their arrows on phones; the dot row would collide. */
  .card-carousel.side-arrows .carousel-dots {
    display: none;
  }
}

/* --- Stepped type scale (reference-measured) ------------------------------ */
@media (max-width: 1199px) {
  h1 {
    font-size: 42px;
  }
}

@media (max-width: 992px) {
  .footer-links a {
    font-size: 15px;
    line-height: 25px;
  }
}

@media (max-width: 992px) {
  h1 {
    font-size: 38px;
  }
}

@media (max-width: 575px) {
  h1 {
    font-size: 28px;
  }

  .footer-links a {
    font-size: 14px;
    line-height: 26px;
  }
}

@media (max-width: 1199px) {
  .hub-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

@media (max-width: 991px) {
  .hub-layout {
    grid-template-columns: 1fr;
  }

  .hub-aside {
    position: static;
  }
}

@media (max-width: 575px) {
  .hub-main .filterable-grid {
    grid-template-columns: 1fr;
  }
}

/* Who We Are on phones/tablets: image first, badge centred beneath it
   (reference order). */
@media (max-width: 991px) {
  .who-visual {
    order: -1;
  }
}

@media (max-width: 767px) {
  .who-badge {
    position: static;
    width: max-content;
    margin: -20px auto 0;
  }
}

/* --- Reference-measured type steps (fresh live measurements) ------------- */
/* Nav: 15px with no leading padding from 1200 to 1400; 16px from 1401. */
@media (min-width: 992px) and (max-width: 1400px) {
  .nav-link {
    padding-left: 0;
    font-size: 15px;
  }
}

/* FAQ question: 18 -> 16 (<=991) -> 15 (<=480). */
@media (max-width: 991px) {
  .faq-question {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .faq-question {
    font-size: 15px;
  }
}

/* Reference stacks these two-column blocks below 1200px. */
@media (max-width: 1199px) {
  .who-grid,
  .why-carousel .slide {
    grid-template-columns: 1fr;
  }

  .why-carousel .slide-image {
    width: 100%;
    max-width: 408px;
    height: auto;
    aspect-ratio: 1;
  }

  /* Services We Offer tabs stay one scrolling row (reference). */
  .offer-tabs .tab-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .offer-tabs .tab-trigger {
    flex: 0 0 132px;
  }
}

/* Partner and Gujarat strips: single scrolling row on small screens. */
@media (max-width: 991px) {
  .platforms-strip,
  .gujarat-strip {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .platform-mark,
  .city-mark {
    flex-shrink: 0;
  }

  .platforms-section + .idea-cta-section {
    padding-top: 130px;
  }
}

@media (max-width: 767px) {
  /* Reference hero carries only the H1 and accent line on phones. */
  .home-hero-lead {
    display: none;
  }

  .certified-badge {
    font-size: 14px;
  }

  .site-footer {
    padding-block: 44px 60px;
  }
}

/* Stacked Who We Are keeps the visual at its column size (reference). */
@media (max-width: 1199px) {
  .who-visual {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }
}

@media (max-width: 767px) {
  /* Services We Offer: icon-only tab row on phones (reference). Labels
     remain for assistive technology. */
  .offer-tabs .tab-trigger {
    flex: 0 0 auto;
    padding: 10px 12px;
  }

  .offer-tabs .tab-trigger > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .offer-tabs .tab-trigger .icon {
    width: 28px;
    height: 28px;
  }


  .city-mark {
    font-size: 18px;
  }
}

/* Things to Know: side-by-side above 992px; at 992px and below the
   questions become a row of Q1..Qn pills above the answer (reference
   switch point). The full question text stays available to assistive
   technology. */
@media (max-width: 992px) {
  .ttk-box {
    grid-template-columns: 1fr;
  }

  .ttk-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-height: none;
    counter-reset: ttk;
  }

  .ttk-tab {
    counter-increment: ttk;
    flex: 1 1 0;
    justify-content: center;
    align-items: center;
    min-width: 44px;
    min-height: 48px;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: var(--fw-semibold);
  }

  .ttk-tab::before {
    content: "Q" counter(ttk);
  }

  .ttk-tab .icon {
    display: none;
  }

  .ttk-tab > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .approach-visual {
    height: auto;
  }
}

/* Approach on phones: 64px icon tiles wrapping to two rows and a portrait
   crop of the visual (reference). */
@media (max-width: 767px) {
  .approach-icons {
    flex-wrap: wrap;
    gap: 14px;
  }

  .approach-icon {
    width: 64px;
    height: 64px;
  }

  .approach-visual {
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
  }
}

/* --- Final polish: tablet/mobile density (reference-measured) ------------ */
@media (max-width: 1399px) {
  /* How We Can Help: the reference visual is square at these widths. */
  .help-tab-visual {
    aspect-ratio: 1;
    object-fit: cover;
  }
}

/* Partner strip scrolls as one row at every width (reference carousel). */
.platforms-strip {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.platform-mark {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  /* Certified badges: one scrolling row, like the reference logo strip. */
  .certified-strip {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .certified-badge {
    flex-shrink: 0;
  }

  /* Reviews: tighter box and card rhythm on tablets and phones. */
  .reviews-box {
    padding: 28px 20px 22px;
  }

  .review-tile {
    padding: 18px 18px 12px;
  }

  .review-tile p {
    font-size: 15px;
    line-height: 26px;
  }
}

@media (max-width: 767px) {
  /* Services We Offer panel on the mobile body scale. */
  .offer-tabs .tab-panel h3 {
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 28px;
  }

  .offer-tabs .tab-panel p {
    font-size: 14px;
    line-height: 26px;
  }

  .offer-tabs .tab-panel .btn {
    margin-top: 14px;
  }

  .offer-box {
    padding: 24px 12px 12px;
  }

  .offer-box .section-heading {
    margin-bottom: 20px;
  }
}

@media (max-width: 991px) {
  /* Reviewer name and role share one row (reference profile row). */
  .review-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    align-content: start;
    column-gap: 6px;
  }

  .review-tile-name,
  .review-tile-role {
    align-self: baseline;
  }

  .review-tile-role::before {
    content: "· ";
  }

  .review-tile p,
  .review-tile-foot {
    grid-column: 1 / -1;
  }
}

/* Reviews rhythm steps (reference): section padding 80 / 40 / 50 / 40 and
   the tab shrinking 283x74 -> 243x58 -> 208x44 -> 162x36. */
@media (max-width: 1199px) {
  .reviews-box-section {
    padding-block: 40px;
  }

  .reviews-tab {
    padding: 17px 20px;
  }
}

@media (max-width: 991px) {
  .reviews-box-section {
    padding-block: 50px 80px;
  }

  .reviews-tab {
    padding: 10px 15px;
  }
}

@media (max-width: 575px) {
  .reviews-box-section {
    padding-block: 40px;
  }

  .reviews-tab {
    padding: 8px 10px;
    font-size: 14px;
  }
}

/* --- Final polish pass (reference-measured) ------------------------------- */
/* How We Can Help: reference body copy is 16/32 above phone widths, with
   61px between the tab row and the panel. */
@media (min-width: 576px) {
  .help-tab-content p {
    line-height: 32px;
  }
}

.help-tab-panels {
  margin-top: 61px;
}

/* Why Us: reference keeps 100px below the carousel at every width. */
.why-section {
  padding-bottom: 100px;
}

@media (max-width: 1199px) {
  /* Why Us stacked: 500px square visual, 5px under the heading, 118px
     from image to copy (reference). */
  .why-section .section-heading {
    margin-bottom: 5px;
  }

  .why-carousel .slide {
    row-gap: 13px;
  }

  .why-carousel .slide-image {
    max-width: 500px;
  }
}

@media (max-width: 991px) {
  /* How We Can Help stacked: reference caps the visual at 500px. */
  .help-tab-visual {
    max-width: 500px;
  }
}

/* Things to Know in its compact Q-pill layout: lighter box padding. */
@media (max-width: 992px) {
  .ttk-box {
    padding: 24px;
    gap: 20px;
  }
}

@media (max-width: 575px) {
  /* Services We Offer: tighter panel rhythm (all copy kept). */
  .offer-box {
    padding-top: 16px;
  }

  .offer-tabs .tab-panels {
    padding: 14px 14px 16px;
  }

  .offer-tabs .tab-panel h3 {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  /* Certified: reference spacing between heading, copy and badges. */
  .certified-section .section-heading {
    margin-bottom: 20px;
  }

  .certified-strip {
    margin-top: 16px;
    padding: 8px 12px;
  }

}

/* Reviews: denser box and cards on narrow phones (reference at 375). */
@media (max-width: 480px) {
  .reviews-box {
    padding: 20px 14px 16px;
  }

  .reviews-box h2 {
    margin-bottom: 16px;
  }

  .review-tile {
    padding: 14px 14px 10px;
  }

  .review-tile-foot {
    padding-top: 10px;
  }
}

/* Why Us on small laptops / tablet landscape (992–1199px): keep the visual
   and the copy side by side instead of stacking, so the right half of the
   section is not left empty (14 October 2026). */
@media (min-width: 992px) and (max-width: 1199px) {
  .why-section .section-heading {
    margin-bottom: 32px;
  }

  .why-carousel .slide {
    grid-template-columns: minmax(0, 360px) 1fr;
    column-gap: 40px;
    align-items: center;
  }

  .why-carousel .slide-image {
    width: 100%;
    max-width: 360px;
    height: auto;
  }
}
