/* Responsive Design - Mobile First Approach */
/* Leśna Rezydencja Królewo */

/* Mobile First - Base styles in luxury-styles.css are for mobile */

/* Tablet Portrait - 768px and up */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    /* Navigation adjustments */
    .nav-container {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    /* Story section */
    .story-images {
        height: 700px;
    }
    
    /* Gallery grid improvements */
    .gallery-item {
        height: 350px;
    }
    
    .gallery-item.large {
        height: 450px;
    }
    
    /* Features grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Specs grid */
    .specs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Laptop - 1024px and up */
@media (min-width: 1024px) {
    /* Typography scaling */
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    h3 {
        font-size: 2rem;
    }
    
    /* Hero content spacing */
    .hero-content {
        max-width: 800px;
    }
    
    /* Story grid stays 2 column */
    .story-grid {
        gap: var(--spacing-xl);
    }
    
    /* Features grid expands */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Price display */
    .price-amount {
        font-size: 4rem;
    }
}

/* Desktop - 1400px and up */
@media (min-width: 1400px) {
    /* Maximum container width reached */
    .container {
        padding: 0 var(--spacing-xl);
    }
    
    /* Gallery items larger */
    .gallery-item {
        height: 400px;
    }
    
    .gallery-item.large {
        height: 500px;
    }
}

/* Mobile and Tablet - Max 1023px */
@media (max-width: 1023px) {
    /* Mobile navigation */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--warm-white);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: var(--transition-smooth);
        box-shadow: 0 10px 30px var(--shadow-light);
        padding: var(--spacing-lg) 0;
        gap: var(--spacing-md);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Story section stacks */
    .story-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .story-images {
        height: 400px;
        margin-bottom: var(--spacing-lg);
    }
    
    .story-img-1 {
        width: 80%;
        height: 300px;
    }
    
    .story-img-2 {
        width: 70%;
        height: 250px;
    }
    
    /* Location section stacks */
    .location-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .map-container {
        height: 400px;
    }
    
    /* Contact grid stacks */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Small Mobile - Max 480px */
@media (max-width: 480px) {
    /* Reduce padding and spacing */
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
        --spacing-xxl: 5rem;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Brand name smaller */
    .brand-name {
        font-size: 1.2rem;
    }
    
    /* Story features stack */
    .story-features {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Gallery grid single column */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .gallery-item,
    .gallery-item.large {
        height: 250px;
        grid-column: span 1;
    }
    
    /* Features single column */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Specs grid */
    .specs-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    /* Reduce feature icon size */
    .feature-icon {
        font-size: 2rem;
    }
    
    /* Price display smaller */
    .price-amount {
        font-size: 2.5rem;
    }
    
    /* Contact form adjustments */
    .contact-form {
        padding: var(--spacing-md);
    }
    
    /* Modal adjustments */
    .modal-content {
        max-width: 95%;
    }
    
    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .modal-prev,
    .modal-next {
        font-size: 1.5rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* Landscape Mobile - Height constraint */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .scroll-down {
        font-size: 0.9rem;
    }
    
    .scroll-arrow {
        font-size: 1.5rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhance borders and shadows for retina */
    .gallery-item,
    .feature-card,
    .highlight-item,
    .contact-form {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    }
    
    .form-input {
        border-bottom-width: 1px;
    }
}

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .luxury-nav,
    .mobile-menu-toggle,
    .scroll-down,
    .gallery-modal,
    .btn-primary,
    .btn-submit,
    .contact-form {
        display: none !important;
    }
    
    /* Adjust layout for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    .hero-section {
        height: auto;
        page-break-after: always;
    }
    
    .story-grid,
    .location-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ensure images print nicely */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    /* Show contact info clearly */
    .contact-info {
        border: 1px solid #ccc;
        padding: 20px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-arrow {
        animation: none;
    }
    
    /* Disable parallax */
    .hero-background {
        position: relative;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Could implement dark mode in future */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .nav-link,
    .btn-primary,
    .btn-submit,
    .contact-method {
        padding: var(--spacing-sm) var(--spacing-md);
        margin: calc(var(--spacing-xs) * -1);
    }
    
    /* Remove hover effects on touch devices */
    .gallery-item:hover .gallery-overlay {
        transform: translateY(100%);
    }
    
    .gallery-item:hover .gallery-img {
        transform: scale(1);
    }
    
    /* Make gallery overlay always visible on mobile */
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 100%);
    }
}