/* ==========================================================================
   Responsive Design Enhancements
   Mobile-first approach with Bootstrap 5 compatibility
   ========================================================================== */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
        min-height: 80vh;
    }
    
    .hero-section .display-4 {
        font-size: 1.56rem;
        line-height: 1.3;
    }
    
    .hero-section .h4 {
        font-size: 1.13rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    /* Typography scaling */
    h1, .h1 {
        font-size: 1.46rem;
    }
    
    h2, .h2 {
        font-size: 1.35rem;
    }
    
    h3, .h3, h4, .h4 {
        font-size: 1.13rem;
    }
    
    /* Section padding */
    section {
        padding: 3rem 0;
    }
    
    /* Team photos */
    .team img {
        width: 80px;
        height: 80px;
    }
    
    /* Form adjustments */
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Gallery grid */
    #gallery .col-lg-3 {
        margin-bottom: 0.64rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Contact info stack */
    .contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0;
        min-height: 85vh;
    }
    
    .hero-section .display-4 {
        font-size: 1.92rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .team img {
        width: 100px;
        height: 100px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 4rem 0;
        min-height: 90vh;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    /* Adjust grid for tablets */
    .services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    .features .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    .team img {
        width: 110px;
        height: 110px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 95vh;
    }
    
    .team img {
        width: 120px;
        height: 120px;
    }
    
    /* Optimize card layouts */
    .card-deck .card {
        margin-bottom: 2rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding: 6rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2.60rem;
    }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    section {
        padding: 7rem 0;
    }
}

/* ==========================================================================
   Orientation-specific Styles
   ========================================================================== */

/* Landscape orientation for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 1.85rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .navbar,
    .btn,
    footer,
    #gallery,
    .hero-section::before {
        display: none;
    }
    
    .hero-section {
        background: none;
        color: black;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .card {
        border: 1px solid #dadada;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
    }
    
    .text-white {
        color: black;
    }
    
    section {
        padding: 1rem 0;
    }
}

/* ==========================================================================
   High DPI / Retina Display Adjustments
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    .team img,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ==========================================================================
   Reduced Motion Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn {
        transition: none;
    }
    
    .form-control {
        transition: none;
    }
    
    * {
        animation: none;
        transition: none;
    }
}

/* ==========================================================================
   Dark Mode Support (System Preference)
   ========================================================================== */


/* ==========================================================================
   Container and Grid Enhancements
   ========================================================================== */

/* Fluid container for mobile */
@media (max-width: 767.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Responsive spacing utilities */
.py-mobile-0 { padding-top: 0; padding-bottom: 0; }
.py-mobile-1 { padding-top: 0.36rem; padding-bottom: 0.40rem; }
.py-mobile-2 { padding-top: 0.66rem; padding-bottom: 0.60rem; }
.py-mobile-3 { padding-top: 1rem; padding-bottom: 1rem; }

@media (min-width: 768px) {
    .py-mobile-0,
    .py-mobile-1,
    .py-mobile-2,
    .py-mobile-3 {
        padding-top: inherit;
        padding-bottom: inherit;
    }
}

/* ==========================================================================
   Interactive Elements for Touch Devices
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-light);
    }
    
    .btn {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .nav-link {
        padding: 0.75rem 1rem; /* Larger touch targets */
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* ==========================================================================
   Focus Indicators for Keyboard Navigation
   ========================================================================== */

.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==========================================================================
   Utility Classes for Responsive Design
   ========================================================================== */

.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Text alignment utilities */
@media (max-width: 767.98px) {
    .text-mobile-center {
        text-align: center;
    }
    
    .text-mobile-left {
        text-align: left;
    }
} 

.hero-section h1 {
    padding-top: 275px;
}