/* PhotoVault Gallery - Responsive CSS */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2.25rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }
    .display-6 { font-size: 1.25rem; }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0;
    }
    
    /* Hero Section */
    #hero {
        padding: 3rem 0;
        min-height: 80vh;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Timeline - Mobile Stack */
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item::before {
        left: 1rem;
    }
    
    .timeline-item .row {
        margin-left: 2rem;
    }
    
    /* Gallery */
    #gallery .col-lg-3,
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer */
    #footer .col-lg-3,
    #footer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* Disable animations on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    .card:hover .card-img-top {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    #hero {
        padding: 4rem 0;
    }
    
    /* Timeline adjustments */
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-item::before {
        left: 2rem;
    }
    
    .timeline-item .row {
        margin-left: 3rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
    
    /* Buttons - Allow side by side */
    .btn {
        width: auto;
        margin-right: 0.5rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Hero Section */
    #hero {
        padding: 4rem 0;
    }
    
    /* Timeline - Restore center line */
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item::before {
        left: 50%;
    }
    
    .timeline-item .row {
        margin-left: 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 230px;
    }
    
    /* Grid adjustments */
    .col-md-6 {
        margin-bottom: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Standard desktop styles */
    .card-img-top {
        height: 240px;
    }
    
    /* Restore hover effects */
    .card:hover {
        transform: translateY(-5px);
    }
    
    .card:hover .card-img-top {
        transform: scale(1.05);
    }
    
    #gallery img:hover {
        transform: scale(1.05);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Full desktop experience */
    .container {
        max-width: 1140px;
    }
    
    .card-img-top {
        height: 250px;
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding: 6rem 0;
    }
    
    /* Typography scaling */
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height on landscape mobile */
    #hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    /* Compact sections */
    section {
        padding: 2rem 0;
    }
    
    /* Hide some decorative elements */
    #hero::before {
        display: none;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on retina displays */
    .card-img-top,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */

/* Print Responsive Adjustments */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #footer,
    .timeline::before,
    .timeline-item::before {
        display: none;
    }
    
    /* Optimize for print layout */
    .container {
        max-width: none;
        width: 100%;
        padding: 0;
    }
    
    .row {
        margin: 0;
    }
    
    .col-lg-3,
    .col-lg-4,
    .col-lg-6,
    .col-md-6 {
        width: 50%;
        float: left;
        padding: 0.5rem;
    }
    
    .card {
        border: 1px solid #000;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    #gallery {
        display: none; /* Hide gallery in print */
    }
}

/* Motion Reduced - Enhanced */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    /* Static states for interactive elements */
    .card:hover,
    .btn:hover,
    .navbar-nav .nav-link:hover,
    #gallery img:hover,
    .feature-icon:hover,
    .hover-lift:hover {
        transform: none;
    }
    
    /* Remove parallax and complex animations */
    #hero::before {
        display: none;
    }
}

/* Accessibility - High Contrast */
@media (prefers-contrast: high) {
    /* Enhance contrast for better accessibility */
    .card {
        border: 2px solid #000;
    }
    
    .btn-outline-primary {
        border-width: 3px;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    /* Ensure text is highly contrasted */
    .text-muted {
        color: #000;
    }
    
    .bg-light {
        background-color: #f0f0f0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Optimize for touch devices */
    .btn {
        min-height: 44px; /* Touch target minimum */
        padding: 1rem 1.5rem;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Increase spacing for touch */
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
}

/* Custom Breakpoint for Very Large Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced spacing for ultra-wide screens */
    section {
        padding: 7rem 0;
    }
    
    .display-4 {
        font-size: 3rem;
    }
    
    .display-5 {
        font-size: 2.25rem;
    }
}

/* Specific Component Responsive Adjustments */

/* Service Cards Responsive */
@media (max-width: 767.98px) {
    .services-item {
        margin-bottom: 2rem;
    }
}

/* Team Section Responsive */
@media (max-width: 575.98px) {
    .team-member {
        margin-bottom: 2rem;
    }
}

/* Gallery Responsive Grid */
@media (max-width: 575.98px) {
    #gallery .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #gallery .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Contact Form Responsive */
@media (max-width: 575.98px) {
    .contact-form .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Footer Responsive Adjustments */
@media (max-width: 991.98px) {
    #footer .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    #footer .text-md-end {
        text-align: center;
    }
} 