 html.breakpoint-debug::after {
    content: "base ≥0";
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 9999;
    font: 600 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #fff;
    background: #6b7280;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
@media (max-width: 575.98px) {
    .home-header {
        display: none !important;
    }
    html.breakpoint-debug::after {
        content: "xs ≤575";
        background: #2563eb;
    }
}
@media (min-width: 576px) and (max-width: 767.98px) {
    html.breakpoint-debug::after {
        content: "sm 576–767";
        background: #0ea5e9;
    }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
    html.breakpoint-debug::after {
        content: "md 768–1023";
        background: #10b981;
    }
}
@media (min-width: 1024px) and (max-width: 1439.98px) {
    html.breakpoint-debug::after {
        content: "lg 1024–1439";
        background: #f59e0b;
    }
}
@media (min-width: 1440px) {
    html.breakpoint-debug::after {
        content: "xl ≥1440";
        background: #ef4444;
    }
}
@media (max-width: 1024px) {
    .background-video {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        object-position: center center;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    @supports (height: 100dvh) {
        .background-video {
            height: 100dvh;
        }
    }
    .welcome-section, .hero-section {
        min-height: 100vh;
    }
    @supports (min-height: 100dvh) {
        .welcome-section, .hero-section {
            min-height: 100dvh;
        }
    }
    .hero-nav .nav {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .hero-nav .nav-link {
        font-size: 16px;
        margin: 0 6px;
    }
    .menu-toggle {
        position: static;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.9);
        color: #01398f;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(8px);
    }
    .menu-toggle i {
        font-size: 18px;
    }
    .hero-nav {
        position: fixed;
        inset: 0;
        display: none;
        z-index: 99999;
        background: rgba(255,255,255,0.95);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        padding: 88px 24px 24px;
        pointer-events: none;
    }
    .hero-nav .nav {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 14px;
    }
    .hero-nav .nav-link {
        font-size: 20px;
        color: #01398f;
    }
    html.nav-open .hero-nav {
        display: flex;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto;
    }
    html.nav-open body {
        overflow: hidden;
    }
    .hero-logo {
        align-items: flex-end;
    }
    .big-c img {
        width: 24vw;
        height: auto;
    }
    .word {
        gap: 0.8vw;
    }
    .word img.letter {
        height: auto;
        vertical-align: bottom;
    }
    .i-letter {
        position: relative;
        display: inline-block;
    }
    .i-letter .dot {
        width: 3.8vw;
        height: 3.8vw;
        left: 50%;
        bottom: calc(100% + 1vw);
        top: auto;
        transform: translate(-50%, -20px);
        will-change: transform;
    }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
    .background-video {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        object-position: center center;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    @supports (height: 100dvh) {
        .background-video {
            height: 100dvh;
        }
    }
    .welcome-section, .hero-section {
        min-height: 100vh;
    }
    @supports (min-height: 100dvh) {
        .welcome-section, .hero-section {
            min-height: 100dvh;
        }
    }
    .menu-toggle {
        position: static;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border-radius: 10px;
        border: 1px solid rgba(0,0,0,0.1);
        background: rgba(255,255,255,0.9);
        color: #01398f;
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
        backdrop-filter: blur(8px);
    }
    .menu-toggle i {
        font-size: 20px;
    }
    .hero-nav {
        position: fixed;
        inset: 0;
        display: none;
        z-index: 9999;
        background: rgba(255,255,255,0.95);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        padding: 96px 32px 32px;
        pointer-events: none;
    }
    .hero-nav .nav {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .hero-nav .nav-link {
        font-size: 22px;
        color: #01398f;
    }
    html.nav-open .hero-nav {
        display: flex;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto;
    }
    html.nav-open body {
        overflow: hidden;
    }
}
@media (min-width: 1025px) {
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 1024px) {
    .home-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 0px 16px;
        background: #fff;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        z-index: 1200;
        height: 10px;
    }
    .home-header .main-nav {
        display: none !important;
    }
    .hero-section > .menu-toggle {
        display: none !important;
    }
    .home-header .menu-toggle {
        position: static;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border-radius: 10px;
        border: 1px solid rgba(0,0,0,0.1);
        background: rgba(255,255,255,0.9);
        color: #01398f;
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
        backdrop-filter: blur(8px);
    }
    .home-header .menu-toggle i {
        font-size: 18px;
    }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
}
@media (min-width: 1024px) {
}

@media (max-width: 575.98px) {
    .about-section {
        min-height: auto;
        padding: 48px 16px 56px;
    }
    .about-container {
        max-width: 92%;
        margin: 0 auto;
    }
    .about-section .section-title {
        margin-bottom: 16px;
    }
    .about-text {
        font-size: 15.5px;
        line-height: 1.65;
        margin-bottom: 22px;
        color: #111;
    }
    .about-section .cta-btn {
        font-size: 15px;
        padding: 12px 22px;
        border-radius: 28px;
    }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
    .about-section {
        min-height: 80vh;
        padding: 56px 20px;
    }
    .about-container {
        max-width: 640px;
    }
    .about-text {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 28px;
    }
    .about-section .cta-btn {
        font-size: 15px;
        padding: 12px 26px;
    }
}
@media (max-width: 767.98px) {
    .products-slider {
        position: relative;
        margin-top: 12px;
    }
    .products-viewport {
        overflow: hidden;
        width: 100%;
        position: relative;
    }
    .products-slider .product-grid {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        transform: translateX(0);
        transition: transform 360ms ease;
    }
    .products-slider .product-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .prod-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1px solid rgba(0,0,0,0.15);
        background: rgba(255,255,255,0.85);
        color: #01398f;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }
    .prod-prev {
        left: 10px;
    }
    .prod-next {
        right: 10px;
    }
    .prod-arrow[aria-disabled="true"] {
        opacity: 0.4;
        pointer-events: none;
    }
    .prod-pagination {
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        display: flex;
        gap: 8px;
        justify-content: center;
        align-items: center;
        padding: 8px 0;
    }
    .prod-pagination button {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        border: none;
        background: #d1d5db;
        padding: 0;
    }
    .prod-pagination button.is-active {
        background: #1B76FF;
        width: 16px;
    }
}
@media (max-width: 767.98px) {
    .ranking-desktop {
        display: none;
    }
    .ranking-slider {
        position: relative;
        margin-top: 10px;
    }
    .ranking-viewport {
        overflow: hidden;
        width: 100%;
        position: relative;
    }
    .ranking-track {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0;
        transform: translateX(0);
        transition: transform 360ms ease;
    }
    .ranking-slide {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 8px 6px 16px;
    }
    .ranking-slide img {
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(2,6,23,0.12);
    }
    .ranking-slide p {
        margin: 8px 8px 0;
        font: 600 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        color: #0f172a;
    }
    .ranking-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1px solid rgba(0,0,0,0.15);
        background: rgba(255,255,255,0.9);
        color: #01398f;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }
    .ranking-prev {
        left: 10px;
    }
    .ranking-next {
        right: 10px;
    }
    .ranking-arrow[aria-disabled="true"] {
        opacity: .4;
        pointer-events: none;
    }
    .ranking-pagination {
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        display: flex;
        gap: 8px;
        justify-content: center;
        padding: 8px 0;
    }
    .ranking-pagination button {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        border: none;
        background: #d1d5db;
    }
    .ranking-pagination button.is-active {
        background: #1B76FF;
        width: 16px;
    }
}
@media (min-width: 768px) {
    .ranking-slider, .ranking-arrow, .ranking-pagination {
        display: none !important;
    }
}
@media (min-width: 768px) {
    .prod-arrow, .prod-pagination {
        display: none !important;
    }
    .products-viewport {
        overflow: visible;
    }
    .products-slider .product-grid {
        transform: none !important;
        gap: 30px;
    }
}
@media (max-width: 767.98px) {
    .case-studies-section {
        padding: 72px 16px 56px;
    }
    .case-container {
        max-width: 100%;
    }
    .case-heading {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    .case-subtext {
        font-size: 15px;
        line-height: 1.6;
        color: #374151;
    }
    .case-content {
        display: block;
        margin-top: 20px;
    }
    .case-list {
        width: auto;
        max-height: none;
        overflow: visible;
        border: 0;
        margin-bottom: 14px;
        position: relative;
        padding: 0 4px;
    }
    #caseList {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 6px 2px 10px;
        margin: 0;
        list-style: none;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    #caseList::-webkit-scrollbar {
        display: none;
    }
    #caseList li {
        flex: 0 0 auto;
        padding: 10px 14px;
        border-radius: 9999px;
        border: 1px solid #cbd5e1;
        background: #ffffffcc;
        color: #0f172a;
        font: 600 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        white-space: nowrap;
        cursor: pointer;
        transition: background .2s ease, color .2s ease, border-color .2s ease;
    }
    #caseList li.active {
        background: #1B76FF;
        color: #fff;
        border-color: #1B76FF;
    }
    .case-list::before, .case-list::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 16px;
        pointer-events: none;
    }
    .case-list::before {
        left: 0;
        background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 100%);
    }
    .case-list::after {
        right: 0;
        background: linear-gradient(270deg, #fff 0%, rgba(255,255,255,0) 100%);
    }
    .case-display {
        margin-top: 8px;
        background: transparent;
        padding: 0;
        max-width: none;
    }
    .case-card {
        display: none;
        background: #fff;
        color: #0f172a;
        border-radius: 16px;
        padding: 18px;
        box-shadow: 0 8px 28px rgba(2, 6, 23, 0.12);
    }
    .case-card.active {
        display: block;
    }
    .case-card .case-inner {
        display: block;
    }
    .case-card .case-text {
        margin-bottom: 12px;
        padding: 0;
    }
    .case-card h3 {
        font-size: 20px;
        margin: 0 0 8px;
        color: #0b2e6f;
    }
    .case-card p {
        font-size: 15px;
        line-height: 1.6;
        color: #374151;
    }
    .case-card .case-image {
        max-width: 100%;
    }
    .case-card .case-image img {
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(2,6,23,0.12);
    }
    .case-btn-wrap {
        display: flex;
        justify-content: center;
        margin-top: 14px;
    }
    .case-btn {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 9999px;
        background: #1B76FF;
    }
}
@media (min-width: 1024px) {
}
@media (max-width: 767.98px) {
    .footer-section {
        padding-top: 36px;
    }
    .footer-container {
        max-width: 100%;
        padding: 0 16px;
        text-align: center;
    }
    .footer-section .newsletter:first-of-type {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 0 20px;
        justify-items: center;
    }
    .footer-section .newsletter-text {
        text-align: center;
        width: 100% !important;
    }
    .footer-section .newsletter-text h4 {
        font-size: 20px;
    }
    .footer-section .newsletter-text p {
        font-size: 14px;
        line-height: 150%;
    }
    .footer-section .newsletter-form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
        background: transparent !important;
        border-radius: 0 !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        overflow: visible !important;
        justify-items: center;
    }
    .footer-section .newsletter-form input {
        width: 100% !important;
        max-width: 520px !important;
        height: 48px !important;
        background: #fff !important;
        border-radius: 9999px !important;
        padding: 12px 16px !important;
    }
    .footer-section .newsletter-form button {
        width: 100% !important;
        max-width: 520px !important;
        height: 48px !important;
        margin: 0 !important;
        border-radius: 9999px !important;
    }
    .footer-section .newsletter:last-of-type {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        align-items: start;
        text-align: center;
        justify-items: center;
    }
    .footer-section .newsletter:last-of-type .footer-links:first-of-type,
    .footer-section .newsletter:last-of-type .footer-links:last-of-type {
        text-align: left;
        align-items: flex-start;
    }
    .footer-section .newsletter:last-of-type .footer-about {
        grid-column: 1 / -1;
    }
    .footer-about {
        text-align: center;
    }
    .footer-about .logo-placeholder img.site-logo {
        width: 120px;
        height: auto;
    }
    .footer-about p {
        font-size: 15px !important;
        width: auto !important;
        margin: 0 auto;
        line-height: 1.6;
    }
    .footer-social {
        display: flex;
        justify-content: center;
    }
    .footer-links {
        text-align: center;
    }
    .footer-links ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .footer-links ul li {
        margin: 6px 0;
    }
    .footer-bottom {
        text-align: center;
        padding: 14px 12px;
    }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
    .footer-container {
        max-width: 100%;
        padding: 0 24px;
    }
    .footer-section .newsletter:first-of-type {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
        gap: 16px 20px;
    }
    .footer-section .newsletter-form {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }
    .footer-section .newsletter-form input {
        width: 100%;
    }
    .footer-section .newsletter:last-of-type {
        display: grid;
        grid-template-columns: 1.2fr 1fr 1fr;
        gap: 24px;
        align-items: start;
    }
}
@media (min-width: 1024px) {
    .footer-container {
        max-width: 1160px;
        margin: 0 auto;
        padding: 0 24px;
    }
}
@media (max-width: 768px) {
    .home-container {
        padding: 90px 16px;
    }
    .products-section {
        padding: 120px 16px;
    }
    .services-section {
        padding-top: 100px;
    }
    .about-section {
        padding: 48px 16px;
    }
    .hero-section {
        padding: 64px 18px;
    }
    .hero-nav {
        margin-top: 10px;
        margin-left: 0;
    }
    .hero-nav .nav-link {
        font-size: 16px;
    }
    .tagline-container {
        left: 0;
        bottom: 0;
        margin-top: 18px;
        max-width: 100%;
    }
    .hero-text {
        font-size: 21px;
        line-height: 150%;
    }
    .services-list p {
        font-size: 28px;
        line-height: 120%;
    }
    .section-title {
        font-size: 32px;
    }
    .product-card {
        width: 100%;
    }
    .newsletter {
        gap: 14px;
    }
    .newsletter-text {
        width: 100%;
    }
    .newsletter-text h4 {
        font-size: 20px;
    }
    .newsletter-text p {
        font-size: 14px;
        line-height: 150%;
    }
    .newsletter-form {
        width: 100%;
        height: 60px;
    }
    .newsletter-form button {
        height: 46px;
        width: 132px;
        margin: 7px 8px 7px 0;
    }
    .about-box {
        padding: 12px;
    }
    .footer-contact {
        display: inline-block;
    }
    .footer-section::after {
        display: none;
    }
}
@media (max-width: 576px) {
    .home-heading {
        font-size: 32px;
    }
    .home-subtext {
        font-size: 16px;
    }
    .testimonial-user img {
        width: 46px;
        height: 46px;
    }
    .ranking-row {
        gap: 16px;
  }
}

/* iPad Pro (portrait/landscape up to 1366px) */
@media (min-width: 1024px) and (max-width: 1900px) {
  html, body { overflow-x: hidden; }
  .home-section,
  .services-section,
  .products-section,
  .case-studies-section,
  .ranking-section,
  .testimonial-section,
  .faq-section {
    padding-left: 28px;
    padding-right: 28px;
  }
  .hero-section { padding: 48px 24px; }
  .hero-container,
  .hero-content { width: 100%; max-width: none; margin: 0 auto; }
  .home-heading { font-size: 36px; line-height: 1.2; }
  .home-subtext { max-width: 620px; margin: 0 auto 20px; font-size: 17px; line-height: 1.45; }
  .home-section { min-height: auto; padding: 32px 24px 36px; }
  .home-section .cta-btn { margin-top: 16px; }
  .services-section { padding-top: 44px; padding-bottom: 44px; }
  .services-list p { font-size: 30px; line-height: 1.1; margin: 4px 0; }

  .services-tiles,
  .products-slider .product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px !important;
    justify-items: center;
    transform: none !important;
  }
  .product-card { width: 100%; max-width: 360px; }
  .prod-arrow, .prod-pagination { display: none !important; }

  /* Ranking: use desktop grid on Pro */
  .ranking-desktop { display: block !important; }
  .ranking-slider, .ranking-arrow, .ranking-pagination { display: none !important; }

  /* FAQ: keep content constrained */
  .faq-section { padding-top: 70px; padding-bottom: 70px; }
  .faq-container,
  .faq-list { max-width: 1100px; margin: 0 auto; }

  /* Footer */
  .footer-section { padding: 42px 20px 28px; }
  .footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; text-align: center; }
  .footer-section .newsletter:first-of-type {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: center;
    justify-items: center;
    text-align: center;
    margin-bottom: 24px;
  }
  .footer-section .newsletter-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px;
    width: 100%;
    justify-items: center;
    margin: 0 auto 10px;
  }
  .footer-section .newsletter-form input,
  .footer-section .newsletter-form button {
    width: 100% !important;
    max-width: 520px !important;
    height: 54px !important;
    border-radius: 28px !important;
  }
  .footer-section .newsletter:last-of-type {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 18px;
    align-items: start;
    text-align: left;
    justify-items: start;
    margin: 0 auto;
  }
  .footer-about {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    grid-column: 1 / -1;
  }
  .footer-links {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links ul li { margin: 4px 0; }

  /* Keep hamburger to avoid nav crowding */

  .home-header .menu-toggle,
  .hero-section .menu-toggle { 
	  	position: static;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border-radius: 10px;
        border: 1px solid rgba(0,0,0,0.1);
        background: rgba(255,255,255,0.9);
        color: #01398f;
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
        backdrop-filter: blur(8px);  
	}
}
/* iPad portrait tuning */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .hero-section {
        padding: 72px 28px;
        align-items: center;
    }
    .home-heading {
        font-size: 40px;
        line-height: 1.2;
    }
    .home-subtext {
        max-width: 640px;
        margin: 0 auto;
        font-size: 18px;
        line-height: 1.45;
    }
    .hero-content {
        align-items: center;
        text-align: center;
    }
    .hero-nav {
        margin-left: 0;
        justify-content: center;
        gap: 10px;
    }
    .tagline-container {
        max-width: 90%;
        left: 0;
        bottom: 0;
        margin-top: 16px;
    }
    .home-section, .services-section, .products-section, .case-studies-section, .ranking-section, .testimonial-section, .faq-section {
        padding-left: 24px;
        padding-right: 24px;
    }
    .services-section {
        padding-top: 80px;
        padding-bottom: 70px;
    }
    .services-list p {
        font-size: 32px;
        line-height: 1.15;
        margin: 8px 0;
    }
    .services-tiles {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .products-slider {
        padding: 0 32px;
    }
    .product-grid {
        gap: 18px;
    }
    .testimonial-slider {
        max-width: 92vw;
        padding: 0 40px;
    }
    .testimonial-title {
        font-size: 30px;
    }
    .testimonial-subtext {
        max-width: 700px;
        font-size: 18px;
    }
    .next-footer-section {
        min-height: 120vh;
        padding: 90px 24px 80px;
    }
    .next-footer-pill {
        font-size: 6.5vw;
        width: 80%;
        left: 50%;
    }
}

/* Additional iPad portrait fixes to prevent overflow and restore layout */
@media (min-width: 768px) and (max-width: 1023.98px) {
    html, body {
        overflow-x: hidden;
    }
    .hero-section {
        padding: 66px 22px;
    }
    .hero-logo img {
        max-width: 90%;
        height: auto;
    }
    .home-header {
        padding: 0 20px;
    }
    .services-section, .products-section, .case-studies-section, .ranking-section, .testimonial-section, .faq-section {
        padding-left: 22px;
        padding-right: 22px;
    }
    .services-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .products-slider .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px !important;
        transform: none !important;
    }
    .product-card {
        max-width: 100%;
    }
    /* Switch ranking to slider on tablet to avoid cramped desktop grid */
    .ranking-desktop {
        display: none;
    }
    .ranking-slider,
    .ranking-arrow,
    .ranking-pagination {
        display: block !important;
    }
    .ranking-track {
        display: flex;
        gap: 0;
    }
    .ranking-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .testimonial-slider {
        max-width: 92vw;
        padding: 0 32px;
    }
    .google-tick-section {
        padding: 60px 22px;
    }
    .next-footer-section {
        min-height: 115vh;
        padding: 84px 22px 78px;
    }
    .next-footer-pill {
        width: 82%;
        font-size: 6.6vw;
    }
}
@media (max-width: 992px) {
    .hero-nav {
        margin-left: 0;
        justify-content: center;
    }
    .hero-nav .nav {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
}
@media (max-width: 768px) {
    .services-section, .products-section, .ranking-section, .testimonial-section, .footer-section {
        overflow-x: hidden;
    }
    .hero-section {
        padding: 56px 16px;
    }
    .hero-nav {
        margin-top: 8px;
    }
    .hero-nav .nav-link {
        font-size: 15px;
    }
    .tagline-container {
        left: 0;
        bottom: 0;
        max-width: 100%;
    }
    .floating-box {
        display: none !important;
    }
    .product-grid {
        gap: 18px;
    }
    .product-card {
        width: 100%;
        max-width: 100%;
    }
    .newsletter {
        gap: 12px;
    }
    .newsletter-text {
        width: 100%;
    }
    .newsletter-form {
        width: 100%;
        height: 58px;
    }
    .newsletter-form button {
        height: 44px;
        width: 124px;
        margin: 7px 8px 7px 0;
    }
    .footer-content {
        gap: 22px;
    }
    .footer-about, .footer-links {
        flex: 1 1 100%;
    }
    .footer-links {
        text-align: left;
    }
}
@media (max-width: 576px) {
    .section-title {
        font-size: 28px;
    }
    .services-list p {
        font-size: 24px;
    }
    .home-heading {
        font-size: 28px;
    }
    .home-subtext {
        font-size: 15px;
    }
    .next-footer-section {
        min-height: 100vh;
        padding: 72px 16px;
    }
    .footer-links h5 {
        font-size: 15px;
    }
    .footer-links ul li a {
        font-size: 14px;
    }
}

/* Final iPad portrait overrides for tighter layout */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .hero-section {
        padding: 56px 20px;
    }
    .home-heading {
        font-size: 34px;
        line-height: 1.25;
    }
    .home-subtext {
        max-width: 580px;
        font-size: 16.5px;
        line-height: 1.4;
        margin: 0 auto;
    }
    .section-title {
        font-size: 28px;
    }
    .home-section {
        min-height: auto;
        padding: 40px 20px 40px;
    }
    .services-section {
        padding-top: 48px;
        padding-bottom: 52px;
    }
    .services-list p {
        font-size: 30px;
        line-height: 1.1;
        margin: 6px 0;
    }
    .services-tiles,
    .products-slider .product-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px !important;
        justify-items: center;
        transform: none !important;
    }
    .product-card {
        width: 100%;
        max-width: 360px;
    }
    .home-section, .services-section, .products-section, .case-studies-section, .ranking-section, .testimonial-section, .faq-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .testimonial-title {
        font-size: 28px;
    }
    .testimonial-subtext {
        max-width: 620px;
        font-size: 17px;
    }
    .next-footer-section {
        min-height: 100vh;
        padding: 72px 20px;
    }
    .next-footer-pill {
        font-size: 6vw;
        width: 85%;
    }
    .floating-box {
        display: none !important;
    }
    /* Footer fixes */
    .footer-section {
        padding: 42px 16px 24px;
    }
    .footer-container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 16px;
        text-align: center;
    }
    .footer-section .newsletter:first-of-type {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: center;
        justify-items: center;
        text-align: center;
        margin-bottom: 24px;
    }
    .footer-section .newsletter-text {
        text-align: center;
        width: 100% !important;
    }
    .footer-section .newsletter-form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px;
        width: 100%;
        justify-items: center;
        margin: 0 auto 10px;
    }
    .footer-section .newsletter-form input,
    .footer-section .newsletter-form button {
        width: 100% !important;
        max-width: 520px !important;
        height: 54px !important;
        border-radius: 28px !important;
    }
    .footer-section .newsletter-form input {
        background: #fff !important;
        color: #0f172a !important;
        border: 1px solid rgba(0,0,0,0.06) !important;
        padding: 0 16px !important;
    }
    .footer-section .newsletter-form input::placeholder {
        color: #4b5563;
    }
    .footer-section .newsletter-form button {
        background: #0f3c9b !important;
        color: #fff !important;
        border: none !important;
        font-weight: 600;
    }
    .footer-section .newsletter:last-of-type {
        display: grid;
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        gap: 16px;
        align-items: start;
        text-align: left;
        justify-items: start;
        margin: 0 auto;
    }
    .footer-about {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        grid-column: 1 / -1;
    }
    .footer-about p {
        width: 100% !important;
    }
    .footer-links {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-links ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .footer-links ul li {
        margin: 4px 0;
    }
    .footer-bottom {
        text-align: center;
        padding: 12px 8px;
    }
    /* Tighter vertical rhythm */
    .footer-content {
        display: grid;
        gap: 18px;
    }
    /* Navigation: use hamburger like mobile */
    .home-header .main-nav
	{
        display: none !important;
    }
    .home-header {
        padding: 0 18px;
    }
    
    /* Products: use simple grid on tablet (no slider) */
    .products-slider .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
        transform: none !important;
    }
    .products-slider .product-card {
        flex: 0 0 auto !important;
        max-width: 100% !important;
    }
    .prod-arrow,
    .prod-pagination {
        display: none !important;
    }
    /* Ranking: use desktop grid on tablet (hide slider) */
    .ranking-desktop {
        display: block !important;
    }
    .ranking-slider,
    .ranking-arrow,
    .ranking-pagination {
        display: none !important;
    }
}

/* iPad Pro / small desktop trim */
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .home-section,
  .services-section,
  .products-section,
  .case-studies-section,
  .ranking-section,
  .testimonial-section,
  .faq-section {
    padding-left: 28px;
    padding-right: 28px;
  }

  .faq-section { padding-top: 70px; padding-bottom: 70px; }
  .faq-container,
  .faq-list { max-width: 1050px; margin: 0 auto; }
}

