/* ===== RESPONSIVE STYLES ===== */

/* ===== EXTRA SMALL DEVICES (Portrait phones, less than 576px) ===== */
@media (max-width: 575.98px) {
    /* Typography adjustments for small screens */
    h1, .h1, .display-4 { 
        font-size: 1.75rem !important; 
        line-height: 1.2;
    }
    
    h2, .h2 { 
        font-size: 1.5rem !important; 
        line-height: 1.3;
    }
    
    h3, .h3 { 
        font-size: 1.25rem !important; 
    }
    
    h4, .h4 { 
        font-size: 1.125rem !important; 
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        text-align: center;
    }
    
    /* Hero section */
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
        margin-bottom: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-footer {
        padding: 1rem;
    }
    
    /* Form adjustments */
    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    /* Team member images */
    .img-team {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery adjustments */
    .img-gallery {
        height: 200px;
    }
    
    /* Contact info stack vertically */
    .contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Footer adjustments */
    footer {
        text-align: center;
    }
    
    footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* ===== SMALL DEVICES (Landscape phones, 576px and up) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1, .h1, .display-4 { 
        font-size: 2rem !important; 
    }
    
    h2, .h2 { 
        font-size: 1.75rem !important; 
    }
    
    /* Hero section */
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    /* Buttons */
    .btn {
        width: auto;
        display: inline-block;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Team member images */
    .img-team {
        width: 130px;
        height: 130px;
    }
    
    /* Gallery adjustments */
    .img-gallery {
        height: 220px;
    }
}

/* ===== MEDIUM DEVICES (Tablets, 768px and up) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Hero section */
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    /* Cards in grid */
    .card-columns {
        column-count: 2;
    }
    
    /* Team member images */
    .img-team {
        width: 140px;
        height: 140px;
    }
    
    /* Gallery adjustments */
    .img-gallery {
        height: 240px;
    }
    
    /* Form layout */
    .contact-form .row {
        margin-bottom: 1rem;
    }
}

/* ===== LARGE DEVICES (Desktops, 992px and up) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Navigation spacing */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }
    
    /* Hero section full height */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Cards in grid */
    .card-columns {
        column-count: 3;
    }
    
    /* Team layout */
    .team-member {
        margin-bottom: 2rem;
    }
}

/* ===== EXTRA LARGE DEVICES (Large desktops, 1200px and up) ===== */
@media (min-width: 1200px) {
    /* Container max width */
    .container {
        max-width: 1140px;
    }
    
    /* Typography for larger screens */
    .display-1 { font-size: 3.5rem; }
    .display-2 { font-size: 3rem; }
    .display-3 { font-size: 2.5rem; }
    .display-4 { font-size: 2rem; }
    
    /* Hero section */
    .hero-section h1 {
        font-size: 3rem !important;
    }
    
    .hero-section .lead {
        font-size: 1.5rem !important;
    }
    
    /* Sections with more padding */
    section {
        padding: 5rem 0;
    }
    
    /* Cards in grid */
    .card-columns {
        column-count: 4;
    }
    
    /* Gallery grid improvements */
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }
}

/* ===== ULTRA WIDE SCREENS (1400px and up) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Even larger typography for ultra-wide screens */
    .hero-section h1 {
        font-size: 3.5rem !important;
    }
    
    .hero-section .lead {
        font-size: 1.75rem !important;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 500px) {
    /* Reduce hero section height on landscape mobile */
    .hero-section {
        min-height: 60vh;
        padding: 1rem 0;
    }
    
    /* Compact navigation */
    .navbar {
        padding: 0.25rem 0;
    }
    
    /* Smaller sections */
    section {
        padding: 1.5rem 0;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows for high DPI */
    .card {
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .btn {
        border-width: 1px;
    }
    
    /* Crisper text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== FLEXBOX UTILITIES FOR RESPONSIVE LAYOUTS ===== */
.d-flex-responsive {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .d-flex-responsive {
        flex-direction: row;
    }
}

/* ===== RESPONSIVE SPACING ===== */
@media (max-width: 767.98px) {
    .py-responsive {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .my-responsive {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (min-width: 768px) {
    .py-responsive {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    .my-responsive {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* ===== RESPONSIVE GRID ADJUSTMENTS ===== */
@media (max-width: 575.98px) {
    .col-responsive {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .col-responsive {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) {
    .col-responsive {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* ===== RESPONSIVE TEXT ALIGNMENT ===== */
@media (max-width: 767.98px) {
    .text-responsive {
        text-align: center !important;
    }
}

@media (min-width: 768px) {
    .text-responsive {
        text-align: left !important;
    }
}

/* ===== RESPONSIVE IMAGES ===== */
.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 575.98px) {
    .img-responsive {
        height: 200px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .img-responsive {
        height: 220px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .img-responsive {
        height: 240px;
    }
}

@media (min-width: 992px) {
    .img-responsive {
        height: 260px;
    }
}

/* ===== RESPONSIVE NAVIGATION IMPROVEMENTS ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(0,0,0,0.1);
        margin-bottom: 0.25rem;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* ===== RESPONSIVE FORM IMPROVEMENTS ===== */
@media (max-width: 767.98px) {
    .form-row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .contact-info-item {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .contact-info-item:last-child {
        margin-bottom: 0;
    }
}

/* ===== RESPONSIVE CARD DECK ===== */
@media (max-width: 575.98px) {
    .card-deck .card {
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .card-deck {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .card-deck {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .card:hover {
        transform: none;
    }
    
    .hero-section::before {
        animation: none;
    }
    
    .blob-shape {
        animation: none;
    }
}

/* ===== DARK MODE SUPPORT (when needed) ===== */

/* ===== PRINT RESPONSIVE ===== */
@media print {
    @page {
        margin: 1in;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .row {
        page-break-inside: avoid;
    }
    
    .card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    section {
        page-break-before: always;
    }
    
    section:first-child {
        page-break-before: avoid;
    }
} 