/* Mobile-First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile as per requirements */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Typography adjustments */
    .display-5 {
        font-size: 1.88rem;
        line-height: 1.3;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    h1, .h1 { font-size: 1.58rem; }
    h2, .h2 { font-size: 1.42rem; }
    h3, .h3 { font-size: 1.33rem; }
    h4, .h4 { font-size: 1.22rem; }
    h5, .h5 { font-size: 1rem; }
    h6, .h6 { font-size: 0.96rem; }
    
    /* Header adjustments */
    .navbar-brand {
        font-size: 1.28rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.66rem;
    }
    
    /* Hero section mobile optimization */
    .hero-section {
        min-height: 60vh;
        padding-top: 100px;
        padding-bottom: 2rem;
    }
    
    .hero-section .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    .hero-section::before {
        display: none; /* Remove decorative element on mobile */
    }
    
    /* Section spacing */
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 160px;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Services grid mobile layout */
    #services .col-md-6.col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Team images mobile size */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.59rem;
    }
    
    .btn-sm {
        width: auto;
    }
    
    /* Gallery mobile spacing */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer mobile layout */
    #footer .col-md-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Process steps mobile layout */
    .process-step {
        width: 50px;
        height: 50px;
        font-size: 1.22rem;
    }
    
    /* Contact info mobile layout */
    #contacts .col-md-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Breadcrumb mobile */
    .breadcrumb-section {
        margin-top: 70px;
        padding: 1rem 0;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Disable animations on mobile as per requirements */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 70vh;
        padding-top: 120px;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
    
    section {
        padding-top: 2.58rem;
        padding-bottom: 2.63rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .card-img-top {
        height: 190px;
    }
    
    #team img {
        width: 130px;
        height: 130px;
    }
    
    /* Adjust grid for medium screens */
    #services .col-md-6.col-lg-4:nth-child(3n) {
        clear: none;
    }
    
    #services .col-md-6:nth-child(2n+1) {
        clear: left;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .container {
        max-width: 960px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .navbar-brand {
        font-size: 1.33rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    #team img,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    #team img:hover {
        border-color: var(--secondary-color);
    }
    
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        padding: 1rem 0.75rem;
    }
    
    .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Print optimizations */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .container {
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .card {
        border: 1px solid #e1dfde;
        box-shadow: none;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .btn,
    .navbar,
    #footer,
    #gallery,
    [data-sal] {
        display: none;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black;
    }
    
    .hero-section {
        background: none;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-section::before {
        display: none;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn-primary {
        border: 2px solid var(--dark-color);
    }
    
    .form-control {
        border: 2px solid var(--dark-color);
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid transparent;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        border-bottom: 1px solid var(--primary-color);
    }
}

/* Dark mode support */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}

/* Focus visible support for better keyboard navigation */
@supports selector(:focus-visible) {
    .btn:focus:not(:focus-visible),
    .form-control:focus:not(:focus-visible),
    .nav-link:focus:not(:focus-visible) {
        outline: none;
    }
    
    .btn:focus-visible,
    .form-control:focus-visible,
    .nav-link:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
} 

.hero-section h1 {
    padding-top: 175px;
}