:root {
    --cream: #FFFDF9;
    --soft-pink: #FFEDEB;
    --primary-orange: #D35400;
    /* Unified Orange */
    --text-brown: #5A4A3A;
    --text-dark-brown: #3E3025;
    /* Darker for better legibility */
    --accent-pink: #E76F51;
    --border-radius: 24px;
}

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

body {
    background-color: var(--cream);
    font-family: 'Cormorant Garamond', serif;
    color: var(--text-brown);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Floral Frame Effect for Mobile */
.floral-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('flowers_1.png');
    /* Use flowers1 for fuller coverage */
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    z-index: -1;
}

.main-card {
    margin: 20px;
    padding: 20px 15px;
    /* Increased padding */
    background-color: rgba(255, 255, 255, 1);
    /* More transparent */

    /* For Safari support */
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Subtle border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    /* Soft shadow for depth */
    min-height: 100vh;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}


@keyframes fadeIn {
    from {
        opacity: 0.3;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bsd {
    text-align: right;
    font-size: 10px;
    opacity: 0.6;
    margin-bottom: 10px;
}

/* Typography */
h1 {
    font-family: 'Playfair Display', serif;
    /* New serif font */
    font-size: clamp(3rem, 10vw, 5rem);
    /* Responsive size: min 3rem, pref 10vw, max 5rem */
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    /* Script fonts connect better without spacing */
    white-space: nowrap;
    /* Force single line */
    color: var(--primary-orange);
    /* Unified Orange */
    margin: 10px 0;
    text-align: center;
    line-height: 1.2;
}

.amp {
    font-family: inherit;
    /* Inherit the parent font (Times New Roman or whatever is set) */
    font-size: 0.7em;
    /* Reduce size relative to the surrounding text */
    vertical-align: middle;
    /* Align nicely */
    color: inherit;
    /* Use parent color */
}

.parents {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 300;
    /* Lighter weight */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 5px;
    line-height: 1.8;
    /* Increased line spacing */
}

.tribute-header {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-brown);
    font-size: 18px;
}

.parents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 15px;
    row-gap: 12px;
    /* Increased row gap */
    /* Simulating the vertical spacing */
    width: 100%;
    margin-bottom: 15px;
}

.parents-grid p {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 300;
    /* Lighter weight */
    margin: 0;
    line-height: 1.6;
    /* Increased line spacing */
    color: var(--text-brown);
    text-align: center;
}

.spacer {
    height: 15px;
}

.event-details {
    text-align: center;
    margin: 20px 0;
    /* Increased top margin */
    padding: 15px;
    background: var(--soft-pink);
    border-radius: var(--border-radius);
    color: var(--text-dark-brown);
    /* Darker text */
}

/* Date and Time Size Adjustments */
.day {
    font-size: 1.8rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.hebrew-date {
    font-size: 1.5rem;
    font-weight: 500;
    display: block;
}

.time {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 10px;
    color: var(--accent-pink);
}

/* Hebrew specific font size adjustments */
#hebrew-version .day {
    font-size: 1.2rem;
    font-weight: 400;
    /* Not bold */
}

#hebrew-version .hebrew-date {
    font-size: 2rem;
}

#hebrew-version .time {
    font-size: 1.5rem;
    font-weight: 400;
    /* Not bold */
}

.venue-name {
    font-size: 36px;
    color: var(--primary-orange);
    margin: 5px 0;
}

.venue-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.venue-link:hover {
    transform: scale(1.02);
}

/* Buttons */
.submit-button {
    width: 100%;
    padding: 16px;
    background: var(--primary-orange);
    /* Unified Orange */
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.3);
}

.waze-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    text-decoration: none;
    color: var(--primary-orange);
    /* Unified Orange */
    font-weight: 600;
    /* Slightly lighter weight */
    border: 1px solid var(--primary-orange);
    /* Thinner, darker border */
    padding: 12px 24px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: white;
}

.waze-cta:hover {
    background: var(--soft-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(244, 162, 97, 0.2);
}

.waze-cta img {
    width: 24px;
}

/* RSVP Styles */
#rsvp-form {
    display: none;
    /* Hidden by default */
}

/* Landing Page Styles */
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(253, 251, 247, 0.8) 0%, rgba(255, 240, 245, 0.8) 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.8s ease-out;
}

.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.landing-title {
    font-family: 'Great Vibes', 'Alex Brush', cursive;
    font-size: 5rem;
    color: var(--primary-orange);
    /* Unified Orange */
    margin: 10px 0;
    line-height: 1;
}

/* 1. Ensure the content takes full height but doesn't grow based on images */
.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Centers the text/button vertically */
    height: 100vh;
    width: 100%;
    position: relative;
    padding: 0 20px;
    overflow: hidden;
    /* Keeps the flowers from causing a scrollbar */
}

/* 2. Fix the flower sizing and position them at the edges */
.landing-flower {
    position: absolute;
    width: 100%;
    height: 40vh;
    /* Slightly taller to allow for a nice long fade */
    object-fit: cover;
    left: 0;
    z-index: 1;
    opacity: 0.9;
}

.landing-flower.top {
    top: 0;
    /* Fades from solid black at the top to transparent at the bottom edge */
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.landing-flower.bottom {
    bottom: 0;
    transform: rotate(180deg);
    /* Fades from solid black at the bottom (original top) to transparent at the inner edge */
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.enter-button {
    position: relative;
    z-index: 10;
    /* Ensures text is always on top of the images */
}

.landing-title {
    font-size: clamp(3.5rem, 15vw, 5rem);
    /* Prevents the title from being too small */
    margin: 0;
}

.landing-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--text-brown);
}

.enter-button {
    margin-top: 20px;
    padding: 12px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: white;
    background: var(--primary-orange);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.4);
}

.enter-button:hover {
    background: #e08e6d;
    transform: scale(1.05);
}

.thank-you-container {
    text-align: center;
    z-index: 10;
    max-width: 80%;
    /* Ensure content is centered and readable on the flower background */
}

.back-btn {
    text-decoration: none;
    display: inline-block;
    margin-top: 30px;
}

.thank-you-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 5vw, 1.8rem);
    color: var(--text-brown);
    margin: 10px 0;
    line-height: 1.2;
}

.landing-language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10000;
}

/* Updated to match .lang-btn style but for landing page */
.landing-lang-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--primary-orange);
    border-radius: 20px;
    /* Pill shape */
    padding: 8px 16px;
    /* Larger padding */
    width: auto;
    /* Auto width */
    height: auto;
    /* Auto height */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Gap for flag and text */
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--text-brown);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.landing-lang-btn.active {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 4px 10px rgba(244, 162, 97, 0.3);
}

.landing-lang-btn:hover {
    transform: translateY(-2px);
    /* Slight lift */
    background: var(--soft-pink);
    color: var(--text-brown);
}

.attendance-toggle {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.radio-card {
    flex: 1;
    position: relative;
}

.radio-card input {
    display: none;
}

.radio-label {
    display: block;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--primary-orange);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.radio-card input:checked+.radio-label {
    background: var(--primary-orange);
    color: white;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
}

.rtl {
    direction: rtl;
    text-align: right;
}

/* Language Selector */
.language-selector {
    /* Centered */
    display: flex;
    gap: 10px;
    z-index: 100;
    margin-bottom: 20px;
    /* Added space under buttons */
}

.lang-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--primary-orange);
    border-radius: 20px;
    padding: 8px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--text-brown);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn:hover {
    background: var(--soft-pink);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 4px 10px rgba(244, 162, 97, 0.3);
}

/* Language Visibility Logic */
html[lang="fr"] #hebrew-version {
    display: none;
}

html[lang="he"] #french-version {
    display: none;
}

.intro {
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}