/*
 * Mobile Compact Optimization
 * File: assets/css/mobile-compact.css
 * Purpose: Reduce excessive vertical spacing on mobile to minimize scroll length
 * Date: 2025-11-02
 */

/* ================================================
   HIDE MOBILE TOGGLE BUTTONS ON DESKTOP
   ================================================ */

.mobile-gallery-toggle,
.mobile-about-toggle,
.mobile-reviews-toggle,
.mobile-floorplan-toggle,
.mobile-faqs-toggle {
    display: none;
}

/* ================================================
   MOBILE OPTIMIZATION (max-width: 768px)
   Reduce section padding by ~30-40%
   ================================================ */

@media (max-width: 768px) {

    /* Hero Section - Compact vertical padding for mobile */
    .hero {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        margin-top: 70px !important; /* Account for fixed header */
    }

    /* About Section - Reduce padding (was 80px) */
    .about {
        padding: 40px 0 !important;
    }

    /* Services Section - Reduce padding (was 100px/60px) */
    .services {
        padding: 40px 0 !important;
    }

    /* Gallery/Repairs Section - Reduce padding (was 80px/60px) */
    .gallery {
        padding: 40px 0 !important;
    }

    /* Contact Section - Reduce padding (was 80px) */
    .contact {
        padding: 40px 0 !important;
    }

    /* FAQs Section - Reduce padding (was 80px/60px) */
    .faqs-section,
    .faqs {
        padding: 40px 0 !important;
    }

    /* Location Section - Reduce padding (was 80px) */
    .location {
        padding: 40px 0 !important;
    }

    /* Reviews Section - Reduce padding (was 80px) */
    .reviews {
        padding: 40px 0 !important;
    }

    /* Section Headers - Reduce bottom margin */
    .section-header {
        margin-bottom: 30px !important;
    }

    .section-title {
        margin-bottom: 12px !important;
        font-size: 28px !important; /* Slightly smaller on mobile */
    }

    .section-subtitle {
        margin-bottom: 0 !important;
        font-size: 15px !important;
    }

    /* Carousel - Reduce margins */
    .gallery-carousel {
        margin: 30px 0 40px !important;
    }

    /* Store Banner - Reduce height if exists */
    .store-banner {
        margin-bottom: 30px !important;
    }

    /* About Content - Reduce spacing */
    .about-content {
        margin-bottom: 30px !important;
    }

    /* Stats Grid - Reduce spacing */
    .stats-grid {
        margin-top: 30px !important;
        gap: 20px !important;
    }

    /* Gallery Grid Section - Reduce top margin */
    .gallery-grid-section {
        margin-top: 40px !important;
    }

    /* Gallery Grid - Reduce gap */
    .gallery-grid {
        gap: 12px !important;
    }

    /* Gallery CTA - Reduce top margin */
    .gallery-cta {
        margin-top: 30px !important;
    }

    /* Contact Form - Reduce spacing */
    .contact-form {
        gap: 15px !important;
    }

    /* FAQ Items - Reduce spacing */
    .faq-item {
        margin-bottom: 12px !important;
    }

    /* Reviews Grid - Reduce gap */
    .reviews-grid {
        gap: 15px !important;
    }

    /* Social Links - Reduce padding */
    .social-links-section {
        padding: 40px 0 !important;
    }

    /* Floor Plan Section - Reduce if exists */
    .floor-plan-section {
        padding: 50px 0 !important;
    }

    /* Maps Container - Reduce spacing */
    .maps-container {
        margin-top: 30px !important;
        gap: 20px !important;
    }

    /* CTA Buttons - Reduce spacing */
    .hero-cta {
        gap: 12px !important;
        margin-top: 25px !important;
    }

    /* Slide Info - Already handled in gallery.css, but ensure */
    .slide-info {
        padding: 25px 15px !important;
    }

    /* Magazine layout - don't apply tablet padding override */
    .slide-content-magazine .slide-info-magazine {
        padding: 0 !important; /* Magazine handles its own padding */
    }

    /* Reduce paragraph spacing */
    section p {
        margin-bottom: 15px !important;
    }

    /* Reduce heading spacing */
    h2 {
        margin-bottom: 15px !important;
    }

    h3 {
        margin-bottom: 12px !important;
    }
}

/* ================================================
   EXTRA SMALL MOBILE (max-width: 480px)
   Further reduction for very small screens
   ================================================ */

@media (max-width: 480px) {

    /* Further reduce all section padding */
    .hero {
        padding: 70px 0 30px !important;
    }

    .about,
    .services,
    .contact,
    .location,
    .reviews,
    .faqs-section,
    .faqs {
        padding: 40px 0 !important;
    }

    .gallery {
        padding: 35px 0 !important;
    }

    /* Section headers even smaller */
    .section-title {
        font-size: 24px !important;
    }

    .section-subtitle {
        font-size: 14px !important;
    }

    /* Tighter carousel */
    .gallery-carousel {
        margin: 25px 0 30px !important;
    }

    /* Compact grid */
    .gallery-grid {
        gap: 10px !important;
    }

    /* Reduce all margins */
    .gallery-grid-section,
    .gallery-cta,
    .about-content,
    .stats-grid {
        margin-top: 25px !important;
    }
}

/* ================================================
   OPTIMIZATIONS FOR BETTER UX
   ================================================ */

/* Ensure content doesn't feel cramped */
@media (max-width: 768px) {
    /* Maintain readability with line-height */
    p {
        line-height: 1.6 !important;
    }

    /* Keep buttons comfortable */
    .btn-primary,
    .btn-secondary {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    /* Maintain card padding for readability */
    .service-card,
    .review-card,
    .faq-item {
        padding: 20px !important;
    }

    /* ================================================
       COMPACT MOBILE DESIGN - CONDENSED SECTIONS
       Make sections more compact without hiding content
       ================================================ */

    /* 1. SERVICES - Compact list on mobile */
    .services-grid {
        gap: 12px !important;
    }

    .service-card {
        padding: 16px !important;
    }

    .service-card h3 {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }

    .service-card p {
        font-size: 13px !important;
        margin-bottom: 8px !important;
        line-height: 1.4 !important;
    }

    .service-badge {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }

    /* Service icons kept visible on mobile - they're compact and helpful */

    /* 2. GALLERY - More compact carousel */
    .slide-info {
        padding: 20px 16px !important;
    }

    .slide-info h3 {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    .slide-info p {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }

    /* Magazine layout exceptions - don't apply mobile styles to magazine slides */
    .slide-content-magazine .slide-title-magazine {
        font-size: 24px !important; /* Keep magazine size on mobile */
    }

    .slide-content-magazine .slide-description-magazine {
        font-size: 14px !important; /* Magazine description size */
    }

    .slide-meta {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin-bottom: 8px !important;
    }

    /* Gallery grid restored - show on mobile */
    .gallery-grid-section {
        display: block !important;
        margin-top: 30px !important;
    }

    .gallery-grid {
        gap: 10px !important;
    }

    /* 3. ABOUT - More compact */
    .store-banner {
        height: 180px !important;
        margin-bottom: 20px !important;
    }

    /* 3R Commitment - ICONS ONLY on mobile */
    .principles {
        display: flex !important;
        justify-content: center !important;
        gap: 24px !important;
        margin-top: 20px !important;
    }

    .principle {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .principle:hover {
        transform: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    .principle-icon {
        display: block !important;
        font-size: 40px !important;
        margin: 0 !important;
    }

    .principle-icon svg {
        width: 40px !important;
        height: 40px !important;
    }

    /* Hide text on mobile - icons only */
    .principle h4,
    .principle p {
        display: none !important;
    }

    /* 4. REVIEWS - More compact cards */
    .reviews-grid {
        gap: 12px !important;
    }

    .review-card {
        padding: 16px !important;
    }

    .review-header {
        margin-bottom: 8px !important;
    }

    .review-author {
        font-size: 14px !important;
    }

    .review-date {
        font-size: 12px !important;
    }

    .review-text {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    .review-rating {
        font-size: 12px !important;
    }

    /* Show only 3 reviews on mobile */
    .review-card:nth-child(n+4) {
        display: none !important;
    }

    /* Google reviews section compact */
    .google-reviews-section {
        margin-top: 24px !important;
    }

    /* 5. LOCATION - Collapsible maps on mobile */
    /* Map toggle buttons - MOBILE ONLY */
    .map-toggle-btn {
        display: block !important;
        width: 100%;
        max-width: 400px;
        margin: 15px auto;
        padding: 16px 24px;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        color: white;
        text-decoration: none;
        border: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .map-toggle-btn:hover,
    .map-toggle-btn:active {
        background: linear-gradient(135deg, #2563eb, #1e40af);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }

    .map-toggle-btn i {
        margin-right: 8px;
    }

    /* Hide both maps by default on MOBILE */
    .maps-container > .map-card {
        display: none !important;
    }

    /* Show when expanded on MOBILE */
    .maps-container > .map-card.expanded {
        display: block !important;
    }

    /* Show legend on floor plan (for mobile collapsible view) */
    .map-legend {
        display: flex !important;
    }

    .map-card iframe {
        height: 300px !important;
    }

    /* DESKTOP: Hide toggle buttons and show all maps */
    @media (min-width: 769px) {
        .map-toggle-btn {
            display: none !important;
        }

        /* Show all maps on desktop */
        .maps-container > .map-card {
            display: block !important;
        }
    }

    /* 6. FAQs - Compact collapsed state on mobile */
    .faq-item {
        margin-bottom: 8px !important;
        overflow: hidden !important;
        transition: all 0.3s ease !important;
        border-radius: 8px !important;
        background: white !important;
        border: 1px solid #e5e7eb !important;
        padding: 0 !important;
    }

    .faq-question {
        font-size: 14px !important;
        padding: 12px 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        margin: 0 !important;
        transition: background-color 0.2s ease !important;
        background-color: transparent !important;
        position: relative !important;
        box-sizing: border-box !important;
    }

    /* Blue background fills ENTIRE width edge-to-edge when active */
    .faq-item.active .faq-question {
        background-color: #eff6ff !important;
        border-bottom: 1px solid #dbeafe !important;
        margin: 0 !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* Bigger + button on mobile */
    .faq-bullet {
        flex-shrink: 0 !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        margin: 0 !important;
        background: #eff6ff !important;
        color: #3b82f6 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .faq-item.active .faq-bullet {
        transform: rotate(45deg) !important;
        background: #3b82f6 !important;
        color: white !important;
    }

    .faq-question-content {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
    }

    .faq-question-text {
        font-size: 14px !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
        margin: 0 !important;
        color: #1f2937 !important;
        font-weight: 600 !important;
    }

    .faq-item.active .faq-question-text {
        color: #1e40af !important;
    }

    .faq-answer {
        font-size: 13px !important;
        line-height: 1.5 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background-color: transparent !important;
    }

    .faq-item.active .faq-answer {
        max-height: 500px !important;
    }

    .faq-answer-text {
        padding: 8px 14px 12px 54px !important;
        color: #4b5563 !important;
    }

    /* 7. CONTACT - More compact form and info */
    .contact-form {
        padding: 20px !important;
    }

    .form-group label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }

    .form-group input,
    .form-group textarea {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    /* Contact info cards - minimal */
    .contact-info-card {
        padding: 12px !important;
        margin-bottom: 10px !important;
    }

    .contact-info-card h3 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    .contact-info-card p,
    .contact-info-card a {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* GALLERY & REPAIRS MODALS - Enhanced mobile friendly */
    .gallery-modal .modal-content {
        padding: 10px !important;
    }

    .gallery-modal .modal-header {
        padding: 15px 60px 15px 15px !important;
        margin-bottom: 20px !important;
    }

    .gallery-modal .modal-title {
        font-size: 17px !important;
    }

    .gallery-modal .modal-close,
    .gallery-modal .modal-back {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    .gallery-modal-grid {
        gap: 15px !important;
    }

    .modal-gallery-item {
        border-radius: 10px !important;
    }

    .modal-item-image {
        height: 180px !important;
    }

    .modal-item-info {
        padding: 16px !important;
    }

    .modal-item-info h4 {
        font-size: 16px !important;
    }

    .repair-type {
        font-size: 13px !important;
    }

    .item-meta {
        font-size: 12px !important;
    }

    /* Repair detail modal */
    .repair-modal-content {
        width: 98% !important;
        max-height: 92vh !important;
    }

    .repair-modal-info {
        padding: 20px !important;
    }

    .repair-modal-header h2 {
        font-size: 20px !important;
    }

    .repair-modal-description {
        font-size: 14px !important;
    }

    .repair-modal-close {
        top: 10px !important;
        right: 10px !important;
        width: 34px !important;
        height: 34px !important;
    }

    /* Modal styles moved to modals-mobile.css for better organization */

    /* FAQ FINAL OVERRIDE - Ensure blue background shows */
    .faqs-section .faq-item.active > .faq-question,
    .faq-item.active > .faq-question {
        background-color: #eff6ff !important;
        border-bottom: 1px solid #dbeafe !important;
    }

    /* 8. FOOTER - Hide services and contact sections on mobile */
    .footer-content .footer-section:nth-child(2),
    .footer-content .footer-section:nth-child(3) {
        display: none !important;
    }

    /* Adjust footer to 2 columns on mobile (About + Social) */
    .footer-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }

    /* Footer bottom - hide subtitle, reformat copyright */
    .footer-bottom p:nth-child(2) {
        display: none !important; /* Hide "Assistência Técnica..." text */
    }

    .footer-bottom p:first-child {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        line-height: 1.5 !important;
    }
}

/* Desktop footer copyright - two lines */
@media (min-width: 769px) {
    .footer-bottom p:first-child {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        line-height: 1.5 !important;
    }

    .footer-bottom p:nth-child(2) {
        display: none !important; /* Hide on desktop too */
    }
}

/* Mobile Maps button removed - using floor plan with Obter Direções button instead */
