/**
 * Responsive CSS - Fixed Version
 * Rajasthan Wildlife Safari
 * Version: 1.0.1
 * Fixed: Better breakpoints and card alignment on all devices
 */

/* ==================================
   Large Desktop - 1400px and below
   ================================== */
@media (max-width: 1400px) {
    .container {
        padding: 0 3rem;
    }
}

/* ==================================
   Desktop - 1200px and below
   ================================== */
@media (max-width: 1200px) {
    .container {
        padding: 0 2.5rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    /* Adjust safari cards to 2 columns */
    .safaris-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================================
   Tablet - 992px and below
   ================================== */
@media (max-width: 992px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    /* Header Navigation */
    .header-container {
        padding: 0 2rem;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--forest-green);
        padding: 2rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .main-navigation.mobile-active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-actions {
        display: none;
    }
    
    /* Mobile navigation booking button */
    .main-navigation.mobile-active .header-actions {
        display: block;
        margin-top: 1.5rem;
        width: 100%;
    }
    
    .main-navigation.mobile-active .booking-trigger {
        width: 100%;
    }
    
    /* Grid Adjustments */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .safaris-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================================
   Mobile Landscape - 768px and below
   ================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    html {
        font-size: 15px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .hero-badges {
        gap: 0.75rem;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .section-padding {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Header */
    .header-logo img {
        height: 50px;
    }
    
    /* Grids - Single Column */
    .features-grid,
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Cards */
    .feature-card {
        padding: 2rem;
    }
    
    .feature-icon {
        font-size: 3rem;
    }
    
    .safari-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .safari-image {
        height: 250px;
    }
    
    .safari-content {
        padding: 2rem;
    }
    
    .safari-title {
        font-size: 1.75rem;
    }
    
    .package-card {
        padding: 2rem;
    }
    
    .package-card.featured {
        transform: none;
    }
    
    .package-price {
        font-size: 2rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .modal-title {
        font-size: 2rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 35px;
        height: 35px;
    }
    
    /* Footer */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-widget {
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Policy Pages */
    .policy-container {
        padding: 0 1rem;
    }
    
    /* CTA Section */
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1.1rem;
    }
}

/* ==================================
   Mobile Portrait - 576px and below
   ================================== */
@media (max-width: 576px) {
    .container {
        padding: 0 1.25rem;
    }
    
    /* Safari Grid - Stack on small mobile */
    .safaris-grid {
        grid-template-columns: 1fr;
    }
    
    .safari-image {
        height: 200px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }
}

/* ==================================
   Mobile Small - 480px and below
   ================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    html {
        font-size: 14px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .badge {
        width: 100%;
        justify-content: center;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.4rem; }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Cards - Reduced padding */
    .feature-card,
    .safari-card .safari-content,
    .package-card,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .package-title {
        font-size: 1.5rem;
    }
    
    .package-price {
        font-size: 1.75rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .modal-title {
        font-size: 1.75rem;
    }
    
    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.5rem;
    }
    
    /* Forms */
    .booking-form input,
    .booking-form select,
    .booking-form textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Footer */
    .site-footer {
        padding: 3rem 0 0;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
    }
    
    /* Section Padding */
    .section-padding {
        padding: 3rem 0;
    }
}

/* ==================================
   Mobile Extra Small - 360px and below
   ================================== */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    html {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Ultra compact cards */
    .feature-card,
    .package-card,
    .testimonial-card {
        padding: 1.25rem;
    }
    
    .safari-content {
        padding: 1.25rem;
    }
}

/* ==================================
   Orientation: Landscape on Mobile
   ================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
    
    .modal-content {
        max-height: 90vh;
        margin: 0.5rem;
    }
}

/* ==================================
   High Resolution Screens
   ================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper shadows for retina displays */
    .feature-card,
    .safari-card,
    .package-card,
    .testimonial-card,
    .office-card {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
    
    .feature-card:hover,
    .safari-card:hover,
    .package-card:hover,
    .testimonial-card:hover,
    .office-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
}

/* ==================================
   Print Styles
   ================================== */
@media print {
    /* Hide non-essential elements */
    .site-header,
    .site-footer,
    .booking-modal,
    .cta-section,
    .mobile-menu-toggle,
    .hero-badges,
    .social-links,
    .btn,
    .booking-trigger {
        display: none !important;
    }
    
    /* Reset container widths */
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    /* Optimize typography for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    /* Ensure cards don't break across pages */
    .feature-card,
    .safari-card,
    .package-card,
    .testimonial-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    /* Optimize images */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    /* Show link URLs */
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* Grid adjustments */
    .features-grid,
    .safaris-grid,
    .packages-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==================================
   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;
    }
    
    .feature-card:hover,
    .safari-card:hover,
    .package-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}

/* ==================================
   Dark Mode Support (Optional)
   ================================== */
@media (prefers-color-scheme: dark) {
    /* You can add dark mode styles here if needed */
}

/* ==================================
   Touch Device Optimizations
   ================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }
    
    .nav-menu li a {
        padding: 1rem 0;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .safari-card:hover,
    .package-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}