/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-4 {
        font-size: 1.75rem;
    }
    
    .h1, h1 {
        font-size: 1.75rem;
    }
    
    .h2, h2 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    /* Hero Section */
    #hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    #hero .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Process Steps */
    .process-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Team Members */
    .team-member img,
    .leader-card img {
        width: 80px;
        height: 80px;
    }
    
    /* Statistics */
    .stat-number {
        font-size: 2rem !important;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .form-control {
        padding: 0.5rem 0.75rem;
    }
    
    /* Footer */
    #footer {
        text-align: center;
    }
    
    #footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* No animations on mobile */
    * {
        animation-duration: 0ms !important;
        transition-duration: 0ms !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    .display-4 {
        font-size: 2rem;
    }
    
    .h1, h1 {
        font-size: 2rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
    }
    
    /* Process Steps */
    .process-step-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    /* Team Members */
    .team-member img,
    .leader-card img {
        width: 90px;
        height: 90px;
    }
    
    /* Cards */
    .card-img-top {
        height: 180px;
    }
    
    /* No animations on small screens */
    * {
        animation-duration: 0ms !important;
        transition-duration: 0ms !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    #hero {
        min-height: 70vh;
    }
    
    /* Process Steps */
    .process-step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Team Members */
    .team-member img,
    .leader-card img {
        width: 100px;
        height: 100px;
    }
    
    /* Cards */
    .card-img-top {
        height: 190px;
    }
    
    /* Gallery Grid */
    #gallery .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero Section */
    #hero {
        min-height: 100vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Team Members */
    .team-member img,
    .leader-card img {
        width: 110px;
        height: 110px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Hero Section */
    #hero {
        min-height: 100vh;
    }
    
    /* Container max width */
    .container {
        max-width: 1140px;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
    
    /* Team Members */
    .team-member img,
    .leader-card img {
        width: 120px;
        height: 120px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    #hero .display-4 {
        font-size: 1.5rem;
    }
    
    #hero .lead {
        font-size: 0.9rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark Mode Support */

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    /* Remove 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: none;
    }
    
    .feature-card:hover,
    .info-card:hover,
    .category-card:hover,
    .certification-card:hover,
    .storage-tip:hover,
    .mission-card:hover,
    .value-card:hover,
    .vision-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    /* Hide interactive elements */
    .btn,
    .navbar,
    #header,
    #footer,
    .breadcrumb {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black !important;
        background: white !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .row {
        margin: 0 !important;
    }
    
    .col-lg-6,
    .col-md-6,
    .col-sm-6 {
        width: 50% !important;
        float: left;
    }
    
    .col-lg-4,
    .col-md-4,
    .col-sm-4 {
        width: 33.333% !important;
        float: left;
    }
    
    .col-lg-3,
    .col-md-3,
    .col-sm-3 {
        width: 25% !important;
        float: left;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .card {
        page-break-inside: avoid;
        break-inside: avoid;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        break-after: avoid;
    }
}

/* Accessibility Enhancements */
@media (prefers-contrast: high) {
    /* Increase contrast for better accessibility */
    .card {
        border: 2px solid #000 !important;
    }
    
    .btn-primary {
        background-color: #000 !important;
        border-color: #000 !important;
        color: #fff !important;
    }
    
    .text-muted {
        color: #666 !important;
    }
}

/* Focus Management for Keyboard Navigation */
@media (any-hover: none) {
    /* Touch devices - remove hover effects */
    .card:hover,
    .feature-card:hover,
    .btn-primary:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Specific fixes for Internet Explorer (if needed) */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    /* IE specific styles */
    .card {
        display: block;
    }
    
    .d-flex {
        display: block;
    }
} 