/* ==========================================================================
   Responsive refinements for phones and tablets.
   Loaded after style.css so it can adjust fixed sizes from the main stylesheet.
   ========================================================================== */

/* Media never overflows its column (inline sizes still take priority). */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ---- Hero slider and banners: let content set the height on small screens ---- */
@media (max-width: 767.98px) {
    .carousel-item,
    .hero-content {
        height: auto;
        min-height: 460px;
        padding-top: 3.5rem;
        padding-bottom: 4rem;
    }

    .hero-text h1 {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
        line-height: 1.2;
    }

    .hero-buttons .btn {
        display: inline-block;
        margin-bottom: 0.5rem;
    }

    .banner-slide,
    .gradient-slide {
        height: auto;
        min-height: 320px;
    }
}

@media (max-width: 575.98px) {
    .carousel-item,
    .hero-content {
        min-height: 420px;
    }

    .hero-text .lead {
        font-size: 0.95rem;
    }

    /* Less vertical padding between sections on small screens */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Stop iOS from zooming in when a form field is focused */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .card-body {
        padding: 1rem;
    }
}

/* ---- Navigation: the collapsed menu scrolls if it is taller than the screen ---- */
@media (max-width: 991.98px) {
    .navbar {
        padding: 10px 0;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        height: 38px !important;
    }

    .navbar-collapse {
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.75rem;
    }

    .navbar .nav-link,
    .navbar .dropdown-item {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }
}

/* ---- Emergency bar: items wrap onto separate lines rather than running off-screen ---- */
@media (max-width: 575.98px) {
    .emergency-bar {
        font-size: 0.85rem;
    }
}

/* ---- Footer: comfortable spacing when columns stack ---- */
@media (max-width: 767.98px) {
    .footer {
        margin-top: 30px;
        padding-top: 2rem;
        padding-bottom: 1rem;
    }
}

/* ---- Floating WhatsApp button: smaller on phones so it covers less content ---- */
@media (max-width: 575.98px) {
    .whatsapp-float {
        bottom: 84px;
        right: 14px;
        padding: 10px 12px;
        margin: 0;
    }
}
