/* Shared responsive helpers for site-wide fixes */
:root {
    --site-max: 1200px
}

html,
body {
    overflow-x: hidden;
}

/* Ensure media scale correctly */
img,
picture,
video,
iframe {
    max-width: 100%;
    width: 100%;
    border: 0;
}

img,
picture,
video {
    height: auto;
    display: block;
}

/* Fluid containers with sensible max width */
.container {
    width: 100%;
    max-width: var(--site-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

/* Make forms and buttons adapt */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
button {
    max-width: 100%;
    box-sizing: border-box;
}

/* Simple responsive utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem
}

.col {
    flex: 1 1 0;
    min-width: 0
}

.col-1 {
    flex: 0 0 100%
}

/* Navigation helper — collapse long navs on small screens */
.nav-collapse {
    display: flex;
    gap: 0.5rem;
    align-items: center
}

@media (max-width:768px) {
    .nav-collapse {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Mobile marquee override: 75% slower */
@media (max-width: 768px) {
    .marquee-track {
        /* 20% slower than previous mobile duration */
        animation-duration: 76.8s !important;
    }
}

/* Reduce large text on very small devices */
@media (max-width:380px) {
    h1 {
        font-size: 1.2rem
    }

    h2 {
        font-size: 1rem
    }
}

/* Floating buttons + toasts on narrow screens */
@media (max-width: 768px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .max-w-7xl.mx-auto,
    .max-w-6xl.mx-auto {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .row {
        gap: 0.75rem;
    }

    .grid {
        min-width: 0;
    }

    h1 {
        line-height: 1.05;
    }

    h2 {
        line-height: 1.1;
    }

    .wa-btn {
        width: 3rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .wa-btn span {
        display: none !important;
    }

    .toast-item {
        min-width: 0 !important;
        max-width: calc(100vw - 2rem) !important;
    }

    .toast-item .text-sm {
        font-size: 0.95rem;
    }

    .fixed.top-4.left-1\/2,
    .fixed.bottom-4.right-4,
    .fixed.bottom-0.left-0.right-0 {
        left: 0.5rem !important;
        right: 0.5rem !important;
        width: auto !important;
    }

    .fixed.bottom-4.right-4 {
        align-items: stretch !important;
    }

    .fixed.top-4.left-1\/2 {
        transform: translateX(-50%) scale(0.98);
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }

    .nav-collapse {
        gap: 0.375rem;
    }

    .row {
        gap: 0.625rem;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .toast-item {
        max-width: calc(100vw - 0.75rem) !important;
    }
}