/* Mobile Critical Fixes for The Auto Refinery */

/* ===== MOBILE HERO SECTION BOTTOM SPACING ===== */
/* Add 25px of extra spacing to the bottom of the hero section */
@media screen and (max-width: 768px) {
    .hero-section,
    .location-hero {
        padding-bottom: calc(2rem + 25px) !important; /* Add 25px to existing padding */
    }
    
    /* Small additional margin for clean separation */
    .hero-section,
    .location-hero {
        margin-bottom: 25px !important;
    }
}

/* ===== MOBILE TESTIMONIALS SECTION ===== */
/* Make testimonials mobile-friendly without changing review content */
@media screen and (max-width: 768px) {
    
    /* Testimonials section mobile layout */
    .testimonials-section {
        padding: 3rem 1rem 4rem 1rem !important;
    }
    
    /* Testimonials slider container */
    .testimonials-slider {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Testimonial cards mobile layout */
    .testimonial-card {
        padding: 2.5rem 2rem !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        
        /* Remove height restrictions */
        height: auto!important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        
        /* Keep original background - don't force white */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Testimonial header mobile layout */
    .testimonial-header {
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Reviewer info mobile layout */
    .reviewer-info {
        display: block !important;
    }
    
    .reviewer-details {
        margin-bottom: 0.5rem !important;
    }
    
    .reviewer-name {
        font-size: 1.1rem !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
        padding-top: 0.1rem !important;
        padding-bottom: 0 !important;
    }
    
    /* Testimonial rating mobile */
    .testimonial-rating {
        display: flex !important;
        justify-content: flex-start !important;
        margin-top: 0 !important;
        margin-bottom: 0.10rem !important;
        gap: 0.0rem !important;
        padding-top: 0 !important;
    }
    
    /* Testimonial content - KEY MOBILE FIX */
    .testimonial-content {
        /* Remove ALL height restrictions for mobile */
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        
        /* Minimal space - close to rating */
        padding: 0 !important;
        margin-top: 0.10rem !important;
    }
    
    /* Testimonial text - ENSURE FULL VISIBILITY */
    .testimonial-content p {
        /* Remove height restrictions */
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        
        /* Remove text truncation */
        overflow: visible !important;
        text-overflow: unset !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        display: block !important;
        
        /* Mobile text styling with minimal top spacing */
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
        text-align: left !important;
        margin: 0 !important;
        padding: 0.25rem 0 1rem 0 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    /* Mobile navigation - HIDE COMPLETELY */
    .testimonials-carousel {
        position: relative !important;
    }
    
    .testimonial-nav {
        display: none !important;
    }
    
    .prev-testimonial,
    .next-testimonial {
        display: none !important;
    }
    
    /* Mobile testimonial indicators - HIDE COMPLETELY */
    .testimonial-indicators {
        display: none !important;
    }
    
    .indicator {
        display: none !important;
    }
    
    .indicator.active {
        background: #0066ff !important;
        transform: scale(1.2) !important;
    }
    
    /* Override any conflicting styles */
    .testimonials-section .testimonial-card,
    .testimonials-section .testimonial-content,
    .testimonials-section .testimonial-content p {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* ===== HIDE PROFILE PHOTOS AND GOOGLE LOGO ON MOBILE ===== */
    /* Hide reviewer profile photos/avatars on mobile */
    .testimonial-card .reviewer-avatar {
        display: none !important;
    }
    
    /* Hide Google logo from individual testimonials on mobile */
    .testimonial-card .testimonial-platform {
        display: none !important;
    }
    
    /* Adjust reviewer info layout when avatar is hidden */
    .testimonial-card .reviewer-info {
        gap: 0 !important;
    }
    
    /* Keep the Google reviews badge in header visible (this shows overall rating) */
    .google-reviews-badge {
        display: flex !important;
    }
    
    /* Adjust testimonial header layout without avatar and platform logo */
    .testimonial-header {
        display: block !important;
        margin-bottom: 1.5rem !important;
    }
    
    .reviewer-details {
        margin-bottom: 0 !important;
    }
    
    /* Hide review date on mobile */
    .review-date {
        display: none !important;
    }
    
    /* Move rating directly under reviewer name */
    .reviewer-details .testimonial-rating {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        justify-content: flex-start !important;
    }
    
    /* Override any conflicting margins between name and rating */
    .testimonial-card .reviewer-name,
    .testimonial-card .reviewer-name h4 {
        margin-bottom: 0.1rem !important;
        padding-bottom: 0 !important;
    }
    
    .testimonial-card .testimonial-rating {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* ===== POSITION "SEE ALL REVIEWS" BUTTON ON MOBILE ===== */
    /* Move the Google reviews CTA under testimonials on mobile */
    .google-reviews-cta {
        order: 10 !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    /* Ensure the testimonials carousel uses flexbox for ordering */
    .testimonials-carousel {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Ensure testimonials slider comes first */
    .testimonials-slider {
        order: 1 !important;
    }
    
    /* Style the Google reviews button for mobile */
    .google-reviews-link {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.75rem 1.5rem !important;
        background: #4285f4 !important;
        color: white !important;
        text-decoration: none !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
    }
    
    .google-reviews-link:hover {
        background: #3367d6 !important;
        transform: translateY(-2px) !important;
    }
    
    /* ===== HIDE GALLERY NAVIGATION BUTTONS ON MOBILE ===== */
    /* Hide main gallery navigation buttons */
    .gallery-prev,
    .gallery-next {
        display: none !important;
    }
    
    /* Hide mobile gallery navigation buttons */
    #mobile-gallery-prev,
    #mobile-gallery-next {
        display: none !important;
    }
    
    /* Hide any other gallery navigation elements */
    .gallery-nav,
    .mobile-gallery-nav {
        display: none !important;
    }
}