/* Mobile First - Base styles for mobile devices */
@media (max-width: 575px) {
    /* Typography adjustments for mobile */
    html {
        font-size: 14px;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Hero section mobile */
    .hero-section {
        min-height: 90vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    /* Disable autoplay and effects on mobile for Swiper */
    .swiper {
        --swiper-navigation-size: 25px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    /* Mobile card adjustments */
    .card-body {
  overflow-x: hidden !important;
        padding: 1.5rem;
    }
    
    /* Mobile contact form */
    .contact-form {
        padding: 2rem 1rem;
        margin: 0 1rem;
    }
    
    /* Mobile spacing */
    section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Mobile team member cards */
    .team-member {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Mobile process steps */
    .process-step::after {
        display: none;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Mobile buttons */
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Mobile navbar */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        margin: 0;
        border-bottom: 1px solid var(--primary-brown-light);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    html {
        font-size: 15px;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section h2 {
        font-size: 1.4rem;
    }
    
    /* Disable Swiper autoplay and effects on tablets */
    .swiper-wrapper {
        transition-duration: 300ms;
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    html {
        font-size: 15px;
    }
    
    .hero-section {
        min-height: 95vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.6rem;
    }
    
    /* Disable autoplay and effects on mobile/tablet */
    .swiper {
        --swiper-autoplay-delay: 0;
    }
    
    .swiper-wrapper {
        transition-duration: 300ms;
    }
    
    /* Team member grid adjustment */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Process steps for tablet */
    .process-step {
        margin-bottom: 3rem;
    }
    
    section {
        padding: 5rem 0;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    html {
        font-size: 16px;
    }
    
    /* Enable full Swiper functionality on desktop */
    .swiper {
        --swiper-autoplay-delay: 5000;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: flex;
        color: var(--primary-brown);
    }
    
    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        color: var(--primary-gold);
    }
    
    /* Desktop hover effects */
    .card:hover {
        transform: translateY(-10px);
    }
    
    .feature-item:hover,
    .feature-box:hover {
        transform: translateY(-5px);
    }
    
    /* Desktop team layout */
    .team-member {
        margin-bottom: 0;
    }
    
    /* Desktop process steps with arrows */
    .process-step::after {
        display: block;
    }
    
    section {
        padding: 6rem 0;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 3.2rem;
    }
    
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    /* Larger cards on XL screens */
    .card-body {
  overflow-x: hidden !important;
        padding: 2.5rem;
    }
    
    .contact-form {
        padding: 4rem;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section {
        padding: 0 2rem;
    }
    
    section {
        padding: 8rem 0;
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .navbar,
    .swiper-pagination,
    .swiper-button-next,
    .swiper-button-prev,
    footer {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    section {
        padding: 1rem 0;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility - Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable Swiper autoplay for users who prefer reduced motion */
    .swiper {
        --swiper-autoplay-delay: 0;
    }
    
    .swiper-wrapper {
        transform: none !important;
        transition: none !important;
    }
    
    /* Remove hover transforms */
    .card:hover {
        transform: none;
    }
    
    .feature-item:hover,
    .feature-box:hover {
        transform: none;
    }
}

/* Dark mode preference support (for future use) */
@media (prefers-color-scheme: dark) {
    /* Note: Dark mode styles are excluded as per requirements */
    /* This media query is here for future reference only */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--primary-charcoal-dark);
    }
    
    .btn {
        border-width: 3px;
    }
    
    .form-control {
        border-width: 3px;
    }
    
    .accordion-item {
        border-width: 3px;
    }
}

/* Focus improvements for accessibility */
@media (prefers-reduced-motion: no-preference) {
    /* Enhanced focus styles for better accessibility */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 3px solid var(--primary-gold);
        outline-offset: 2px;
    }
}

/* Container queries for modern browsers */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-body {
  overflow-x: hidden !important;
            padding: 1rem;
        }
        
        .card-title {
            font-size: 1rem;
        }
    }
}

/* Grid layout improvements */
@supports (display: grid) {
    @media (min-width: 992px) {
        .team-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
        }
        
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }
    }
}

/* Flexbox fallbacks */
@supports not (display: grid) {
    .team-grid,
    .services-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .team-grid > *,
    .services-grid > * {
        flex: 1 1 300px;
    }
}

/* Modern CSS features with fallbacks */
@supports (backdrop-filter: blur(10px)) {
    .navbar {
        backdrop-filter: blur(10px);
        background: rgba(245, 245, 220, 0.95);
    }
}

@supports not (backdrop-filter: blur(10px)) {
    .navbar {
        background: var(--primary-cream);
    }
}

/* Custom scrollbar for webkit browsers */
@supports (-webkit-appearance: none) {
    ::-webkit-scrollbar {
        width: 12px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--primary-cream-light);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--primary-brown-light);
        border-radius: 6px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-brown);
    }
} 