/* 
 * BestTravelHacks.net - Responsive Styles
 * Mobile-first responsive design optimizations
 */

/* ==========================================================================
   Mobile First Approach - Base styles are mobile
   ========================================================================== */

/* Mobile Optimizations (Default) */
.hero-bg {
    background-attachment: scroll; /* Better performance on mobile */
}

.cta-button {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

/* ==========================================================================
   Tablet Styles (768px and up)
   ========================================================================== */

@media (min-width: 768px) {
    .hero-bg {
        background-attachment: fixed; /* Parallax effect on larger screens */
    }
    
    .cta-button {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
    
    .card-hover:hover {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   Desktop Styles (1024px and up)
   ========================================================================== */

@media (min-width: 1024px) {
    .section-spacing {
        padding: 6rem 0;
    }
    
    .hero-section {
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
}

/* ==========================================================================
   Large Desktop Styles (1280px and up)
   ========================================================================== */

@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* ==========================================================================
   Mobile Specific Optimizations
   ========================================================================== */

@media (max-width: 767px) {
    /* Disable hover effects on mobile for better performance */
    .card-hover:hover {
        transform: none;
    }
    
    /* Optimize text sizes for mobile */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    /* Stack elements vertically on mobile */
    .mobile-stack {
        flex-direction: column;
    }
    
    /* Improve touch targets */
    .cta-button {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Optimize forms for mobile */
    input[type="email"],
    input[type="text"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Stack form fields vertically on mobile */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Improve cookie banner on mobile */
    #cookie-banner {
        padding: 1rem;
    }
    
    #cookie-banner .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Optimize comparison table for mobile */
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
    
    /* FAQ optimization for mobile */
    .faq-section {
        padding: 1rem;
    }
    
    /* Trust badges responsive layout */
    .trust-badges {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .trust-badge {
        flex: 1 1 45%;
        min-width: 120px;
    }
}

/* ==========================================================================
   High DPI / Retina Display Optimizations
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-bg {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=4148&q=80');
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .pulse-animation,
    .card-hover,
    .cta-button {
        animation: none;
        transition: none;
    }
}

@media (prefers-color-scheme: dark) {
    /* Optional: Dark mode support for system preference */
    .bg-white {
        background-color: #1f2937 !important;
    }
    
    .bg-gray-50 {
        background-color: #374151 !important;
    }
    
    .hover\:bg-gray-100:hover {
        background-color: #4b5563 !important;
    }
    
    .text-gray-900 {
        color: #f9fafb !important;
    }
    
    .text-gray-700 {
        color: #f9fafb !important;
    }
    
    .text-gray-600 {
        color: #f3f4f6 !important;
    }
    
    .text-gray-500 {
        color: #d1d5db !important;
    }
}

/* ==========================================================================
   Landscape Mobile Optimization
   ========================================================================== */

@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
}