/* Responsive Enhancements - Blowin' Cold AC Mobile-First */

/* Fine-tuning for specific breakpoints */
@media screen and (max-width: 1023px) {
    /* Additional tablet-specific refinements */
    .hero-video-control {
        width: 45px;
        height: 45px;
    }
    
    /* Optimize touch targets for tablets */
    .testimonial-prev,
    .testimonial-next {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
}

/* Hero Image Fallbacks for Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-video-wrapper {
        display: none;
    }
    
    .hero-section {
        background: linear-gradient(135deg, rgba(4, 53, 111, 0.8), rgba(2, 122, 151, 0.7)), 
                    url('../images/hero-bg.jpg') center/cover no-repeat;
    }
}

/* Mobile-specific enhancements and overrides */
@media screen and (max-width: 767px) {
    /* Mobile menu toggle animation */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    
    /* Ensure hamburger toggle remains visible when menu is open */
    .mobile-menu-toggle.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mission section mobile adjustments */
    .mission-section .mission-title {
        font-size: 2rem !important;
    }
    
    .mission-section .mission-statement {
        padding: 25px !important;
    }
    
    .mission-section .mission-statement p {
        font-size: 1.1rem !important;
    }
    
    .mission-section .mission-highlights {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .mission-section .mission-icon {
        width: 80px !important;
        height: 80px !important;
    }
    
    .mission-section .mission-icon svg {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Header mobile optimizations - removed override to use main.css values */
    
    .contact-bar {
        display: none !important;
    }
    
    /* Mobile menu already optimized in main.css */
    
    /* Dropdown menu adjustments for mobile */
    .has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: var(--bg-light);
        margin: 0;
        border-radius: 0;
    }
    
    .dropdown-menu a {
        padding-left: 30px;
    }
    
    /* Hide phone icon in mobile menu for cleaner button look */
    .mobile-menu-extra .header-phone .icon-phone {
        display: none;
    }
    
    /* Service icon size adjustment */
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Video control positioning */
    .hero-video-control {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    /* Testimonial controls */
    .testimonial-prev,
    .testimonial-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* Small Mobile (max-width: 479px) - Additional optimizations */
@media screen and (max-width: 479px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-section {
        height: 70vh;
        min-height: 450px;
    }
    
    .hero-content {
        padding: 0 8px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .footer-emergency {
        margin: 0 12px 30px 12px;
    }
}

/* Large Desktop (1440px+) - Enhanced spacing */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .services-grid,
    .features-grid {
        gap: 40px;
    }
    
    .service-card {
        padding: 40px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .hero-video-wrapper,
    .hero-video-control,
    .mobile-menu-toggle,
    .footer-social,
    .btn-primary,
    .btn-secondary,
    .btn-white {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        margin-top: 0;
    }
    
    .hero-content {
        padding: 40px 0;
        color: black;
    }
    
    .hero-title,
    .hero-subtitle {
        color: var(--primary-blue);
    }
    
    .reviews-section {
        background: none;
        color: black;
    }
    
    .reviews-section .section-title,
    .reviews-section .section-subtitle,
    .reviews-summary-card h3,
    .reviews-feed-heading,
    .google-mark,
    .google-review-author,
    .google-review-time,
    .google-review-text,
    .google-reviews-fallback {
        color: var(--primary-blue);
    }
    
    .reviews-summary-card,
    .reviews-feed-shell,
    .google-review-item {
        display: block !important;
        background: none;
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
    }

    .facebook-recommendations-header .section-title,
    .facebook-recommendations-header .section-subtitle,
    .facebook-review-meta h4,
    .facebook-review-meta p,
    .facebook-review-meta span,
    .facebook-review-text {
        color: var(--primary-blue);
    }

    .facebook-review-card {
        display: block !important;
        background: none;
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
    }
    
    .cta-section {
        background: none;
        color: black;
        border: 2px solid var(--primary-red);
    }
    
    .cta-title {
        color: var(--primary-red);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-video {
        display: none;
    }
    
    .hero-video-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('../images/hero-poster.jpg');
        background-size: cover;
        background-position: center;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
    
    .service-card,
    .testimonial-card {
        border: 2px solid var(--text-dark);
    }
    
    .hero-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2d2d2d;
        --bg-section: #242424;
        --text-dark: #f0f0f0;
        --text-gray: #b0b0b0;
        --border-color: #404040;
    }
    
    .main-header {
        background-color: #1a1a1a;
    }
    
    .dropdown-menu {
        background-color: #2d2d2d;
    }
    
    .service-card {
        background-color: #2d2d2d;
    }
    
    .main-footer {
        background-color: #0a0a0a;
    }
}