/* ===== RESPONSIVE DESIGN STYLES ===== */

/* ===== MOBILE FIRST APPROACH ===== */
/* Base styles are mobile-first, then enhanced for larger screens */

/* ===== EXTRA SMALL DEVICES (portrait phones, less than 576px) ===== */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    h1 {
        font-size: 1.81rem;
    }
    
    h2 {
        font-size: 1.54rem;
    }
    
    h3 {
        font-size: 1.27rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    /* Hero section */
    #hero {
        padding-top: 70px;
        text-align: center;
    }
    
    #hero h1 {
        margin-bottom: 1rem;
    }
    
    /* Section spacing */
    section {
        padding: 2.5rem 0;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Button sizing */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Services grid */
    #services .card-img-top {
        height: 150px;
    }
    
    /* Team member images */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Contact form */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer adjustments */
    #footer {
        text-align: center;
    }
    
    /* Timeline adjustments */
    .timeline .row {
        margin-bottom: 1rem;
    }
    
    .timeline .card::before {
        display: none;
    }
    
    /* Process section - stack vertically */
    #process .col-lg-2 {
        margin-bottom: 1.63rem;
    }
    
    /* Gallery - 2 columns on mobile */
    #gallery .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Hide decorative elements on mobile */
    .decorative-blob,
    #hero::before {
        display: none;
    }
    
    /* Disable hover animations on mobile */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* ===== SMALL DEVICES (landscape phones, 576px and up) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.70rem;
    }
    
    /* Hero section */
    #hero {
        padding-top: 80px;
    }
    
    /* Section spacing */
    section {
        padding: 3rem 0;
    }
    
    /* Services images */
    #services .card-img-top {
        height: 175px;
    }
    
    /* Team images */
    #team img {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery - 2 columns */
    #gallery .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ===== MEDIUM DEVICES (tablets, 768px and up) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 {
        font-size: 2.17rem;
    }
    
    h2 {
        font-size: 1.87rem;
    }
    
    /* Hero section */
    #hero {
        padding-top: 90px;
    }
    
    /* Section spacing */
    section {
        padding: 3.5rem 0;
    }
    
    /* Services images */
    #services .card-img-top {
        height: 200px;
    }
    
    /* Team images */
    #team img {
        width: 140px;
        height: 140px;
    }
    
    /* Gallery - 3 columns */
    #gallery .col-lg-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    /* Navbar adjustments */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* ===== LARGE DEVICES (desktops, 996px and up) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full desktop styles already defined in main.css */
    
    /* Minor adjustments for large screens */
    .container {
        max-width: 960px;
    }
    
    /* Team images */
    #team img {
        width: 150px;
        height: 150px;
    }
}

/* ===== EXTRA LARGE DEVICES (large desktops, 1200px and up) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for very large screens */
    section {
        padding: 5rem 0;
    }
    
    /* Larger typography for big screens */
    h1 {
        font-size: 2.57rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Team images */
    #team img {
        width: 150px;
        height: 150px;
    }
}

/* ===== ULTRA WIDE SCREENS (1400px and up) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== LANDSCAPE ORIENTATION ADJUSTMENTS ===== */
@media (orientation: landscape) and (max-height: 500px) {
    /* Reduce hero height on landscape mobile */
    #hero {
        min-height: 70vh;
        padding-top: 60px;
    }
    
    /* Reduce section padding */
    section {
        padding: 2rem 0;
    }
    
    /* Smaller navbar */
    .navbar {
        padding: 0.5rem 0;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .card {
        box-shadow: 0 5px 5px rgba(0,0,0,0.08);
    }
    
    .navbar {
        box-shadow: 0 2px 2px rgba(0,0,0,0.1);
    }
}

/* ===== PRINT MEDIA QUERIES ===== */
@media print {
    /* Hide interactive elements */
    .navbar,
    #footer,
    .btn,
    .form-control,
    .lightbox {
        display: none;
    }
    
    /* Optimize typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    /* Ensure proper page breaks */
    section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        break-after: avoid;
    }
    
    /* Remove shadows and effects for print */
    .card {
        box-shadow: none;
        border: 1px solid #d6d6d6;
    }
}

/* ===== ACCESSIBILITY MEDIA QUERIES ===== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    /* Remove hover animations */
    .card:hover,
    #gallery img:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Dark mode preference */

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 46px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover states on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* ===== CONTAINER BREAKPOINT ADJUSTMENTS ===== */
/* Custom container sizes for better responsive behavior */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== MOBILE NAVIGATION ENHANCEMENTS ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--white);
        border-radius: 0.5rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.66rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}

/* ===== MOBILE SPECIFIC ANIMATIONS DISABLED ===== */
@media (max-width: 767.98px) {
    /* Disable scroll animations on mobile for better performance */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Disable parallax effects */
    .parallax {
        transform: none !important;
    }
} 