/* Responsive Design - Mobile First Approach */

/* Mobile Styles (default styles in main.css are mobile-first) */

/* Small Mobile - Extra Small Screens (< 480px) */
@media (max-width: 479px) {
    :root {
        --container-padding: 1rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }

    .couple-names {
        font-size: 3rem !important;
    }

    .wedding-date {
        font-size: 1.125rem !important;
        padding: var(--spacing-sm) var(--spacing-md) !important;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .details-card,
    .travel-grid,
    .directions-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile - Small Screens (480px - 767px) */
@media (max-width: 767px) {
    /* Header and Navigation */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        left: var(--container-padding);
        top: 50%;
        transform: translateY(-50%);
    }

    .main-nav {
        position: relative;
        justify-content: center;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-header-bg);
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md) 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list a {
        padding: var(--spacing-sm) var(--container-padding);
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .nav-list a:hover {
        border-left-color: var(--color-accent);
        background-color: var(--color-background-alt);
    }

    /* Theme Switch - Mobile */
    .theme-switch {
        position: absolute;
        right: var(--container-padding);
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0;
        gap: 0.3rem;
    }

    .theme-switch-icon {
        font-size: 0.9rem;
    }

    .theme-switch-slider {
        width: 36px;
        height: 20px;
        border-radius: 10px;
    }

    .theme-switch-slider::after {
        width: 12px;
        height: 12px;
    }

    [data-theme="light"] .theme-switch-slider::after {
        transform: translateX(16px);
    }

    /* Home Section */
    .couple-names {
        font-size: 3.5rem;
    }

    .wedding-tagline {
        font-size: 1rem;
    }

    .wedding-date {
        font-size: 1.25rem;
    }

    /* Timeline - Simplified for mobile */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 50px;
    }

    .timeline-item:nth-child(odd) .timeline-time,
    .timeline-item:nth-child(even) .timeline-time {
        width: 100%;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: var(--spacing-xs);
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }

    .timeline-item:nth-child(even) {
        flex-direction: column;
    }

    .timeline-item::after {
        left: 20px;
        transform: translateY(-50%);
    }

    .timeline-time {
        font-size: 1rem;
    }

    /* Grids */
    .details-card,
    .travel-grid,
    .directions-grid {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .details-card,
    .travel-card,
    .direction-card,
    .rsvp-placeholder,
    .contact-details {
        padding: var(--spacing-md);
    }

    .details-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .details-venue {
        text-align: center;
    }

    /* Home adjustments */
    .home {
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: 90vh;
    }
}

/* Tablet - Medium Screens (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Header and Navigation */
    .nav-list {
        gap: var(--spacing-md);
    }

    .nav-list a {
        font-size: 0.8125rem;
    }

    /* Home Section */
    .couple-names {
        font-size: 4rem;
    }

    .wedding-date {
        font-size: 1.375rem;
    }

    /* Timeline adjustments for tablet */
    .timeline {
        max-width: 700px;
    }

    .timeline-content {
        padding: var(--spacing-md);
    }

    /* Grids */
    .travel-grid {
        grid-template-columns: 1fr;
        max-width: 700px;
        margin: 0 auto;
    }

    .directions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop - Large Screens (1024px and above) */
@media (min-width: 1024px) {
    /* Home Section - Full effect on desktop */
    .home {
        padding: var(--spacing-xxl);
    }

    .couple-names {
        font-size: 5.5rem;
    }

    .wedding-tagline {
        font-size: 1.25rem;
    }

    /* Timeline - Full width on desktop */
    .timeline {
        max-width: 900px;
    }

    .timeline-content {
        padding: var(--spacing-lg);
    }

    /* Enhanced hover effects on desktop */
    .details-card,
    .travel-card,
    .direction-card,
    .timeline-content {
        transition: transform var(--transition-base), box-shadow var(--transition-base);
    }

    .details-card:hover,
    .travel-card:hover,
    .direction-card:hover,
    .timeline-content:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    }

    /* Full width grids on desktop */
    .travel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra Large Screens (1400px and above) */
@media (min-width: 1400px) {
    :root {
        --container-max-width: 1400px;
        --spacing-xxl: 5rem;
    }

    .couple-names {
        font-size: 6rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    /* Timeline spacing on very large screens */
    .timeline {
        max-width: 1000px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .mobile-menu-toggle,
    .btn {
        display: none;
    }

    .home {
        margin-top: 0;
        min-height: auto;
        page-break-after: always;
    }

    .section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* Reduced Motion Preference */
@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;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --color-text-dark: #E0E0E0;
        --color-text-light: #B0B0B0;
        --color-background: #1A1A1A;
        --color-background-alt: #2C2C2C;
        --color-border: #404040;
    }

    .site-header {
        background-color: rgba(26, 26, 26, 0.95);
    }

    .home {
        background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
    }

    .details-card,
    .travel-card,
    .direction-card,
    .timeline-content,
    .rsvp-placeholder,
    .contact-details {
        background-color: var(--color-background-alt);
    }
    */
}

/* Landscape Orientation Adjustments for Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .home {
        min-height: 100vh;
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .couple-names {
        font-size: 3rem;
    }

    .wedding-date {
        font-size: 1.125rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .section {
        padding: var(--spacing-xl) 0;
    }
}
