/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .h2 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    #hero .col-lg-6:first-child {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Section padding */
    section {
        padding: 3rem 0;
    }
    
    .py-5 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Card spacing */
    .g-4 > * {
        margin-bottom: 1.5rem;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer adjustments */
    #footer .col-lg-4 {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    /* Gallery adjustments */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Process steps */
    .rounded-circle {
        width: 50px;
        height: 50px;
    }
    
    /* Breadcrumb */
    .breadcrumb-item img {
        width: 16px;
        height: 16px;
    }
    
    /* Disable animations on mobile to improve performance */
    * {
        animation-duration: 0s;
        transition-duration: 0.1s;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .h2 {
        font-size: 1.75rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    #hero {
        min-height: 80vh;
    }
    
    .py-5 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    .h2 {
        font-size: 1.875rem;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    #hero {
        min-height: 90vh;
    }
    
    .py-5 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* Two column layout for cards */
    .row.g-4 .col-lg-4:nth-child(3n+1) {
        clear: left;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    #hero {
        min-height: 100vh;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-4 {
        font-size: 2.75rem;
    }
    
    .card-img-top {
        height: 240px;
    }
    
    /* Enhanced hover effects for larger screens */
    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .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:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    .card:hover .card-img-top {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .text-center:hover .rounded-circle {
        transform: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    #footer,
    .btn,
    .breadcrumb {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .py-5 {
        padding: 1rem 0;
    }
    
    a {
        text-decoration: none;
        color: #333;
    }
    
    .text-primary {
        color: #333;
    }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #333;
    }
    
    .btn-primary {
        border: 2px solid #000;
        font-weight: 600;
    }
    
    .text-muted {
        color: #333;
    }
}

/* Focus improvements for keyboard navigation */
@media (min-width: 768px) {
    .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 4px;
    }
    
    .card:focus-within {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .btn-primary:hover {
        transform: none;
        background-color: var(--primary-color);
    }
    
    .navbar-nav .nav-link:hover::after {
        width: 0;
    }
    
    .navbar-nav .nav-link.active::after {
        width: 100%;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
} 

body {
    overflow-x: hidden;
}