/**
 * responsive.css — Shared responsive UX (all pages). Desktop layout unchanged above breakpoints.
 * Principles: fluid type (clamp), 44px touch targets, 16px form text (no iOS zoom),
 * readable line-height, overflow control, safe-area for fixed UI.
 * Page layouts: assets/css/pages/<page>.responsive.css
 */

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

main {
    overflow-x: hidden;
}

main img,
main video,
main iframe {
    max-width: 100%;
    height: auto;
}

main .grid,
main .flex,
main .container {
    min-width: 0;
}

main section h2 {
    font-size: clamp(1.5rem, 4.5vw, 3rem);
    line-height: 1.2;
}

main section h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
}

main section h5 {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
}

.primary-btn,
.secondary-btn,
.white-btn,
.btn-banner,
.cta-btn,
.submit-btn,
.mobile-menu-btn,
.tab,
.faq-question,
.nav-item a,
.footer-cta-chip,
.footer-cta-btn,
.quote-trigger-btn,
.close-btn,
.fixe-btn__link {
    min-height: var(--touch-min, 44px);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .book-single_item.floating {
        animation: none !important;
    }
}

@media (pointer: coarse) {
    .nav-item a {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .faq-question {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 1520px) {
    .logo-area {
        width: 40%;
    }

    .desktop-header .contact-area {
        width: 100%;
    }

    .logo-area img {
        max-width: 70%;
    }
}

@media (max-width: 1260px) {
    .promo-books {
        position: relative;
        right: inherit;
        transform: translateY(0);
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 5rem;
    }

    .footer-links li,
    .footer-links h5,
    .footer-contact h5,
    .footer-contact {
        text-align: left;
    }
}

@media (max-width: 1024px) {
    .hero-content p {
        max-width: 100%;
    }

    .form-sidebar {
        width: 400px;
        right: -400px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .footer {
        margin-top: 5rem;
        padding-top: 9rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-about h4 {
        font-size: 2.25rem;
        margin: 1.5rem 0 1rem;
    }

    .footer-cta-banner {
        padding: 2.25rem 2rem;
    }

    .footer-cta-actions {
        flex-wrap: wrap;
    }

}

@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1,
    .h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        line-height: 1.15;
    }

    h2 {
        font-size: clamp(1.375rem, 5vw, 2rem) !important;
    }

    main p,
    main li,
    main .hero-content p,
    main .ebook-service_header p,
    main .promo-content p {
        font-size: max(1rem, 16px);
        line-height: 1.55;
    }

    main input,
    main select,
    main textarea,
    .form-sidebar input,
    .form-sidebar select,
    .form-sidebar textarea,
    .contact-form-card input,
    .contact-form-card select,
    .contact-form-card textarea,
    .hero-form input,
    .hero-form select,
    .hero-form textarea,
    .contact-box input,
    .contact-box select,
    .contact-box textarea {
        font-size: max(1rem, 16px);
        width: 100%;
        max-width: 100%;
    }

    main textarea,
    .form-sidebar textarea,
    .contact-form-card textarea,
    .hero-form textarea,
    .contact-box textarea {
        min-height: 6rem;
    }

    .footer-cta-chip-text strong {
        font-size: 0.95rem;
        word-break: break-word;
    }

    /* quote-trigger-btn mobile layout: footer.css */

    .form-sidebar {
        width: 100%;
        right: -100%;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    }

    .logo-area img {
        max-width: 55%;
    }

    .top-header {
        padding: 0.75rem 0;
    }

    .table-scroll table {
        min-width: 32rem;
        font-size: 0.875rem;
    }

    .table-scroll th,
    .table-scroll td {
        padding: 0.5rem 0.65rem;
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    h1,
    .h1 {
        font-size: 1.625rem;
    }

    .footer-cta-copy h2 {
        font-size: 1.35rem;
    }

    .footer-cta-copy p {
        font-size: 0.875rem;
    }

    .footer-about h4 {
        font-size: 1.5rem;
        margin: 1rem 0;
    }

    .footer-about p {
        font-size: 0.95rem;
    }

    .contact-box h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 479px) {
    h1,
    .h1 {
        font-size: 1.5rem;
    }

    main section h2 {
        font-size: 1.25rem !important;
    }

    .container {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .footer-cta-banner {
        padding: 1.5rem 1.125rem;
        border-radius: 1.125rem;
    }

    .footer-cta-chip {
        width: 100%;
    }

    .footer-cta-chip-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .footer-cta-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }

    .footer-cta {
        width: calc(100% - 1.25rem);
    }

    .logo-area img {
        max-width: 65%;
    }

    /* quote-trigger-btn: footer.css */

    .form-container h2 {
        font-size: 1.125rem;
    }

    .policies {
        flex-direction: column;
        gap: 0.35rem;
    }
}
