/* Mobile First Responsive Design */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Typography */
    .display-4 {
        font-size: 1.95rem;
        line-height: 1.3;
    }
    
    .h3 {
        font-size: 1.42rem;
    }
    
    .h4 {
        font-size: 1.29rem;
    }
    
    .h5 {
        font-size: 1.15rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.43rem;
    }
    
    .navbar-collapse {
        background-color: #fff;
        border-radius: 8px;
        margin-top: 10px;
        padding: 15px;
        box-shadow: 0 6px 6px rgba(0,0,0,0.1);
    }
    
    /* Hero Section */
    #hero {
        padding: 120px 0 60px;
        text-align: center;
    }
    
    #hero .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    /* Cards */
    .card {
        margin-bottom: 20px;
    }
    
    /* Team Images */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Contact Form */
    .form-control {
        margin-bottom: 15px;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 15px;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 30px;
    }
    
    /* Process Steps */
    #process .col-lg-2 {
        margin-bottom: 30px;
    }
    
    #process .rounded-circle {
        width: 50px;
        height: 50px;
    }
    
    /* Disable animations on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    /* Hero adjustments */
    #hero {
        padding: 100px 0 60px;
    }
    
    .display-4 {
        font-size: 2.26rem;
    }
    
    /* Team layout */
    #team .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 30px;
    }
    
    /* Process layout */
    #process .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 30px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* Hero section */
    #hero {
        padding: 80px 0;
    }
    
    /* Services grid */
    #services .col-lg-4 {
        margin-bottom: 30px;
    }
    
    /* Team grid */
    #team .col-lg-2 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    /* Features grid */
    #faf3bctures .col-lg-3 {
        margin-bottom: 30px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    /* Fine-tune spacing for large screens */
    section {
        padding: 90px 0;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Optimize for very large screens */
    section {
        padding: 100px 0;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 640px) {
    #hero {
        min-height: auto;
        padding: 100px 0 50px;
    }
    
    .vh-100 {
        height: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for retina displays */
    .navbar-brand {
        font-weight: 500;
    }
    
    .card {
        border-width: 0.5px;
    }
}

/* Dark mode support */

/* Print styles */
@media print {
    .navbar,
    .btn,
    #footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    .card {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    section {
        padding: 20px 0;
    }
}

/* Accessibility - Motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* Custom grid adjustments for specific sections */
@media (max-width: 991.98px) {
    /* About features - 2 columns on tablet */
    #about .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 30px;
    }
    
    /* Services - 2 columns on tablet */
    #services .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Pricing - stack on tablet */
    #priceplan .col-lg-4 {
        margin-bottom: 30px;
    }
}

@media (max-width: 575.98px) {
    /* Single column layout for mobile */
    #about .col-lg-3,
    #services .col-lg-4,
    #ffecbatures .col-lg-3,
    #team .col-lg-2,
    #process .col-lg-2 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    /* FAQ - single column */
    #faq .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Blog - single column */
    #blog .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    /* Gallery - 2 columns */
    #gallery .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Form responsiveness */
@media (max-width: 767.98px) {
    #contacts .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* Navbar toggler improvements */
@media (max-width: 991.98px) {
    .navbar-toggler {
        border: none;
        padding: 4px 8px;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: 10px;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 10px;
    }
}

/* Image optimization for mobile */
@media (max-width: 767.98px) {
    .card-img-top,
    #gallery img {
        height: auto;
        max-height: 250px;
    }
    
    #hero img {
        margin-top: 30px;
        max-height: 300px;
    }
} 