/* ================================================================
   Just in Time Cleaning - Shared Mobile Experience
   Applies only on screens 768px and narrower. Desktop is untouched.
   Load this stylesheet AFTER page styles so mobile rules win ties.
   ================================================================ */

/* Desktop: mobile-only controls stay hidden */
.nav-toggle {
    display: none;
}

.call-fab {
    display: none;
}

@media (max-width: 768px) {

    /* ---------- Base ergonomics ---------- */
    html {
        -webkit-text-size-adjust: 100%;
    }
    body {
        word-wrap: break-word;
        overflow-x: hidden;
    }

    /* 16px inputs stop iOS auto-zoom on focus; 48px fits a thumb */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    input,
    select,
    button {
        min-height: 48px;
    }
    textarea {
        min-height: 0; /* let each page set its own message-box height */
    }

    /* ---------- Header (index.html) ---------- */
    .header-content {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        position: relative;
    }
    .logo {
        order: 1;
    }
    .logo img {
        height: 44px;
    }
    .logo-text {
        font-size: 1.15rem;
    }

    /* Hamburger button, right side of the logo row */
    .nav-toggle {
        order: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 48px;
        height: 48px;
        padding: 11px;
        margin-left: auto;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        cursor: pointer;
    }
    .nav-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background: white;
        border-radius: 2px;
        transition: transform 0.25s, opacity 0.25s;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Phone + email on their own row under the logo */
    .contact-info {
        order: 3;
        flex-basis: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 16px;
        text-align: left;
        font-size: 0.9rem;
        padding-bottom: 4px;
    }
    .contact-info a {
        display: inline-block;
        padding: 2px 0;
    }

    /* Nav becomes a slide-down panel under the header */
    header nav {
        order: 4;
        flex-basis: 100%;
        display: none;
    }
    header nav.open {
        display: block;
    }
    header nav ul {
        flex-direction: column;
        gap: 0;
        text-align: left;
        padding: 0.25rem 0 0.5rem;
    }
    header nav a {
        display: block;
        padding: 14px 8px;
        font-size: 1.05rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    header nav li:last-child a {
        border-bottom: none;
    }

    /* ---------- Hero ---------- */
    .hero {
        padding: 56px 0;
    }
    .hero h1 {
        font-size: 1.9rem;
    }
    .hero p {
        font-size: 1.05rem;
    }
    .hero .btn {
        display: block;
        width: 100%;
        max-width: 340px;
        margin: 10px auto;
        padding: 16px 20px;
        text-align: center;
    }

    /* ---------- Sections tighten ---------- */
    .services,
    .about,
    .why-us,
    .service-area,
    .contact,
    .follow-us {
        padding: 48px 0;
    }
    .social-card {
        padding: 1.5rem;
    }
    .social-card .qr-code {
        width: 150px;
        height: 150px;
    }
    .section-title {
        margin-bottom: 2rem;
    }
    .section-title h2 {
        font-size: 1.6rem;
    }
    .service-card,
    .contact-form {
        padding: 1.25rem;
    }
    .about-image {
        height: 240px;
    }
    .feature h3 {
        font-size: 1.05rem;
    }

    /* ---------- Quote wizard (quote-form.html) ---------- */
    .quote-header {
        text-align: center;
        padding: 16px 12px;
    }
    .quote-header .logo {
        justify-content: center;
    }
    .quote-header .logo img {
        height: 48px;
    }
    .quote-header .logo-text {
        font-size: 1.25rem;
    }
    .quote-header .tagline {
        font-size: 1rem;
    }
    .progress-step {
        flex: 0 0 50%;
    }
    .step-label {
        font-size: 0.8rem;
    }
    .form-step {
        padding: 16px;
    }

    /* ---------- Legal & policy pages ---------- */
    .btn-home {
        display: block;
        text-align: center;
        min-height: 48px;
    }

    /* ---------- Footer ---------- */
    footer {
        padding: 1.5rem 0;
    }
    footer p {
        margin-bottom: 6px;
    }

    /* ---------- Floating Call button (index.html) ---------- */
    .call-fab {
        display: flex;
        position: fixed;
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #27ae60;
        color: #fff;
        font-size: 1.5rem;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
        z-index: 1100;
    }
}

@media (max-width: 480px) {
    /* Very small phones */
    .container {
        padding: 0 14px;
    }
    .logo img {
        height: 40px;
    }
    .logo-text {
        font-size: 1rem;
    }
    .hero h1 {
        font-size: 1.65rem;
    }
    .section-title h2 {
        font-size: 1.4rem;
    }
    .about-image {
        height: 200px;
    }
}
