/* BasketCraft - Responsive CSS */

/* Mobile First Approach */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile for better performance */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Typography adjustments */
    .display-4 {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    /* Hero section */
    #hero {
        min-height: 80vh;
        text-align: center;
    }
    
    #hero .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 180px;
    }
    
    /* Team section */
    #team img {
        width: 80px;
        height: 80px;
    }
    
    /* Process section circles */
    #process .rounded-circle {
        width: 50px !important;
        height: 50px !important;
    }
    
    #process .rounded-circle .h4 {
        font-size: 1rem;
    }
    
    /* Gallery grid adjustments */
    #gallery .col-6 {
        margin-bottom: 1rem;
    }
    
    /* Contact form */
    .form-control {
        padding: 0.6rem 0.8rem;
    }
    
    /* Footer */
    #footer .text-end {
        text-align: start !important;
        margin-top: 1rem;
    }
    
    /* Spacing adjustments */
    section {
        padding: 3rem 0;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.2rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 190px;
    }
    
    /* Team section */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Process section */
    #process .rounded-circle {
        width: 55px !important;
        height: 55px !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section */
    #hero {
        min-height: 90vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Team section */
    #team img {
        width: 110px;
        height: 110px;
    }
    
    /* Services grid adjustment */
    #services .col-md-6:nth-child(odd) {
        padding-right: 1rem;
    }
    
    #services .col-md-6:nth-child(even) {
        padding-left: 1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero section */
    #hero {
        min-height: 100vh;
    }
    
    /* Navigation */
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    
    /* Team section layout */
    #team .col-lg-2 {
        margin-bottom: 2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max width adjustment */
    .container {
        max-width: 1140px;
    }
    
    /* Hero section */
    #hero {
        min-height: 100vh;
    }
    
    /* Enhanced spacing for larger screens */
    section {
        padding: 6rem 0;
    }
    
    /* Team section enhanced layout */
    #team .row {
        justify-content: center;
    }
    
    #team .col-lg-2 {
        flex: 0 0 18%;
        max-width: 18%;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images look crisp on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    /* Reduce hero height on landscape mobile */
    #hero {
        min-height: 70vh;
    }
    
    /* Adjust section padding */
    section {
        padding: 2rem 0;
    }
}

/* Print styles */
@media print {
    /* Hide navigation and footer for printing */
    #header,
    #footer {
        display: none !important;
    }
    
    /* Ensure proper page breaks */
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    /* Remove background colors and shadows for print */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ensure text is readable */
    body {
        color: #000 !important;
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    /* Show URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Accessibility improvements */
@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;
    }
    
    /* Remove hover effects */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    #team img:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    /* Enhance contrast for better accessibility */
    :root {
        --primary-color: #000000;
        --text-dark: #000000;
        --text-light: #000000;
    }
    
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
    
    /* Footer high contrast overrides */
    #footer {
        background-color: #000000 !important;
        border-top: 3px solid #ffffff !important;
    }
    
    #footer h5, #footer h6 {
        color: #ffffff !important;
        font-weight: 700 !important;
        text-decoration: underline !important;
    }
    
    #footer p, #footer li, #footer small, #footer .small {
        color: #ffffff !important;
    }
    
    #footer a {
        color: #ffffff !important;
        text-decoration: underline !important;
        font-weight: 700 !important;
        border-bottom: 1px solid #ffffff !important;
    }
    
    #footer a:hover, #footer a:focus {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
}

/* Dark mode support */

/* Touch device optimizations */
@media (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Focus improvements for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
} 