/* =============================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   Wedding Website - Breakpoints: 768px, 992px, 1200px
   ============================================================================= */

/* =============================================================================
   MOBILE LANDSCAPE - 576px and up
   ============================================================================= */

@media (max-width: 576px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 15px;
    }

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

    /* Hero images responsive layout */
    .hero-images-layout {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
    }

    .hero-main-image {
        width: 100%;
        max-width: 320px;
        height: 240px;
        order: -1;
    }

    .side-image {
        flex: none;
        width: 100%;
        max-width: 280px;
        height: 200px;
        margin-top: 0 !important;
    }

    .hero-images {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .main-content {
        order: -1;
    }

    .hero-image {
        max-width: 280px;
        height: 220px;
    }

    .date-card {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 30px 20px;
        margin: 0;
        min-width: 280px;
        width: calc(100% - 40px);
        max-width: 400px;
    }

    .date-card h2 {
        font-size: 2rem;
    }

    .story-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .story-images {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    .story-image {
        width: 120px;
        height: 120px;
    }

    .story-image img {
        height: 120px;
    }

    .story-content h2 {
        font-size: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
}

/* =============================================================================
   TABLET - 768px and up
   ============================================================================= */

@media (max-width: 768px) {
    .navbar {
        z-index: 2000;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 30px 0;
        gap: 20px;
        z-index: 1999;
        pointer-events: all;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        pointer-events: all;
    }

    .nav-link {
        pointer-events: all;
        display: block;
        padding: 10px 20px;
    }

    .nav-toggle {
        display: flex;
        z-index: 2001;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Fix hero images layout for mobile */
    .hero-images-layout {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }

    .side-image {
        flex: none;
        width: 100%;
        max-width: 300px;
        height: 200px;
        margin-top: 0 !important;
    }

    .hero-main-image {
        flex: none;
        width: 100%;
        max-width: 350px;
        height: 250px;
        order: -1;
    }

    .hero-images {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .main-content {
        order: -1;
    }

    .hero-title {
        font-size: 3rem;
    }

    .story-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .story-images {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .story-image {
        width: 150px;
        height: 150px;
    }

    .story-image img {
        height: 150px;
    }

    .story-image.top-right,
    .story-image.bottom-left {
        margin-top: 0;
    }

    .contact-content h2 {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-left {
        grid-column: 1 / -1;
        text-align: center;
    }
}

/* =============================================================================
   DESKTOP SMALL - 992px and up
   ============================================================================= */

@media (min-width: 992px) and (max-width: 1199px) {
    .hero-images {
        gap: 40px;
    }

    .side-image {
        flex: 0 0 180px;
        height: 280px;
    }

    .story-container {
        grid-template-columns: 180px 1fr 180px;
        gap: 40px;
    }
}

/* =============================================================================
   MOBILE SPECIFIC ADJUSTMENTS
   ============================================================================= */

@media (max-width: 480px) {
    .navbar {
        padding: 12px 0;
    }

    .nav-brand a {
        font-size: 20px;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-container {
        padding: 0 15px;
        width: 100%;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    /* Make hero images fully responsive on small mobile */
    .hero-images-layout {
        gap: 15px;
        padding: 0;
    }

    .hero-main-image {
        max-width: 100%;
        height: 220px;
    }

    .side-image {
        max-width: 100%;
        height: 180px;
    }

    .hero-image {
        max-width: 100%;
        height: 200px;
        margin-bottom: 20px;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 13px;
    }

    .save-the-date {
        padding: 40px 0;
    }

    .date-content {
        min-height: 400px;
    }

    .date-card {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 25px 15px;
        min-width: 0;
        width: calc(100% - 40px);
        max-width: 350px;
    }

    .date-card h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .date-text {
        font-size: 1.1rem;
    }

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

    .venue-name {
        font-size: 1.2rem;
    }

    .venue-address {
        font-size: 0.9rem;
    }

    .our-story {
        padding: 40px 0;
    }

    .story-content h2 {
        font-size: 2.2rem;
        margin-bottom: 25px;
    }

    .story-text {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .contact {
        padding: 40px 0;
    }

    .contact-content h2 {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 15px;
    }

    .submit-button {
        padding: 15px 40px;
        font-size: 13px;
        align-self: stretch;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        gap: 25px;
        margin-bottom: 25px;
    }

    .footer-left h3 {
        font-size: 1.6rem;
    }
}

/* =============================================================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ============================================================================= */

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 120px 0 40px;
    }

    .hero-images {
        gap: 30px;
    }

    .side-image {
        height: 200px;
    }

    .hero-image {
        height: 180px;
    }

    .date-content {
        min-height: 300px;
    }
}

/* =============================================================================
   HIGH DPI / RETINA DISPLAYS
   ============================================================================= */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 2dppx) {
    /* Ensure crisp images and text on high-DPI displays */
    img {
        image-rendering: crisp-edges;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .navbar,
    .nav-toggle,
    .cta-button,
    .submit-button,
    .footer {
        display: none;
    }

    .hero,
    .save-the-date,
    .our-story,
    .contact {
        page-break-inside: avoid;
        padding: 20px 0;
    }

    body {
        font-size: 12px;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }

    .hero-title,
    .story-content h2,
    .contact-content h2 {
        font-size: 24px;
        color: #000;
    }
}

/* =============================================================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* =============================================================================
   DARK MODE SUPPORT (optional)
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    /* Uncomment if you want to support dark mode */
    /*
    :root {
        --primary-bg: #1a1a1a;
        --secondary-bg: #2a2a2a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --accent-brown: #d4b896;
    }
    */
}