/* ============================================================
   EPRIX SERVICES — RESPONSIVE OVERRIDES
 
============================================================ */


/* ============================================================
   TABLET
============================================================ */

@media screen and (max-width: 991px) {

    #menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #nav-menu {
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        width: auto;

        display: none;
        padding: 20px;

        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    }

    #nav-menu.active {
        display: block;
    }

    #nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    #nav-menu a {
        color: var(--dark) !important;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clients-grid,
    .contact-grid,
    .contact-info-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   MOBILE — USES hero-mobile.webp
============================================================ */

@media screen and (max-width: 768px) {

    /* Fixed transparent header remains unchanged */
    #header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;

        background: transparent !important;
        box-shadow: none !important;
        z-index: 1000;
    }

    #header.scrolled {
        background: rgba(7, 45, 105, 0.96) !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18) !important;

        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .header-container {
        width: 100%;
        padding: 12px 16px;
        gap: 9px;
    }

    .logo-area img {
        width: auto;
        height: 66px;
    }

    .header-buttons {
        margin-left: auto;
        gap: 8px;
    }

    .call-btn {
        width: 48px;
        height: 48px;
        padding: 0;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        border: 2px solid #ffffff;
        border-radius: 50%;
        font-size: 0;
    }

    .call-btn i {
        font-size: 18px;
    }

    .quote-btn {
        padding: 13px 16px;
        font-size: 13px;
        line-height: 1;
        white-space: nowrap;
    }

    #menu-btn {
        width: 45px;
        height: 45px;

        margin-left: 2px;

        color: #ffffff;
        font-size: 28px;
    }


    /* -----------------------------------------
       MOBILE HERO IMAGE
    ----------------------------------------- */

    body #hero {
        position: relative;

        width: 100%;
        min-height: 100vh !important;
        min-height: 100svh !important;

        background-color: #072d69 !important;
        background-image: url("../images/hero-mobile.webp") !important;
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;

        display: flex !important;
        align-items: stretch !important;
        overflow: hidden;
    }

    body #hero .hero-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;

        background: linear-gradient(
            180deg,
            rgba(4, 31, 72, 0.06) 0%,
            rgba(4, 31, 72, 0.12) 40%,
            rgba(4, 31, 72, 0.66) 72%,
            rgba(4, 31, 72, 0.95) 100%
        ) !important;
    }

    body #hero .hero-content {
        position: relative;
        z-index: 2;

        width: 100% !important;
        max-width: none !important;
        min-height: 100vh !important;
        min-height: 100svh !important;

        margin: 0 !important;
        padding:
            115px
            22px
            calc(38px + env(safe-area-inset-bottom))
            22px !important;

        display: flex !important;
        align-items: flex-end !important;

        text-align: left !important;
    }

    body #hero .hero-left {
        width: 100% !important;
        max-width: 560px !important;
        margin: 0 !important;
    }

    body #hero .hero-left h1 {
        margin: 0 0 18px !important;

        font-size: clamp(40px, 11vw, 56px) !important;
        line-height: 1.04 !important;
        letter-spacing: -1.3px !important;

        color: #ffffff !important;
    }

    body #hero .hero-left p {
        max-width: 520px !important;
        margin: 0 0 20px !important;

        font-size: 15px !important;
        line-height: 1.55 !important;

        color: #ffffff !important;
    }

    body #hero .hero-cta {
        margin-top: 0 !important;
        padding: 13px 22px !important;
        font-size: 14px !important;
    }

    /* Hides the previous inline desktop image if still present */
    body #hero .hero-right {
        display: none !important;
    }


    /* -----------------------------------------
       GENERAL MOBILE LAYOUT
    ----------------------------------------- */

    .services-grid,
    .advantages-grid,
    .stats-grid,
    .clients-grid,
    .contact-grid,
    .contact-info-grid,
    .footer-grid,
    .values-grid,
    .process-grid {
        grid-template-columns: 1fr !important;
    }

    .about-features,
    .form-row {
        grid-template-columns: 1fr;
    }

    .devis-wrapper,
    .contact-form-wrapper {
        padding: 30px;
    }

    .testimonial-card {
        flex: 0 0 100%;
    }

    .reviews-container {
        padding: 0 40px;
    }

    .emergency-content {
        flex-direction: column;
        text-align: center;
    }

    .emergency-contact {
        width: 100%;
    }

    .emergency-phone {
        flex-direction: column;
    }

    .footer-grid {
        gap: 20px;
        text-align: center;
    }

    .footer-col {
        text-align: center;
    }

    .footer-certifs {
        align-items: center;
        justify-content: center;
    }

    .footer-contact p,
    .social-links {
        justify-content: center;
    }

    .footer-legal {
        align-items: center;
        gap: 8px;
    }
}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media screen and (max-width: 480px) {

    .header-container {
        padding: 10px 12px;
        gap: 6px;
    }

    .logo-area img {
        height: 58px;
    }

    .call-btn {
        width: 43px;
        height: 43px;
    }

    .call-btn i {
        font-size: 16px;
    }

    .quote-btn {
        padding: 11px 12px;
        font-size: 12px;
    }

    #menu-btn {
        width: 41px;
        height: 41px;
        font-size: 25px;
    }

    body #hero {
        background-position: 54% top !important;
    }

    body #hero .hero-content {
        padding:
            102px
            18px
            calc(32px + env(safe-area-inset-bottom))
            18px !important;
    }

    body #hero .hero-left h1 {
        font-size: clamp(36px, 11.5vw, 47px) !important;
        line-height: 1.04 !important;
    }

    body #hero .hero-left p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .section-title h2,
    .about-content h2 {
        font-size: 28px;
    }

    .whatsapp-btn {
        right: 18px;
        bottom: 18px;
        width: 55px;
        height: 55px;
        font-size: 27px;
    }
}

/* ===== HEADER MOBILE FINAL ===== */

@media (max-width: 768px) {
    #header .header-container {
        width: 94%;
        min-height: 76px;
        padding: 8px 0;
        gap: 8px;
    }

    #header .logo-area {
        flex: 0 0 auto;
    }

    #header .logo-area img {
        width: 54px;
        height: 54px;
        object-fit: contain;
    }

    #header .header-buttons {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }

    #header .call-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    #header .call-btn span {
        display: none;
    }

    #header .call-btn i {
        margin: 0;
        font-size: 16px;
    }

    #header .quote-btn {
        min-height: 42px;
        padding: 0 14px;
        border-radius: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        font-size: 13px;
        line-height: 1;
        flex-shrink: 0;
    }

    #header #menu-btn {
        width: 40px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    #header .header-container {
        width: 96%;
        gap: 6px;
    }

    #header .logo-area img {
        width: 48px;
        height: 48px;
    }

    #header .call-btn {
        width: 38px;
        height: 38px;
    }

    #header .quote-btn {
        min-height: 38px;
        padding: 0 11px;
        font-size: 12px;
    }

    #header #menu-btn {
        width: 36px;
        height: 38px;
        font-size: 23px;
    }
}





/* ============================================================
   ACCESSIBILITY
============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}