/* ==========================================================================
   MILLER FLOORING - RESPONSIVE STYLES (MOBILE-FIRST OVERRIDES)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAPTOPS & SMALL DESKTOPS (max-width: 1199.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    body {
        font-size: 17px;
    }
    
    section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 38px;
    }
    
    .about-image-wrapper {
        padding-right: 20px;
        padding-bottom: 20px;
    }
}

/* --------------------------------------------------------------------------
   2. TABLETS & PORTRAIT IPADS (max-width: 991.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    section {
        padding: 70px 0;
    }
    
    .section-title {
        font-size: 34px;
        margin-bottom: 15px;
    }
    
    .section-subtitle {
        margin-bottom: 45px;
        font-size: 16px;
    }
    
    /* Header & Navigation Mobile Menu */
    .navbar-custom {
        background-color: var(--primary-color) !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-collapse {
        background-color: var(--primary-color);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px 24px;
        border-bottom: 2px solid var(--accent-gold);
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: var(--shadow-medium);
        transition: var(--transition-smooth);
    }
    
    .navbar-nav {
        margin-bottom: 20px;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .navbar-custom .btn-gold {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Hero Adjustments */
    .hero-section {
        padding-top: 140px;
        padding-bottom: 60px;
        min-height: auto;
        background-attachment: scroll; /* Disable parallax on touch screens for performance */
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-subheading {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* About Us Overlay Grid */
    .about-image-wrapper {
        margin-bottom: 50px;
        padding-right: 0;
        padding-bottom: 0;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .about-experience-badge {
        left: 10px;
        top: 20px;
        padding: 15px 20px;
    }
    
    .about-experience-num {
        font-size: 28px;
    }
    
    /* Process Timeline (Shifts to left-aligned mobile timeline) */
    .process-timeline::before {
        left: 30px;
        transform: none;
    }
    
    .process-timeline-progress {
        left: 30px;
        transform: none;
    }
    
    .process-step {
        margin-bottom: 45px;
    }
    
    .process-step-node {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .process-step-content {
        width: calc(100% - 60px) !important;
        margin-left: 60px !important;
        margin-right: 0 !important;
        text-align: left !important;
    }
    
    .process-step-content::before {
        left: -9px !important;
        right: auto !important;
        transform: rotate(-45deg) !important;
    }
    
    /* Gallery Grid Override */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        gap: 20px;
    }
    
    .gallery-item {
        height: 300px;
    }
    
    /* Interactive Slider Ratio */
    .comparison-container {
        aspect-ratio: 4 / 3;
    }
    
    /* Contact Forms */
    .contact-info-wrapper {
        margin-bottom: 40px;
    }
}

/* --------------------------------------------------------------------------
   3. LANDSCAPE PHONES & LARGE MOBILES (max-width: 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    /* Buttons become full width on mobile */
    .hero-buttons .btn-gold,
    .hero-buttons .btn-outline-light,
    .cta-buttons .btn-gold,
    .cta-buttons .btn-outline-light,
    .contact-form-wrapper .btn-gold {
        width: 100%;
        display: flex;
    }
    
    .hero-buttons,
    .cta-buttons {
        gap: 12px;
    }
    
    /* Stats grid */
    .stat-card {
        padding: 15px 5px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .stat-card:last-child {
        border-bottom: none;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    /* Grid Spacing */
    .about-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .service-card-img-wrapper {
        height: 200px;
    }
    
    /* Slider details */
    .comparison-label {
        font-size: 11px;
        padding: 4px 10px;
        top: 15px;
    }
    
    .comparison-label-before { left: 15px; }
    .comparison-label-after { right: 15px; }
    
    .comparison-handle-button {
        width: 38px;
        height: 38px;
        font-size: 12px;
    }
    
    /* Swiper Slider Testimonials */
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-quote-icon {
        font-size: 36px;
        top: 20px;
        right: 20px;
    }
    
    /* Map Heights */
    .map-container {
        height: 350px;
    }
    
    /* Footer details */
    .footer {
        padding: 60px 0 20px 0;
    }
    
    .footer h4 {
        margin-bottom: 20px;
        margin-top: 20px;
    }
    
    .footer-bottom-links {
        justify-content: center;
        margin-top: 15px;
    }
    
    .footer-bottom {
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   4. EXTRA SMALL PORTRAIT PHONES (max-width: 575.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .section-title {
        font-size: 26px;
    }
    
    /* Hero specific typography sizing */
    .hero-heading {
        font-size: 34px;
    }
    
    .hero-subheading {
        font-size: 15px;
    }
    
    .hero-badges-wrapper {
        padding: 16px;
        gap: 12px;
    }
    
    .hero-badge-item {
        gap: 8px;
    }
    
    .hero-badge-text {
        font-size: 13px;
    }
    
    /* Service card sizes */
    .service-card-body {
        padding: 25px 15px 15px 15px;
    }
    
    /* Timelines */
    .process-timeline::before {
        left: 20px;
    }
    
    .process-timeline-progress {
        left: 20px;
    }
    
    .process-step-node {
        left: 20px;
        width: 40px;
        height: 40px;
    }
    
    .process-step-node i {
        font-size: 13px;
    }
    
    .process-step-content {
        width: calc(100% - 45px) !important;
        margin-left: 45px !important;
        padding: 20px;
    }
    
    .process-step-content::before {
        left: -8px !important;
        top: 20px;
    }
    
    .process-step-title {
        font-size: 18px;
    }
    
    /* Contact wrapper padding overrides */
    .contact-info-wrapper,
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    /* Newsletter styling stack */
    .footer-newsletter-form {
        flex-direction: column;
    }
    
    .footer-newsletter-btn {
        width: 100%;
        height: 46px;
    }
    
    /* Back to top offset mobile */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}
