/* Responsive Styles for Mobile and Tablet */

/* Mobile First Approach - Base styles for mobile */
@media (max-width: 576px) {
    /* Typography adjustments for mobile */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navbar brand size reduction */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 80vh;
        padding-top: 100px;
    }
    
    #hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    #hero .lead {
        font-size: 1rem;
    }
    
    /* Section padding reduction */
    section {
        padding: 2rem 0;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Team member images */
    #team img {
        width: 100px;
        height: 100px;
    }
    
    /* Process section circles */
    #process .rounded-circle {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Contact form adjustments */
    .form-control {
        margin-bottom: 1rem;
    }
    
    /* Gallery grid adjustments */
    #gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Footer adjustments */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Hide decorative elements on mobile */
    .hero-blob {
        display: none;
    }
    
    /* Disable animations on mobile to respect reduced motion */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Ensure all images are always visible on mobile */
    img {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    
    /* Disable hover effects on mobile */
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Small tablets and large phones */
@media (min-width: 577px) and (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    #hero {
        min-height: 85vh;
        padding-top: 90px;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .card-img-top {
        height: 190px;
    }
    
    #team img {
        width: 110px;
        height: 110px;
    }
    
    /* Disable scroll-based animations on tablets */
    @media (max-width: 768px) {
        [data-sal] {
            opacity: 1 !important;
            transform: none !important;
        }
        
        /* Ensure images are always visible */
        img {
            opacity: 1 !important;
            visibility: visible !important;
            transform: none !important;
        }
    }
}

/* Medium tablets */
@media (min-width: 769px) and (max-width: 992px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    #hero {
        min-height: 90vh;
        padding-top: 80px;
    }
    
    section {
        padding: 3.5rem 0;
    }
    
    .card-img-top {
        height: 195px;
    }
    
    #team img {
        width: 115px;
        height: 115px;
    }
}

/* Large tablets and small desktops */
@media (min-width: 993px) and (max-width: 1200px) {
    section {
        padding: 4rem 0;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
}

/* Large screens and desktops */
@media (min-width: 1201px) {
    .container {
        max-width: 1200px;
    }
    
    h1 {
        font-size: 2.75rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    #hero {
        min-height: 100vh;
    }
    
    #hero h1 {
        font-size: 3rem;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    #hero {
        min-height: 70vh;
        padding-top: 80px;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* High DPI screens */
@media (min-resolution: 2dppx) {
    .card {
        border-width: 0.5px;
    }
    
    .form-control {
        border-width: 1px;
    }
}

/* Print styles */
@media print {
    .navbar,
    #hero,
    footer,
    .btn,
    #gallery {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility improvements for reduced motion */
@media (prefers-reduced-motion: reduce) {
    /* Override scroll behavior */
    html {
        scroll-behavior: auto;
    }
    
    /* 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 transform effects */
    .card:hover {
        transform: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
    
    #gallery img:hover {
        transform: none !important;
    }
    
    /* Remove floating animations */
    .hero-blob {
        animation: none !important;
    }
    
    /* Ensure all images are always visible when reduced motion is preferred */
    img {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    
    /* Ensure fade-in class doesn't hide images */
    .fade-in {
        opacity: 1 !important;
    }
}

/* Dark mode support */

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

/* Skip navigation link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

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

/* Improved contrast for better accessibility */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--neutral-dark);
    }
    
    .btn-outline-primary {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Large text support */
@media (prefers-reduced-data: reduce) {
    /* Simplified styles for low bandwidth */
    .hero-blob,
    .card:hover,
    [data-lightbox] {
        display: none;
    }
}

/* Container adjustments for different screen sizes */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Navigation improvements for mobile */
@media (max-width: 992px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e2e8f0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
@media (max-width: 768px) {
    table {
        font-size: 0.875rem;
    }
    
    .table-responsive {
        border: none;
    }
}