/* Responsive Design System */

/* Base Mobile First (0-639px) */
:root {
    --container-padding: 1rem;
    --header-height: 4rem;
    --logo-size: 3rem;
}

/* Responsive Typography */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.title-responsive {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

/* Container Responsiveness */
.container-responsive {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Grid System */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

/* Flexbox Layout */
.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-nav.active {
    transform: translateY(0);
}

/* Small devices (640px and up) */
@media (min-width: 640px) {
    :root {
        --container-padding: 1.5rem;
        --header-height: 4.5rem;
        --logo-size: 3.5rem;
    }

    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
        --header-height: 5rem;
        --logo-size: 4rem;
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:flex-row {
        flex-direction: row;
    }
}

/* Large devices (1024px and up) */
@media (min-width: 1024px) {
    :root {
        --container-padding: 2.5rem;
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large devices (1280px and up) */
@media (min-width: 1280px) {
    :root {
        --container-padding: 3rem;
    }

    .container-responsive {
        max-width: 1280px;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --bb-blue: #0000ff;
        --bb-blue-light: #4d4dff;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Image Responsiveness */
.img-responsive {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Card Responsiveness */
.card-responsive {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-responsive:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Button Responsiveness */
.btn-responsive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem);
    border-radius: 0.5rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    transition: all 0.3s ease;
}

/* Navigation Responsiveness */
.nav-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1.5rem);
}

/* Form Responsiveness */
.form-responsive {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.form-responsive input,
.form-responsive textarea {
    width: 100%;
    padding: clamp(0.5rem, 2vw, 1rem);
    border-radius: 0.375rem;
}

/* Video Responsiveness */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Modal Responsiveness */
.modal-responsive {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 600px);
    max-height: 90vh;
    overflow-y: auto;
    padding: clamp(1rem, 5vw, 2rem);
    border-radius: 0.5rem;
}

/* Gallery Grid Responsiveness */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: clamp(0.5rem, 2vw, 1.5rem);
}

/* Utility Classes */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
}

.show-mobile {
    display: block;
}

@media (min-width: 768px) {
    .show-mobile {
        display: none;
    }
}

/* Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        background-position: -200% 0;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--bb-blue);
    outline-offset: 2px;
}