/* D8 Wrap - Responsive Styles */

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    :root {
        --spacing-xl: 6rem;
    }
    
    .container {
        max-width: 992px;
    }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    :root {
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
    }
    
    .container {
        max-width: 768px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: clamp(1.8rem, 4vw, 3rem);
    }
    
    /* Hide on tablet */
    .hide-tablet {
        display: none !important;
    }
    
    /* Show on tablet */
    .show-tablet {
        display: block !important;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Stack buttons on mobile */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 576px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-lg: 1.5rem;
        --spacing-md: 1rem;
    }
    
    body {
        font-size: 0.95rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-title::after {
        margin: var(--spacing-xs) auto 0;
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
    
    /* Show on mobile */
    .show-mobile {
        display: block !important;
    }
    
    /* Full width buttons */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Adjust spacing */
    .mb-mobile-sm {
        margin-bottom: var(--spacing-sm) !important;
    }
    
    .mb-mobile-md {
        margin-bottom: var(--spacing-md) !important;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    :root {
        --spacing-lg: 1.25rem;
        --spacing-md: 0.875rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.85rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-scroll {
        display: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }
    
    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(
            180deg,
            transparent 50%,
            rgba(0, 0, 0, 0.9) 100%
        );
    }
    
    .gallery-item-zoom {
        display: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #ff6600;
        --text-muted: #cccccc;
    }
    
    .card,
    .form-input,
    .form-textarea,
    .form-select {
        border-width: 2px;
    }
}

/* Dark Mode (already dark, but for system preference) */
@media (prefers-color-scheme: light) {
    /* Site is dark by design, no changes needed */
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .hero-scroll,
    .btn,
    .gallery-item-overlay {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
