/* ==========================================================================
   Fara7 E-Invite Styling (Luxury Gold & Cream Wedding Card)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --bg-cream: #faf6f0;
    --text-dark: #2c2725;
    --text-muted: #6b6360;
    
    --gold-primary: #c5a059;
    --gold-dark: #9e7f41;
    --gold-light: #f3e5c8;
    --gold-gradient: linear-gradient(135deg, #e5c07b 0%, #c5a059 50%, #9e7f41 100%);
    
    --rose-accent: #e08e9b;
    --shadow-soft: 0 15px 40px rgba(165, 150, 140, 0.12);
    --border-gold: 1px solid rgba(197, 160, 89, 0.25);

    --font-heading: 'Cinzel Decorative', serif;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-cream);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(224, 142, 155, 0.07), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(197, 160, 89, 0.08), transparent 46%);
    background-attachment: fixed;
    color: var(--text-dark);
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 3rem 1rem;
}

/* Floral Decors Mockup (CSS Ornaments) */
.floral-decor {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    background: radial-gradient(circle, var(--rose-accent) 0%, transparent 70%);
    filter: blur(40px);
}

.floral-decor.top-left { top: -50px; left: -50px; }
.floral-decor.bottom-right { bottom: -50px; right: -50px; }

/* Main Card Container */
.invite-card-container {
    background-color: white;
    border: 1px solid rgba(197, 160, 89, 0.15);
    max-width: 550px;
    width: 100%;
    border-radius: 24px;
    padding: 4.5rem 3rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.invite-card-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: var(--border-gold);
    border-radius: 12px;
    pointer-events: none;
}

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

/* Decorative gold flourish on the cover */
.cover-flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    color: var(--gold-primary);
    font-size: 0.85rem;
    margin: 0 auto 0.85rem;
}

.cover-flourish .flourish-line {
    height: 1px;
    width: 48px;
    background: linear-gradient(90deg, transparent, var(--gold-primary));
}

.cover-flourish .flourish-line:last-child {
    background: linear-gradient(90deg, var(--gold-primary), transparent);
}

.cover-date {
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--gold-dark);
    margin-bottom: 3rem;
}

/* Header */
.header {
    margin-bottom: 2rem;
}

.invite-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-primary);
    display: inline-block;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gold-primary);
    padding-bottom: 0.25rem;
}

.couple-names {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    text-wrap: balance;
}

.couple-names span {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.8rem;
    color: var(--gold-primary);
}

.announcement {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 360px;
    margin: 0 auto;
}

/* Countdown Section */
.countdown-section {
    margin-bottom: 3.5rem;
}

.timer-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.timer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.timer-card {
    background-color: var(--bg-cream);
    border: 1px solid rgba(197, 160, 89, 0.1);
    border-radius: 12px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-card .number {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.timer-card .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Details Section */
.details-section {
    margin-bottom: 3.5rem;
}

.info-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-color: var(--bg-cream);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(197, 160, 89, 0.08);
}

.info-card {
    flex: 1;
    text-align: center;
}

.info-icon {
    font-size: 1.4rem;
    color: var(--gold-primary);
    margin-bottom: 0.75rem;
}

.info-card h4 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.info-card p {
    font-family: var(--font-serif);
    font-size: 0.92rem;
    font-weight: 600;
}

.info-card .sub-info {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.info-divider {
    width: 1px;
    height: 60px;
    background-color: rgba(197, 160, 89, 0.2);
}

/* Map Section */
.map-section {
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.map-frame-wrapper {
    border: var(--border-gold);
    border-radius: 16px;
    overflow: hidden;
    height: 180px;
}

/* Styled Visual Placeholder Map */
.mock-map {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fdfbfa 0%, #eedec7 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.map-pin {
    font-size: 2.2rem;
    color: #ef4444;
    animation: bouncePin 1.5s infinite alternate;
    z-index: 2;
}

.map-glow {
    position: absolute;
    width: 40px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    bottom: 45%;
    filter: blur(2px);
    z-index: 1;
}

@keyframes bouncePin {
    to { transform: translateY(-8px); }
}

.map-label {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem 0;
    color: var(--text-dark);
}

.open-maps-btn {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gold-primary);
    text-decoration: underline;
    cursor: pointer;
}

.open-maps-btn:hover {
    color: var(--gold-dark);
}

/* RSVP CTA Box */
.rsvp-cta {
    margin-bottom: 1rem;
}

.rsvp-btn {
    background: var(--gold-gradient);
    color: white;
    border: none;
    width: 100%;
    padding: 1.1rem 0;
    border-radius: 12px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.25);
    transition: all 0.3s;
}

.rsvp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4);
}

.rsvp-deadline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.75rem;
}

/* Event Footer */
.footer {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold-primary);
    margin-top: 2rem;
}

/* ==========================================================================
   RSVP Modal Glassmorphism
   ========================================================================== */
.rsvp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 39, 37, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 1rem;
}

.rsvp-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.rsvp-modal-card {
    background-color: white;
    border: var(--border-gold);
    border-radius: 20px;
    max-width: 450px;
    width: 100%;
    padding: 3rem 2.2rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.close-rsvp {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-muted);
}

.close-rsvp:hover {
    color: var(--text-dark);
}

.rsvp-modal-card h2 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.rsvp-modal-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

/* Form inputs with floating labels */
.form-group {
    position: relative;
    width: 100%;
}

.form-group input {
    width: 100%;
    border: 1px solid rgba(197, 160, 89, 0.2);
    background-color: var(--bg-cream);
    padding: 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--gold-primary);
    background-color: white;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
    top: -9px;
    left: 8px;
    font-size: 0.72rem;
    background-color: white;
    padding: 0 0.35rem;
    color: var(--gold-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Select formatting */
.form-group-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-select label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.form-group-select select {
    background-color: var(--bg-cream);
    border: 1px solid rgba(197, 160, 89, 0.2);
    padding: 0.9rem;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Custom Radio style */
.form-group-radio {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-radio > label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.radio-row {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.radio-label input {
    display: none;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(197, 160, 89, 0.3);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
}

.radio-label input:checked ~ .custom-radio {
    border-color: var(--gold-primary);
}

.radio-label input:checked ~ .custom-radio::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--gold-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Submit RSVP */
.submit-rsvp-btn {
    background: var(--gold-gradient);
    color: white;
    border: none;
    padding: 1.1rem 0;
    border-radius: 10px;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.2);
    transition: all 0.3s;
}

.submit-rsvp-btn:hover {
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}

/* ==========================================================================
   Desktop "Invitation Spread" — two-panel layout on wide screens
   ========================================================================== */
@media (min-width: 900px) {
    body { padding: 2.5rem 2rem; }

    .invite-card-container {
        max-width: 980px;
        padding: 0;
        display: grid;
        grid-template-columns: 0.82fr 1fr;
        align-items: stretch;
        overflow: hidden;
    }

    /* Pull the decorative frame in a little on the larger card */
    .invite-card-container::before {
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    /* Left cover panel */
    .card-cover {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 3rem 2.75rem;
        background: linear-gradient(165deg, #fffdf9 0%, var(--gold-light) 165%);
        border-right: var(--border-gold);
    }

    .card-cover .header {
        margin-bottom: 1.5rem;
    }

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

    .cover-date {
        margin-bottom: 0;
    }

    /* Right details panel — distribute sections to fill the matched height */
    .card-body {
        padding: 2.5rem 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
    }

    /* Spacing is handled by the panel's flex gap, so zero the legacy margins */
    .card-body > section,
    .card-body > .footer {
        margin: 0;
    }

    /* Compact the tallest pieces so everything clears the fold */
    .timer-card { padding: 0.75rem 0.5rem; }
    .timer-card .number { font-size: 1.6rem; }
    .info-grid { padding: 1.1rem 1.25rem; }
    .map-section .section-title { margin-bottom: 0.85rem; }
    .map-frame-wrapper { height: 120px; }
    .mock-map { padding: 1rem; }
    .map-pin { font-size: 1.7rem; }
    .map-label { margin: 0.35rem 0 0.6rem; }
    .rsvp-btn { padding: 0.95rem 0; }
}

/* Shorter desktop screens: shrink the map further and tighten rhythm */
@media (min-width: 900px) and (max-height: 720px) {
    .card-body { gap: 1.1rem; padding: 1.75rem 2.5rem; }
    .card-cover { padding: 2rem 2.5rem; }
    .map-frame-wrapper { height: 92px; }
    .mock-map { padding: 0.6rem; }
    .map-section .section-title { font-size: 1.15rem; }
    .map-label { margin: 0.2rem 0 0.45rem; font-size: 0.8rem; }
    .map-pin { font-size: 1.5rem; }
    .timer-card .number { font-size: 1.45rem; }
    .couple-names { font-size: 2.2rem; }
}

/* Mobile configurations */
@media (max-width: 600px) {
    .invite-card-container { padding: 3rem 1.5rem; }
    .couple-names { font-size: 1.8rem; }
    .info-grid { flex-direction: column; gap: 1.5rem; }
    .info-divider { width: 50px; height: 1px; }
    .cover-date { letter-spacing: 3px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .invite-card-container { animation: none; }
    .map-pin { animation: none; }
    .rsvp-modal-card { animation: none; }
}
