/* Responsive CSS for MapCraft Studio Template */

/* Mobile First Approach - Base styles for mobile */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.911px) {
    /* Typography adjustments */
    .display-4 {
        font-size: 1.80rem;
    }
    
    h1, .h1 {
        font-size: 1.66rem;
    }
    
    h2, .h2 {
        font-size: 1.53rem;
    }
    
    h3, .h3 {
        font-size: 1.42rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.35rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        text-align: center;
    }
    
    /* Hero section adjustments */
    #hero {
        padding-top: 2rem;
        padding-bottom: 2rem;
        text-align: center;
    }
    
    #hero .btn-lg {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 180px;
    }
    
    /* Process and Team grid adjustments */
    .col-lg-2-4 {
        margin-bottom: 2rem;
    }
    
    /* Contact form adjustments */
    .btn {
        width: 100%;
    }
    
    /* Spacing adjustments */
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Footer adjustments */
    #footer .col-md-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* NO animations on mobile */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.99px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .col-lg-2-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Reduced animations on small devices */
    @media (prefers-reduced-motion: no-preference) {
        .card:hover {
            transform: translateY(-2px);
        }
        
        #gallery img:hover {
            transform: scale(1.02);
        }
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.46rem;
    }
    
    .col-lg-2-4 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1.67rem;
    }
    
    #hero {
        text-align: left;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    /* Team grid for tablets */
    #team .col-lg-2-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .card-img-top {
        height: 240px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .card-img-top {
        height: 260px;
    }
    
    /* Enhanced hover effects for large screens */
    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 24px rgba(0,0,0,0.15);
    }
    
    #gallery img:hover {
        transform: scale(1.08);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .card,
    .btn,
    .navbar-nav .nav-link,
    #gallery img,
    .form-control {
        transition: none;
    }
    
    .card:hover,
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Print media adjustments */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    #footer,
    .form-control,
    .form-check {
        display: none;
    }
    
    /* Adjust layout for print */
    .container {
        width: 100%;
        max-width: none;
    }
    
    .row {
        display: block;
    }
    
    .col-md-6,
    .col-lg-4,
    .col-lg-3,
    .col-lg-2-4 {
        width: 100%;
        float: none;
        margin-bottom: 1rem;
    }
    
    /* Typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    /* Card styles for print */
    .card {
        border: 1px solid #d3cdce;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .card-img-top {
        display: none;
    }
    
    /* Remove backgrounds and shadows */
    .bg-light,
    .bg-dark {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none;
    }
}

/* Accessibility improvements */
@media (min-width: 768px) {
    /* Larger click targets for better accessibility */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-nav .nav-link {
        min-height: 44px;
    }
}

/* Focus improvements for keyboard navigation */
@media (min-width: 992px) {
    .card:focus-within {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        outline: 2px solid var(--primary-color);
    }
}

/* Container width adjustments */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Gallery responsive grid */
@media (max-width: 575.98px) {
    #gallery .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #gallery .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Team section responsive adjustments */
@media (max-width: 575.98px) {
    #team img {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    #team .col-lg-2-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Process section responsive grid */
@media (max-width: 575.98px) {
    #process .rounded-circle {
        width: 50px;
        height: 50px;
    }
    
    #process .rounded-circle span {
        font-size: 0.92rem;
    }
}

/* FAQ responsive layout */
@media (max-width: 767.98px) {
    #faq .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Contact form responsive adjustments */
@media (max-width: 767.98px) {
    #contacts .col-lg-8 {
        margin-bottom: 2rem;
    }
    
    #contacts .col-lg-4 .card {
        margin-top: 0;
    }
}

/* Services grid responsive behavior */
@media (max-width: 575.98px) {
    #services .col-lg-4 {
        margin-bottom: 2rem;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    #services .col-md-6:nth-child(odd) {
        padding-right: 0.75rem;
    }
    
    #services .col-md-6:nth-child(even) {
        padding-left: 0.75rem;
    }
}

/* Price plan responsive layout */
@media (max-width: 767.98px) {
    #priceplan .col-md-4 {
        margin-bottom: 2rem;
    }
    
    #priceplan .card.border-primary::before {
        top: -15px;
        font-size: 0.89rem;
    }
} 