/*
 * responsive.css — Global Breakpoints
 * Digital Apache v3
 *
 * PURPOSE: All responsive overrides.
 * Desktop-first (max-width) strategy.
 *
 * LOAD ORDER: Always last.
 */

/* ============================================
   TABLET — 1024px and below
   Navigation collapse
============================================ */

@media (max-width: 1024px) {

    .open-nav {
        display: block;
    }

    .nav-main__list {
        display: none;
    }

    .nav-main__list.is-active {
        position: fixed;
        top: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
        width: min(100%, 320px);
        height: 100vh;
        padding: var(--space-12) var(--space-6) var(--space-8);
        background-color: var(--color-white);
        box-shadow: var(--shadow-lg);
        z-index: var(--z-modal);
        overflow-y: auto;
    }

    .nav-main__item {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

    .nav-main__link {
        flex: 1 1 auto;
        width: auto;
        justify-content: flex-start;
    }

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

    .nav-main__submenu {
        position: static;
        width: 100%;
        margin-top: var(--space-2);
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .nav-main__submenu.is-active {
        display: block;
    }

    /* Hide top bar center and right
       on tablet and mobile */
    .top-bar__center {
        display: none;
    }

    .top-bar__right {
        display: none;
    }

    .home-modal {
        padding: var(--space-5) var(--space-4);
    }

    .home-modal__dialog {
        max-height: calc(100vh - var(--space-10));
        padding: var(--space-7) var(--space-6);
    }

    .home-modal__title,
    .home-modal__subtitle {
        padding-right: var(--space-12);
    }

}

/* ============================================
   MOBILE — 768px and below
   Layout collapse
============================================ */

@media (max-width: 768px) {

    /* Grid collapse */
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    /* Section padding reduction */
    .section {
        padding-top: var(--section-padding-y-mobile);
        padding-bottom: var(--section-padding-y-mobile);
    }

    /* Container padding adjustment */
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    /* Hide top bar */
    .top-bar {
        display: none;
    }

    /* Floating contact reposition */
    .floating-contact {
        bottom: var(--space-4);
        right: var(--space-4);
    }

    /* Heading scaling */
    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    .home-modal {
        padding: var(--space-4) var(--space-3);
    }

    .home-modal__dialog {
        max-height: calc(100vh - var(--space-8));
        padding: var(--space-6) var(--space-4);
    }

    .home-modal__title {
        padding-right: var(--space-10);
    }

    .home-modal__subtitle {
        padding-right: var(--space-10);
        font-size: var(--text-2xl);
    }

}

/* ============================================
   SMALL DEVICES — 480px and below
   Compact scaling
============================================ */

@media (max-width: 480px) {

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    .btn {
        width: 100%;
    }

    .home-modal {
        padding: var(--space-3) var(--space-2);
    }

    .home-modal__dialog {
        max-height: calc(100vh - var(--space-6));
        padding: var(--space-5) var(--space-3);
    }

    .home-modal__close {
        top: var(--space-3);
        right: var(--space-3);
    }

    .home-modal__title,
    .home-modal__subtitle {
        padding-right: var(--space-10);
    }

}

/* End of responsive.css */
