/* ==========================================================================
   MOBILE & TABLET RESPONSIVE NAVIGATION (MAX-WIDTH: 991px)
   ========================================================================== */
/* ==========================================================================
   MOBILE & TABLET RESPONSIVE NAVIGATION (MAX-WIDTH: 991px ONLY)
   ========================================================================== */
@media (max-width: 991px) {
    
    .top-bar-container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* 1. HEADER ALIGNMENT ENGINE (Distributes Logo, Ticker, and Menu Button) */
    .navbar-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 12px;
    }
    
    /* 2. INCREASED HAMBURGER BUTTON SIZE (For Easy Mobile Tapping) */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        background: none;
        border: none;
        cursor: pointer;
        gap: 6px;       /* Spacing between bars */
        padding: 10px;  /* Larger invisible touch target zone */
    }

    /* Thicker, longer hamburger bars */
    .menu-toggle .bar {
        display: block;
        width: 32px;    /* Increased width */
        height: 4px;    /* Increased thickness */
        background-color: #000000 !important;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
        pointer-events: none;
    }

    /* Thicker bars transition calculations into 'X' layout */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    /* 3. NEW PREMIUM BLACK CAPSULE TAGLINE TICKER (Tablet & Mobile Only) */
    .header-tagline-ticker {
        display: block !important; /* Visible on tablet/mobile */
        visibility: visible !important;
        opacity: 1 !important;
        flex: 1;
        max-width: 52%; /* Prevents colliding into logo or menu button */
        overflow: hidden;
        white-space: nowrap;
        background: #111111 !important; /* Premium dark black capsule */
        border-radius: 25px;            /* Sleek rounded pill aesthetic */
        padding: 6px 12px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
        box-sizing: border-box;
    }

    .ticker-wrap {
        display: inline-block;
        visibility: visible !important;
        opacity: 1 !important;
        padding-left: 100%;
        animation: marqueeTagline 14s linear infinite; /* Smooth scrolling loop */
    }

    .tagline-text {
        display: inline-block;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 10px;
        font-weight: 700;
        color: #ffffff !important; /* High contrast white text */
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

    /* Infinite continuous scroll math script */
    @keyframes marqueeTagline {
        0% { transform: translate3d(0, 0, 0); }
        100% { transform: translate3d(-100%, 0, 0); }
    }

    /* 4. BASE DRAWER CONTAINER STRUCTURE */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        height: calc(100vh - 120px);
        background-color: #ffffff !important;
        flex-direction: column;
        align-items: flex-start;
        overflow-y: auto;
        transition: transform 0.3s ease-in-out, left 0.3s ease-in-out; 
        padding: 20px 0;
        display: flex !important;
        z-index: 99999 !important;
        visibility: hidden;
    }

    .nav-menu.active {
        left: 0 !important; 
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 15px 25px;
        width: 100%;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid #e0e0e0;
        color: #000000 !important;
        font-weight: 600;
        text-decoration: none;
        box-sizing: border-box;
    }

    /* Accordion Menu Panels */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transform: none;
        border-top: none;
        border-bottom: 1px solid #e0e0e0;
        transition: max-height 0.3s ease-out, opacity 0.2s ease;
    }

    .dropdown-menu.open {
        max-height: 600px; 
        opacity: 1 !important;
        visibility: visible !important;
    }

    .dropdown-menu li a {
        color: #000000 !important;
        padding: 12px 25px 12px 40px;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        text-decoration: none;
    }

    .nav-link .arrow {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #000000 !important;
        font-size: 14px !important;
        margin-left: auto;
        padding-right: 10px;
        transition: transform 0.3s ease-in-out;
    }
    
    .nav-item.active > .nav-link .arrow {
        transform: rotate(180deg) !important;
        color: #FF5A2C !important;
    }
    
    .drop-icon {
        font-size: 16px;
        display: inline-block;
    }
}

/* paint */

/* Mobile Optimization Framework for Paint Polishing Module */
@media (max-width: 991px) {
    .page-hero h1 {
        font-size: 30px;
    }
    
    .slide {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
    }
    
    .price-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .special-card {
        transform: none;
    }
}

@media (max-width: 600px) {
    .slide {
        flex: 0 0 100%;
        width: 100%;
    }
    
    .slide-arrow {
        display: none; /* Hide visual track arrows on narrow phone widths */
    }
    
    .pricing-section {
        padding: 20px;
    }
    
    .underlined-title {
        font-size: 22px;
    }
}

/* footer */
/* Responsive adjustments for two-section footer layout */
@media (max-width: 900px) {
    .footer-container-white {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .form-row-double {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}

/* index */
/* Hero Video Mobile Adjustments */
@media (max-width: 768px) {
    .brand-heading {
        font-size: 36px;
        line-height: 1.3;
    }
    
    .services-tagline {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .services-tagline span {
        display: block; /* Stacks services list cleanly on narrow screens */
        margin: 5px 0;
    }
    
    .mobile-break {
        display: none;
    }
    
    .btn-hero-book {
        width: 100%;
        justify-content: center;
        padding: 14px 28px;
    }
}

/* service section */
/* Services Grid Breakpoints */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 per row on tablets */
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 per row on mobile phones */
    }
    
    .services-section {
        padding: 50px 0;
    }
}


/* ==========================================================================
   SLOW MARQUEE SPEED & MOBILE SWIPE SNAP CONFIGURATION
   ========================================================================== */

.marquee-track {
    display: flex;
    width: max-content;
    gap: 30px;
    /* REDUCED SPEED: Changed from 32s to 75s for a very slow, eye-catching crawl */
    animation: scrollMarquee 75s linear infinite; 
}

/* Pauses track animation on computer desktop mouse hovering */
.marquee-track:hover {
    animation-play-state: paused;
}

/* --- MOBILE & TOUCH DEVICE OPTIMIZATIONS --- */
@media (max-width: 768px) {
    .marquee-wrapper {
        /* Allows natural finger swiping on mobile viewports */
        overflow-x: auto !important; 
        padding: 20px;
        
        /* Enables rigid individual item snapping mechanics */
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        
        /* Hides unsightly default scrollbars while keeping navigation active */
        -webkit-overflow-scrolling: touch;
    }
    
    .marquee-wrapper::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
    }

    .marquee-track {
        /* Kills the continuous moving auto-animation on mobile so it doesn't fight the user's hand */
        animation: none !important; 
        width: auto;
        display: inline-flex;
    }

    .testimonial-card {
        /* Tells the card to snap right to the center edges of the screen when swiped one-by-one */
        scroll-snap-align: center;
        flex-shrink: 0;
        width: 85vw; /* Sets card width dynamically to fit mobile screens perfectly */
    }
    
    /* Hide the duplicated cards on mobile to prevent an endless swipe loop */
    .marquee-track .testimonial-card:nth-last-child(-n+4) {
        display: none;
    }
}

/* about */

/* About Page Viewport Adjustments */
@media (max-width: 991px) {
    .about-split-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-main-heading {
        font-size: 34px;
    }
    .mission-vision-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Page Responsive Adjustments */
@media (max-width: 991px) {
    .contact-hero {
        padding: 80px 20px;
    }

    .contact-main-heading {
        font-size: 34px;
    }

    .contact-cards-section {
        padding: 45px 0;
    }

    .contact-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 560px;
    }
}

@media (max-width: 600px) {
    .contact-hero {
        padding: 64px 16px;
        min-height: 320px;
    }

    .contact-small-tag {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .contact-main-heading {
        font-size: 30px;
    }

    .contact-sub-tagline {
        font-size: 14px;
    }

    .contact-cards-section {
        padding: 32px 0;
    }

    .contact-cards-grid {
        padding: 0 16px;
    }

    .contact-action-card {
        padding: 28px 18px;
    }

    .contact-card-detail {
        font-size: 15px;
        overflow-wrap: anywhere;
    }
}
