/* CoLearn Hub - Responsive CSS */
/* Mobile-first approach with prefers-reduced-motion support */

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .sal-animate {
        transform: none !important;
        opacity: 1 !important;
    }
    
    .card:hover {
        transform: none !important;
    }
    
    .btn-primary:hover {
        transform: none !important;
    }
}

/* Base Mobile Styles (320px and up) */
@media (max-width: 575.98px) {
    /* NO ANIMATIONS FOR MOBILE */
    .sal-animate,
    .card:hover,
    .feature-card:hover,
    .btn-primary:hover {
        transform: none !important;
    }
    
    /* Typography */
    .display-4 {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 70px;
        padding-bottom: 2rem;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    padding-top: 150px;
}
    
    .hero-shapes {
        display: none;
    }
    
    /* Spacing */
    section {
        padding: 3rem 0;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .service-card .card-img-top {
        height: 180px;
    }
    
    /* Team */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control {
        padding: 10px 12px;
    }
    
    /* Gallery */
    .gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* High Contrast Footer for Mobile */
    footer {
        background: #1a1a1a !important;
        color: #f0f0f0 !important;
    }
    
    footer h5, footer h6 {
        color: #ffffff !important;
    }
    
    footer p, footer small {
        color: #f0f0f0 !important;
    }
    
    footer a {
        color: #93c5fd !important;
        text-decoration: underline !important;
    }
    
    footer a:hover {
        color: #dbeafe !important;
    }
    
    .contact-info {
        background: transparent !important;
        color: #ffffff !important;
    }
    
    .contact-info p {
        color: #ffffff !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding-top: 80px;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .service-card .card-img-top {
        height: 190px;
    }
    
    .team-member img {
        width: 110px;
        height: 110px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.2rem;
    }
    
    .hero-section {
        padding-top: 90px;
    }
    
    section {
        padding: 4.5rem 0;
    }
    
    .service-card .card-img-top {
        height: 195px;
    }
    
    .team-member img {
        width: 115px;
        height: 115px;
    }
    
    /* Two columns for medium devices */
    .team .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .display-4 {
        font-size: 2.3rem;
    }
    
    .hero-section {
        padding-top: 95px;
    }
    
    section {
        padding: 4.8rem 0;
    }
    
    .service-card .card-img-top {
        height: 200px;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding-top: 100px;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .container {
        max-width: 1140px;
    }
    
    .service-card .card-img-top {
        height: 200px;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section {
        padding-top: 110px;
    }
    
    section {
        padding: 5.5rem 0;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .service-card .card-img-top,
    .team-member img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .footer,
    .hero-shapes {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 1rem 0;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000 !important;
    }
    
    .btn-primary {
        background: #000 !important;
        border-color: #000 !important;
        color: #fff !important;
    }
    
    .text-primary {
        color: #000 !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .feature-card:hover,
    .btn:hover {
        transform: none !important;
    }
    
    .btn,
    .nav-link,
    .form-control {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Dark mode support (if user prefers) */