/* Responsive Design - Mobile First Approach */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.3rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    /* Hero section mobile adjustments */
    #hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    #hero .display-4 {
        font-size: 1.75rem;
    }
    
    /* Remove animations on mobile */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    /* Disable floating shapes animation */
    .hero-shapes .shape {
        animation: none;
        display: none;
    }
    
    /* Section padding adjustments */
    section {
        padding: 2rem 0;
    }
    
    /* Team member images */
    .team img,
    img[src*="team_"] {
        width: 100px;
        height: 100px;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 200px;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Footer adjustments */
    footer {
        text-align: center;
    }
    
    footer .row > div {
        margin-bottom: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero adjustments */
    #hero .display-4 {
        font-size: 2rem;
    }
    
    /* Card grid adjustments */
    .card-img-top {
        height: 220px;
    }
    
    /* Team images */
    .team img,
    img[src*="team_"] {
        width: 110px;
        height: 110px;
    }
    
    /* Disable animations on mobile resolution */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    .hero-shapes .shape {
        animation: none;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section */
    #hero {
        min-height: 80vh;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 240px;
    }
    
    /* Team layout */
    .team .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* Navigation adjustments */
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-item {
        margin: 0 0.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Container adjustments */
    .container {
        max-width: 960px;
    }
    
    /* Hero section */
    #hero {
        min-height: 90vh;
    }
    
    /* Card grid spacing */
    .card-img-top {
        height: 250px;
    }
    
    /* Services grid */
    .services .col-lg-4:nth-child(3n+1) {
        clear: left;
    }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Full hero height */
    #hero {
        min-height: 100vh;
    }
    
    /* Enhanced card images */
    .card-img-top {
        height: 280px;
    }
    
    /* Team grid enhancements */
    .team img,
    img[src*="team_"] {
        width: 140px;
        height: 140px;
    }
    
    /* Gallery grid */
    #gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    section {
        padding: 1.5rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on retina displays */
    .card-img-top,
    .team img,
    img[src*="team_"],
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #gallery,
    .hero-shapes {
        display: none;
    }
    
    /* Adjust colors for print */
    body {
        color: black;
        background: white;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    /* Ensure readable text */
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: high) {
    /* High contrast adjustments */
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .text-muted {
        color: #000 !important;
    }
}

/* Focus management for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Custom breakpoint for very small screens */
@media (max-width: 320px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    h1, .h1 {
        font-size: 1.5rem;
    }
    
    h2, .h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.375rem 1rem;
        font-size: 0.9rem;
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    /* iPad portrait specific styles */
    .hero .col-lg-6 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    .team .col-lg-2 {
        margin-bottom: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    /* iPad landscape specific styles */
    #hero {
        min-height: 70vh;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
} 