/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* No animations on mobile as per requirements */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Typography adjustments */
    h1, .display-4 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.87rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero section */
    #hero {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    #hero .btn-lg {
        font-size: 1.08rem;
        padding: 0.5rem 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.24rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 200px;
    }
    
    /* Timeline */
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-content {
        margin-left: 0.5rem;
        padding: 1rem;
    }
    
    /* Team members */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Gallery */
    #gallery img {
        height: 150px;
    }
    
    /* Contact form */
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Footer */
    #footer .col-lg-4,
    #footer .col-lg-2,
    #footer .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    /* Spacing adjustments */
    .py-5 {
        padding: 3rem 0;
    }
    
    .mb-5 {
        margin-bottom: 2rem;
    }
    
    /* Button stacking */
    #hero .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Service cards price display */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Reduce animations on small devices */
    [data-sal] {
        animation-duration: 1.83s;
    }
    
    /* Typography */
    h1, .display-4 {
        font-size: 2.37rem;
    }
    
    /* Hero adjustments */
    #hero {
        min-height: 85vh;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 220px;
    }
    
    /* Gallery */
    #gallery img {
        height: 170px;
    }
    
    /* Timeline */
    .timeline-content {
        margin-left: 0.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1, .display-4 {
        font-size: 2.46rem;
    }
    
    /* Hero section */
    #hero {
        min-height: 90vh;
    }
    
    /* Services grid - 2 columns on tablets */
    #services .row.g-4 {
        --bs-gutter-x: 1.5rem;
    }
    
    /* Gallery */
    #gallery img {
        height: 180px;
    }
    
    /* Team layout adjustment */
    #team .col-lg-2 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Standard desktop styles */
    .container {
        max-width: 960px;
    }
    
    /* Gallery optimal sizing */
    #gallery img {
        height: 200px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Enhanced spacing for large screens */
    .py-5 {
        padding: 6rem 0;
    }
    
    /* Larger hero content */
    #hero .container {
        max-width: 1140px;
    }
    
    /* Gallery full sizing */
    #gallery img {
        height: 220px;
    }
    
    /* Timeline enhanced layout */
    .timeline-content {
        max-width: 500px;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced hero section */
    #hero {
        padding: 8rem 0;
    }
    
    /* Larger gallery images */
    #gallery img {
        height: 240px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    /* Compact navigation */
    .navbar {
        padding: 0.25rem 0;
    }
    
    /* Reduced section padding */
    .py-5 {
        padding: 2rem 0;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    #footer,
    .form-control,
    [data-lightbox] {
        display: none !important;
    }
    
    /* Adjust layout for print */
    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: transparent !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    /* Card layouts for print */
    .card {
        border: 1px solid #f9ced1 !important;
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }
    
    /* Remove backgrounds and shadows */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ensure links are visible */
    a {
        text-decoration: underline !important;
        color: #000 !important;
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always;
    }
    
    /* Image sizing for print */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove transform effects */
    .card:hover,
    .btn:hover,
    #team img:hover,
    #gallery img:hover {
        transform: none !important;
    }
    
    /* Disable Sal.js animations */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Dark mode support */

/* Focus management for keyboard navigation */
@media (any-hover: none) and (any-pointer: coarse) {
    /* Touch device optimizations */
    .btn {
        min-height: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Larger touch targets */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover,
    img:hover {
        transform: none;
    }
}

/* Internet Explorer 11 support */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    /* IE11 specific fixes */
    .d-flex {
        display: -ms-flexbox !important;
        display: flex !important;
    }
    
    .flex-grow-1 {
        -ms-flex-positive: 1 !important;
        flex-grow: 1 !important;
    }
    
    .align-items-center {
        -ms-flex-align: center !important;
        align-items: center !important;
    }
    
    /* Grid fallbacks */
    .col-lg-4 {
        width: 33.333333%;
        float: left;
    }
    
    .col-lg-6 {
        width: 50%;
        float: left;
    }
    
    .row::after {
        content: "";
        display: table;
        clear: both;
    }
}

/* Custom breakpoint for very small screens */
@media (max-width: 320px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    h1, .display-4 {
        font-size: 1.90rem;
    }
    
    .btn {
        font-size: 0.99rem;
        padding: 0.5rem 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
} 