/* Responsive Styles */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Header */
    .navbar-brand {
        font-size: 1.32rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
        text-align: center;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-section .display-4 {
        font-size: 1.85rem;
    }
    
    .hero-section .h3 {
        font-size: 1.36rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1.5rem;
    overflow-x: hidden;
}
    
    /* Services */
    #services .card-body {
        padding: 1.5rem;
    overflow-x: hidden;
}
    
    /* Team */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Contact Form */
    .form-control {
        padding: 0.5rem 0.75rem;
    }
    
    /* Typography */
    .h2 {
        font-size: 1.60rem;
    }
    
    .h4 {
        font-size: 1.22rem;
    }
    
    .h5 {
        font-size: 1rem;
    }
    
    /* Disable animations on mobile for reduced motion */
    * {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
    }
    
    .card:hover {
        transform: none;
    }
    
    #team img:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover,
    .btn-outline-primary:hover {
        transform: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-section .h3 {
        font-size: 1.42rem;
    }
    
    #team img {
        width: 110px;
        height: 110px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding-top: 120px;
    }
    
    .hero-section .display-4 {
        font-size: 2.39rem;
    }
    
    /* Services grid adjustment */
    #services .col-md-6:nth-child(odd) {
        clear: left;
    }
    
    /* Team layout */
    #team .col-md-4 {
        margin-bottom: 2rem;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        padding-top: 100px;
    }
    
    /* Services layout */
    #services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Team spacing */
    #team .col-lg-2 {
        margin-bottom: 1.57rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section {
        padding-top: 120px;
    }
    
    .hero-section .display-4 {
        font-size: 3rem;
    }
    
    .hero-section .h3 {
        font-size: 1.85rem;
    }
}

/* Ultra wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section .display-4 {
        font-size: 3.61rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
        padding-bottom: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    #gallery img,
    #team img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    #footer,
    .btn,
    #gallery {
        display: none !important;
    }
    
    .hero-section {
        page-break-after: always;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .card {
        border: 1px solid #fefefe !important;
        box-shadow: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #615d5d;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before {
        animation: none;
    }
    
    .card,
    .btn,
    #team img,
    #gallery img,
    .form-control {
        transition: none !important;
    }
    
    .card:hover,
    #team img:hover,
    #gallery img:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-outline-primary {
        border-color: #000;
        color: #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
}

/* Dark mode preferences */

.hero-section h1 {
    padding-top: 100px;
}