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

/* ===== MOBILE (DEFAULT) ===== */
/* Base styles already defined in main.css for mobile */

/* Disable animations on mobile for better performance */
@media (max-width: 767.98px) {
    /* Disable all animations and transitions on mobile */
    [data-sal],
    [data-sal-duration],
    [data-sal-delay] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Remove hover effects on mobile */
    .card:hover {
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }
    
    .btn-primary:hover {
        transform: none !important;
    }
}

/* ===== MOBILE PORTRAIT (Extra Small) - Default ===== */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Typography adjustments */
    .display-4 {
        font-size: 1.89rem !important;
    }
    
    .h1, h1 {
        font-size: 1.53rem;
    }
    
    .h2, h2 {
        font-size: 1.46rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.22rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    /* Hero section mobile */
    .hero-section {
        min-height: 50vh;
        padding: 1.5rem 0;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 150px;
    }
    
    /* Team member images */
    .team-member img,
    img[style*="width: 120px"] {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Button adjustments */
    .btn-primary {
        padding: 0.875rem 1.25rem;
        width: 100%;
        margin-bottom: 0.65rem;
    }
    
    /* Section spacing */
    section,
    .py-5 {
        padding: 2rem 0 !important;
    }
    
    /* Footer adjustments */
    footer .row > div {
        margin-bottom: 1.74rem;
        text-align: center;
    }
}

/* ===== MOBILE LANDSCAPE (Small) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .display-4 {
        font-size: 2rem !important;
    }
    
    /* Team grid adjustments */
    .col-md-6.col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ===== TABLET PORTRAIT (Medium) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Re-enable animations for tablet+ */
    [data-sal] {
        opacity: 0;
    }
    
    .hero-section {
        min-height: 70vh;
    }
    
    .display-4 {
        font-size: 2.52rem !important;
    }
    
    /* Grid adjustments for medium screens */
    .col-md-6.col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1.62rem;
    }
    
    .col-md-6.col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 1.71rem;
    }
    
    /* Team layout */
    .col-md-6.col-lg-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    /* Navigation improvements */
    .navbar-nav {
        margin-left: auto;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* ===== TABLET LANDSCAPE (Large) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .display-4 {
        font-size: 3rem !important;
    }
    
    /* Restore full grid layout */
    .col-lg-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    /* Container adjustments */
    .container {
        max-width: 960px;
    }
}

/* ===== DESKTOP (Extra Large) ===== */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .display-4 {
        font-size: 3.57rem !important;
    }
    
    /* Full desktop layout */
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for desktop */
    section,
    .py-5 {
        padding: 5rem 0 !important;
    }
    
    /* Larger cards on desktop */
    .card-img-top {
        height: 250px;
    }
    
    /* Desktop-specific enhancements */
    .card:hover {
        transform: translateY(-5px);
    }
}

/* ===== ULTRA-WIDE SCREENS ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .display-4 {
        font-size: 4rem !important;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }
    
    .btn-primary:hover {
        transform: none !important;
        background-color: var(--primary-color) !important;
    }
    
    /* Increase touch targets */
    .btn,
    .nav-link,
    .breadcrumb-item {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows for retina displays */
    .card {
        box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.1), 0 5px 2px 0 rgba(0, 0, 0, 0.06);
    }
    
    .navbar {
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 500px) {
    /* Optimize for landscape mobile devices */
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    section,
    .py-5 {
        padding: 1.5rem 0 !important;
    }
}

/* ===== DARK MODE PREPARATION ===== */

/* ===== PRINT STYLES ===== */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    footer,
    .breadcrumb {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .container {
        max-width: none;
        width: 100%;
    }
    
    /* Prevent page breaks in important content */
    .card,
    section {
        page-break-inside: avoid;
    }
    
    /* Show URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #5b5b5b;
    }
}

/* ===== ACCESSIBILITY RESPONSIVE FEATURES ===== */
@media (prefers-reduced-motion: reduce) {
    /* Already handled in main.css but reinforced here */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 767.98px) {
    /* Reduce complexity on mobile */
    .hero-section::before {
        display: none;
    }
    
    /* Simplify shadows */
    .card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .navbar {
        backdrop-filter: none;
        background-color: white !important;
    }
} 

.hero-section h1 {
    padding-top: 200px;
}