/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First Approach */
@media (max-width: 575.98px) {
    /* Extra Small Devices */
    
    /* Typography adjustments */
    .display-4 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h2, .h2 {
        font-size: 1.4rem;
    }
    
    h3, .h3 {
        font-size: 1.2rem;
    }
    
    /* Header adjustments */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        text-align: center;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    #hero .container {
        text-align: center;
    }
    
    #hero .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Button adjustments */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Grid adjustments */
    .row.g-4 {
        --bs-gutter-y: 1.5rem;
    }
    
    /* Process steps */
    .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    /* Team section */
    #team .col-md-6.col-lg-3 {
        margin-bottom: 2rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Gallery adjustments */
    #gallery img {
        height: 200px;
        margin-bottom: 0.5rem;
    }
    
    /* Contact section */
    #contacts .col-md-4 {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* Shape animations disabled */
    .shape-blob-1,
    .shape-blob-2 {
        display: none;
    }
}

/* Small Devices (landscape phones) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    /* Hero adjustments */
    #hero {
        min-height: 90vh;
    }
    
    /* Card grid adjustments */
    .col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Process steps better spacing */
    .col-md-6.col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1.5rem;
    }
}

/* Medium Devices (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Tablet-specific adjustments */
    .display-4 {
        font-size: 1.85rem;
    }
    
    /* Card adjustments for tablets */
    .card-img-top {
        height: 220px;
    }
    
    /* Better spacing for 2-column layouts */
    .col-md-6:nth-child(odd) {
        padding-right: 1rem;
    }
    
    .col-md-6:nth-child(even) {
        padding-left: 1rem;
    }
    
    /* Process steps - 2 per row */
    .col-md-6.col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1.5rem;
    }
    
    /* Team section - 2 per row */
    .col-md-6.col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2rem;
    }
}

/* Large Devices (desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Fine-tune for smaller desktops */
    .container {
        max-width: 960px;
    }
    
    /* Adjust card heights for consistency */
    .card-img-top {
        height: 240px;
    }
}

/* Extra Large Devices */
@media (min-width: 1200px) {
    /* Ensure content doesn't get too wide */
    .container {
        max-width: 1140px;
    }
    
    /* Optimal image sizes */
    .card-img-top {
        height: 250px;
    }
    
    /* Team images optimal size */
    #team img {
        width: 180px;
        height: 180px;
    }
}

/* Landscape Orientation Specific */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height on landscape mobile */
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    /* Smaller section padding */
    section {
        padding: 2rem 0;
    }
    
    /* Compact navbar */
    .navbar {
        padding: 0.5rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows for retina */
    .card {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .btn {
        border-width: 1px;
    }
}

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    .navbar,
    .hero-shapes,
    .btn,
    #footer {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5 {
        color: black;
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    /* Ensure URLs are visible */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}

/* Accessibility Improvements */
@media (prefers-contrast: high) {
    /* High contrast mode */
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-outline-primary {
        border-color: #000;
        color: #000;
    }
}

/* Reduced Data Usage */
@media (prefers-reduced-data: reduce) {
    /* Disable background images and gradients */
    #hero {
        background: var(--color-primary-light);
    }
    
    .shape-blob-1,
    .shape-blob-2 {
        display: none;
    }
    
    /* Reduce image quality */
    img {
        image-rendering: optimizeSpeed;
    }
}

/* Focus Management for Keyboard Navigation */
@media (any-hover: none) {
    /* Touch devices - remove hover effects */
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .card:hover .card-img-top {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Container Queries for Modern Browsers */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-title {
            font-size: 1rem;
        }
        
        .card-text {
            font-size: 0.875rem;
        }
    }
}

/* Utility Classes for Responsive Display */
.d-mobile-none {
    display: none;
}

@media (min-width: 768px) {
    .d-mobile-none {
        display: block;
    }
    
    .d-desktop-none {
        display: none;
    }
}

/* Responsive Typography Scale */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1025px) {
    html {
        font-size: 16px;
    }
} 