/* ===== MOBILE FIRST RESPONSIVE DESIGN ===== */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    padding-top: 125px;
}
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    /* No animations on mobile for performance */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Stack team members vertically */
    #team .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* Adjust gallery grid */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Footer adjustments */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    padding-top: 125px;
}
    
    .card-img-top {
        height: 200px;
    }
    
    /* Reduce animations on smaller screens */
    [data-sal-delay] {
        animation-delay: 0.1s !important;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    /* Team section adjustments */
    #team .col-md-6:nth-child(odd) {
        padding-right: 2rem;
    }
    
    #team .col-md-6:nth-child(even) {
        padding-left: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-section h1 {
        font-size: 3.5rem;
    padding-top: 125px;
}
    
    .section-title {
        font-size: 2.75rem;
    }
    
    .card-img-top {
        height: 240px;
    }
    
    /* Enhanced hover effects for larger screens */
    .card:hover {
        transform: translateY(-8px);
    }
    
    .btn:hover {
        transform: translateY(-3px);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 4rem;
    padding-top: 125px;
}
    
    .section-title {
        font-size: 3rem;
    }
    
    .card-img-top {
        height: 260px;
    }
}

/* ===== MOBILE NAVIGATION ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .btn:hover {
        transform: none;
    }
    
    img:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    #footer,
    .btn,
    [data-sal] {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    .hero-section {
        min-height: auto;
        page-break-after: always;
    }
    
    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #2E7D32;
        --primary-brown: #3E2723;
        --dark-earth: #1B5E20;
    }
    
    .card {
        border: 2px solid #333;
    }
    
    .btn-primary {
        border: 2px solid #333;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    padding-top: 125px;
}
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* ===== GRID ADJUSTMENTS ===== */
@media (max-width: 767.98px) {
    /* Services grid - 1 column on mobile */
    #services .col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Features grid - stack vertically */
    #features .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* FAQ grid - single column */
    #faq .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Services grid - 2 columns on tablet */
    #services .col-lg-4:nth-child(3n+1) {
        clear: left;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    /* Reduce image sizes on mobile */
    .card-img-top {
        height: 160px;
    }
    
    /* Simplify shadows on mobile */
    .card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* ===== SPECIFIC SECTION RESPONSIVE BEHAVIOR ===== */

/* Hero Section Mobile */
@media (max-width: 767.98px) {
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    .hero-section .col-lg-6:first-child {
        margin-top: 2rem;
    }
}

/* Team Section Mobile */
@media (max-width: 575.98px) {
    #team .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
}

/* Process Section Mobile */
@media (max-width: 767.98px) {
    #process .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    #process .rounded-circle {
        width: 50px;
        height: 50px;
    }
}

/* Contact Section Mobile */
@media (max-width: 991.98px) {
    #contacts .row {
        flex-direction: column;
    }
    
    #contacts .col-lg-6:last-child {
        margin-top: 3rem;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-decoration,
    .hero-decoration::before {
        display: none;
    }
    
    .card,
    .btn,
    img,
    .nav-link {
        transition: none !important;
    }
    
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
} 