/* Wedding Invitation Stylesheet */

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4af37;
    --secondary-color: #8b7355;
    --accent-color: #fff5e6;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f9f9f9;
    --bg-dark: #2c2c2c;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   MUSIC CONTROL
   ============================================ */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.music-control i {
    color: white;
    font-size: 20px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 100svh; /* use svh for mobile browsers with dynamic toolbars */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* parallax on desktop */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Disable fixed attachment on touch devices — iOS ignores it and
   renders a broken/blank background; scroll gives a consistent result */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    animation: fadeInUp 1.5s ease-out;
}

.save-date {
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 50px;
    opacity: 0.9;
}

.couple-names {
    font-family: 'Great Vibes', cursive;
    font-size: 5rem;
    font-weight: 400;
    margin: 20px 0;
    line-height: 1.2;
}

.ampersand {
    display: inline-block;
    margin: 0 20px;
    color: var(--primary-color);
    font-size: 4rem;
}

.wedding-date {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-top: 30px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down i {
    font-size: 1rem;
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
}

/* ============================================
   COUNTDOWN SECTION
   ============================================ */
.countdown-section {
    padding: 100px 20px;
    background: var(--bg-light);
    text-align: center;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.countdown-item {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-10px);
}

.countdown-item span {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.countdown-item p {
    margin-top: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
}

/* ============================================
   STORY SECTION
   ============================================ */
.story-section {
    padding: 100px 20px;
    background: white;
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-light);
}

/* ============================================
   DETAILS SECTION
   ============================================ */
.details-section {
    padding: 100px 20px;
    background: var(--accent-color);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.detail-card {
    background: white;
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-10px);
}

.detail-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-icon i {
    font-size: 2rem;
    color: white;
}

.detail-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.detail-time {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.detail-location {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.detail-address {
    color: var(--text-light);
    margin-bottom: 20px;
}

.map-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.map-link:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery-section {
    padding: 100px 20px;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.2);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 175, 55, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 3rem;
    color: white;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* ============================================
   RSVP SECTION
   ============================================ */
.rsvp-section {
    padding: 100px 20px;
    background: var(--bg-light);
}

.rsvp-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 50px;
}

.rsvp-form {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.submit-btn i {
    margin-right: 10px;
}

.rsvp-message {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
}

.rsvp-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rsvp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   GIFT SECTION
   ============================================ */
.gift-section {
    padding: 100px 20px;
    background: white;
}

.gift-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    font-style: italic;
}

.gift-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--accent-color);
    padding: 40px;
    border-radius: 15px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 60px 20px 40px;
    background: var(--bg-dark);
    color: white;
    text-align: center;
}

.footer-names {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.footer-date {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-hashtag {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 20px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* ── Large Desktop (1200px+) ─────────────────
   Already handled by max-width:1200px container
   ────────────────────────────────────────── */

/* ── Tablet Landscape / Small Desktop (992px–1199px) ── */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

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

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

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rsvp-form {
        max-width: 640px;
    }
}

/* ── Tablet Portrait (768px–991px) ─────────── */
@media (max-width: 991px) {
    /* Lang switcher & music button */
    .lang-switcher {
        right: 65px;
        top: 12px;
    }

    .music-control {
        width: 44px;
        height: 44px;
        top: 10px;
        right: 14px;
    }

    /* Hero */
    .hero-section {
        background-attachment: scroll; /* parallax breaks on tablets */
    }

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

    .ampersand {
        font-size: 3rem;
        margin: 0 12px;
    }

    .save-date {
        font-size: 1rem;
        letter-spacing: 2px;
    }

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

    /* Sections */
    .countdown-section,
    .story-section,
    .details-section,
    .gallery-section,
    .rsvp-section,
    .gift-section {
        padding: 70px 20px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 36px;
    }

    /* Countdown */
    .countdown {
        gap: 24px;
    }

    .countdown-item {
        min-width: 110px;
        padding: 24px 18px;
    }

    .countdown-item span {
        font-size: 2.4rem;
    }

    /* Details grid – 2 columns on tablet */
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .detail-card {
        padding: 36px 24px;
    }

    .detail-card h3 {
        font-size: 1.7rem;
    }

    /* Gallery – 2 columns */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* RSVP */
    .rsvp-form {
        max-width: 100%;
        padding: 36px 28px;
    }

    /* Gift */
    .gift-info {
        padding: 30px 28px;
    }

    /* Footer */
    .footer-names {
        font-size: 2.2rem;
    }
}

/* ── Mobile Landscape / Large Phone (576px–767px) ── */
@media (max-width: 767px) {
    /* Fixed buttons */
    .lang-switcher {
        right: 60px;
        top: 10px;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .music-control {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 12px;
    }

    .music-control i {
        font-size: 16px;
    }

    /* Hero */
    .hero-section {
        background-attachment: scroll;
        min-height: 100svh;
    }

    .hero-content {
        padding: 0 16px;
    }

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

    .ampersand {
        font-size: 2.3rem;
        margin: 0 8px;
    }

    .save-date {
        font-size: 0.9rem;
        letter-spacing: 2px;
        margin-bottom: 14px;
    }

    .wedding-date {
        font-size: 1.1rem;
        letter-spacing: 1px;
        margin-top: 20px;
    }

    .scroll-down {
        bottom: 20px;
    }

    /* Sections */
    .countdown-section,
    .story-section,
    .details-section,
    .gallery-section,
    .rsvp-section,
    .gift-section {
        padding: 56px 16px;
    }

    .section-title {
        font-size: 1.9rem;
        margin-bottom: 30px;
        padding-bottom: 16px;
    }

    .section-title::after {
        width: 70px;
    }

    /* Countdown – wrap to 2×2 on small screens */
    .countdown {
        gap: 16px;
        justify-content: center;
    }

    .countdown-item {
        min-width: calc(50% - 16px);
        max-width: 140px;
        padding: 20px 12px;
        border-radius: 8px;
    }

    .countdown-item span {
        font-size: 2rem;
    }

    .countdown-item p {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    /* Story */
    .story-content {
        font-size: 1rem;
        line-height: 1.9;
    }

    /* Details – single column */
    .details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-card {
        padding: 32px 20px;
    }

    .detail-icon {
        width: 66px;
        height: 66px;
        margin-bottom: 20px;
    }

    .detail-icon i {
        font-size: 1.6rem;
    }

    .detail-card h3 {
        font-size: 1.5rem;
        margin-bottom: 14px;
    }

    .detail-time {
        font-size: 1.1rem;
    }

    .detail-location {
        font-size: 1rem;
    }

    .map-link {
        padding: 10px 24px;
    }

    /* Gallery – 2 columns */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* RSVP */
    .rsvp-form {
        padding: 28px 18px;
        border-radius: 12px;
    }

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

    .submit-btn {
        font-size: 1rem;
        padding: 14px;
    }

    /* Gift */
    .gift-info {
        font-size: 1rem;
        padding: 28px 20px;
    }

    /* Footer */
    .footer {
        padding: 48px 16px 32px;
    }

    .footer-names {
        font-size: 2rem;
    }

    .footer-date {
        font-size: 1rem;
    }

    .footer-hashtag {
        font-size: 1.2rem;
    }

    /* Guest greeting banner */
    .guest-greeting {
        padding: 10px 16px;
        flex-direction: row;
        gap: 8px;
    }
}

/* ── Mobile Portrait / Small Phone (up to 575px) ── */
@media (max-width: 575px) {
    /* Container */
    .container {
        padding: 0 14px;
    }

    /* Hero */
    .couple-names {
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .ampersand {
        font-size: 1.9rem;
        margin: 0 6px;
        display: block; /* stack ampersand on its own line */
        line-height: 1.6;
    }

    .save-date {
        font-size: 0.78rem;
        letter-spacing: 1.5px;
    }

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

    /* Sections */
    .countdown-section,
    .story-section,
    .details-section,
    .gallery-section,
    .rsvp-section,
    .gift-section {
        padding: 44px 14px;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }

    /* Countdown – all 4 in a row using smaller cards */
    .countdown {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .countdown-item {
        min-width: 0;
        flex: 1;
        padding: 16px 8px;
        border-radius: 8px;
    }

    .countdown-item span {
        font-size: 1.6rem;
    }

    .countdown-item p {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    /* Gallery – single column on tiny screens */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item {
        aspect-ratio: 4/3;
    }

    /* Details */
    .detail-card {
        padding: 26px 16px;
    }

    /* RSVP */
    .rsvp-form {
        padding: 22px 14px;
    }

    .rsvp-subtitle {
        font-size: 0.95rem;
    }

    /* Lightbox */
    .lightbox-close {
        top: 10px;
        right: 16px;
        font-size: 36px;
    }

    /* Gift */
    .gift-info {
        padding: 22px 14px;
        font-size: 0.95rem;
    }

    .gift-subtitle {
        font-size: 1rem;
    }

    /* Footer */
    .footer-names {
        font-size: 1.7rem;
    }
}

/* ============================================
   AGENDA SECTION
   ============================================ */
.agenda-section {
    padding: 100px 20px;
    background: var(--accent-color);
}

.agenda-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.agenda-grid:last-child {
    margin-bottom: 0;
}

.agenda-card {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.agenda-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.agenda-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ── Agenda responsive ── */
@media (max-width: 991px) {
    .agenda-section {
        padding: 70px 20px;
    }

    .agenda-card {
        max-width: 100%;
        border-radius: 12px;
    }
}

@media (max-width: 767px) {
    .agenda-section {
        padding: 56px 16px;
    }

    .agenda-grid {
        margin-bottom: 24px;
    }

    .agenda-card {
        border-radius: 10px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    }

    .agenda-card:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 575px) {
    .agenda-section {
        padding: 44px 14px;
    }

    .agenda-grid {
        margin-bottom: 18px;
    }

    .agenda-card {
        border-radius: 8px;
    }
}
