/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2.2rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.8rem; }
    .display-5 { font-size: 1.6rem; }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
    
    p.lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        font-size: 1rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    #hero .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    #hero .d-flex {
        flex-direction: column;
    }
    
    /* Disable animations on mobile for performance */
    .shape-1, .shape-2 {
        display: none;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Feature Icons */
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon-sm {
        width: 50px;
        height: 50px;
    }
    
    /* Process Numbers */
    .process-number .badge {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Contact Form */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Gallery */
    #gallery .col-lg-4,
    #gallery .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Team Images */
    [id^="team_"] {
        width: 80px;
        height: 80px;
    }
    
    /* Footer */
    #footer .col-lg-4,
    #footer .col-lg-2,
    #footer .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Hide decorative elements on mobile */
    .overflow-hidden .position-absolute {
        display: none;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-5 { font-size: 1.8rem; }
    
    #hero .btn {
        width: auto;
        margin-right: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    [id^="team_"] {
        width: 100px;
        height: 100px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-5 { font-size: 2.2rem; }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    [id^="team_"] {
        width: 110px;
        height: 110px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    #hero {
        min-height: 100vh;
    }
    
    /* Enable hover effects on desktop */
    .card:hover {
        transform: translateY(-5px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    #gallery img:hover {
        transform: scale(1.05);
    }
    
    [id^="services-item-"]:hover {
        transform: translateY(-3px);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-5 { font-size: 2.5rem; }
    
    p.lead {
        font-size: 1.2rem;
    }
}

/* Ultra Wide Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Print Styles */
@media print {
    .container {
        max-width: none !important;
    }
    
    .col-lg-12,
    .col-lg-6,
    .col-lg-4,
    .col-lg-3,
    .col-md-6,
    .col-md-4 {
        width: 100% !important;
        float: none !important;
    }
    
    .py-5 {
        padding: 1rem 0 !important;
    }
    
    .mb-5 {
        margin-bottom: 1rem !important;
    }
    
    .card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    [id^="team_"],
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .card,
    .btn,
    #gallery img,
    [id^="services-item-"],
    [id^="team_"],
    .navbar-nav .nav-link,
    .form-control {
        transition: none !important;
        transform: none !important;
    }
    
    .card:hover,
    .btn:hover,
    #gallery img:hover,
    [id^="services-item-"]:hover {
        transform: none !important;
    }
    
    .shape-1,
    .shape-2 {
        display: none;
    }
}

/* Dark Mode Support */

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* Minimum touch target size */
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .card {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    /* Remove hover states on touch devices */
    .btn:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Accessibility - Focus States */
@media (hover: none) {
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Container Queries Support (Future-proofing) */
@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.9rem;
        }
    }
} 

body {
    overflow-x: hidden;
}