:root {
    --primary-color: #064E3B;
    --secondary-color: #FFEFCC;
    --tertiary-color: #022C22;
    --neutral-color: #FAF8F5;
    --timeline-line-color: #4A4A4A;
    --gold-primary: #C5A059;
    --gold-light: #E6CA85;
    --gold-dark: #9A7B38;
    --emerald-dark: #024B26;
    --footer-bg: #EAE3D9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--neutral-color);
    color: var(--tertiary-color);
    font-family: 'Amiri', serif;
    font-weight: 300;
    text-align: center;
    overflow-x: hidden;
}

/* ---------------- غلاف التفاعل ---------------- */
#interactive-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

#cover-image, #envelope-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#envelope-video {
    display: none;
}

#open-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hidden {
    display: none;
}

/* ---------------- محتوى الدعوة الرئيسي ---------------- */
#wedding-invitation {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--neutral-color);
    min-height: 100vh;
    box-shadow: 0 0 25px rgba(0,0,0,0.15);
}

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(2, 44, 34, 0.5) 0%, rgba(6, 78, 59, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--secondary-color);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.quran-verse {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding: 0 10px;
    opacity: 0.9;
    font-weight: 300;
}

.wedding-title {
    font-family: 'Aref Ruqaa', serif;
    font-size: 2rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-weight: 400;
    color: var(--secondary-color);
}

.couples-names {
    font-family: 'Aref Ruqaa', serif;
    font-size: 2.7rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 400;
}

.wedding-date-text {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 300;
    color: var(--secondary-color);
}

.wedding-date-highlight {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--secondary-color);
}

.hero-logo-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wedding-logo {
    width: 75px;
    height: auto;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3));
}

/* ---------------- إطار الدعوة ---------------- */
.custom-frame-container {
    position: relative;
    width: 92%;
    max-width: 420px;
    margin: 30px auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.frame-bg-image {
    width: 100%;
    height: auto;
    display: block;
}

.frame-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.bismillah-img {
    max-width: 170px;
    height: auto;
    margin-bottom: 0;
}

.divider-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.top-divider {
    margin-top: -6px;
    margin-bottom: 12px;
}

.bottom-divider {
    margin-top: 14px;
}

.rsvp-divider {
    margin-top: 6px;
    margin-bottom: 16px;
}

.divider-img {
    max-width: 140px;
    height: auto;
}

.invitation-text-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.invitation-line-1 {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--tertiary-color);
    font-weight: 300;
}

.invitation-hosts {
    font-family: 'Aref Ruqaa', serif;
    font-size: 1.55rem;
    color: var(--tertiary-color);
    margin: 4px 0;
    font-weight: 400;
}

.invitation-line-2 {
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--tertiary-color);
    font-weight: 300;
}

.invitation-line-3, .invitation-line-4 {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--tertiary-color);
    font-weight: 300;
}

/* ---------------- قسم التقويم ---------------- */
.calendar-section {
    padding: 40px 20px 20px 20px;
    direction: ltr;
}

.calendar-month-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 2.2rem;
    color: var(--tertiary-color);
    margin-bottom: 25px;
    font-weight: 500;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px 5px;
    max-width: 320px;
    margin: 0 auto;
    font-family: 'Cormorant Garamond', serif;
}

.cal-head {
    font-weight: 600;
    color: var(--tertiary-color);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.cal-day {
    font-size: 1.25rem;
    color: var(--tertiary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    position: relative;
}

.cal-day.event-day {
    position: relative;
}

.cal-day.event-day span {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-weight: 600;
    line-height: 1;
}

.cal-day.event-day::before {
    content: '';
    position: absolute;
    top: 53%;
    left: 50%;
    width: 32px;
    height: 32px;
    background-color: #E63946;
    z-index: 1;
    clip-path: path('M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z');
    transform: translate(-50%, -50%) scale(1.65);
}

/* ---------------- قسم العد التنازلي ---------------- */
.countdown-section {
    padding: 20px 20px 40px 20px;
}

.countdown-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4px;
}

.countdown-flower-icon {
    width: 150px;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.08));
}

.countdown-title {
    font-family: 'Aref Ruqaa', serif;
    font-size: 2rem;
    color: var(--tertiary-color);
    margin-bottom: 4px;
    font-weight: 400;
}

.countdown-subtitle {
    font-family: 'Amiri', serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--tertiary-color);
    text-transform: uppercase;
    margin-bottom: 25px;
    font-weight: 300;
}

#countdown {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 360px;
    margin: 0 auto;
    direction: rtl;
}

.time-box {
    background: transparent;
    border: none;
    padding: 0;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-box span {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 2.7rem;
    font-weight: 400;
    color: var(--tertiary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.time-box label {
    font-family: 'Amiri', serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--tertiary-color);
    letter-spacing: 1px;
}

/* ---------------- قسم برنامج الحفل الخطّي ---------------- */
.program-section {
    padding: 40px 20px;
}

.program-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.program-couple-icon {
    width: 180px;
    height: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.08));
}

.program-main-title {
    font-family: 'Aref Ruqaa', serif;
    font-size: 2.2rem;
    color: var(--tertiary-color);
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: 1px;
}

.vertical-timeline {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    top: 105px;
    bottom: 95px;
    left: 50%;
    width: 1.5px;
    background-color: var(--timeline-line-color);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

.timeline-node .node-icon svg {
    width: 55px;
    height: 55px;
    stroke: var(--tertiary-color);
    margin-bottom: 6px;
    background: var(--neutral-color);
    padding: 4px;
}

.node-text {
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    color: var(--tertiary-color);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    background: var(--neutral-color);
    padding: 0 6px;
}

.timeline-heart {
    position: relative;
    z-index: 2;
    background: var(--neutral-color);
    color: var(--timeline-line-color);
    font-size: 1.2rem;
    line-height: 1;
    padding: 6px 0;
    margin: 4px 0;
}

.timeline-row {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.timeline-row.right-side {
    justify-content: flex-end;
}

.timeline-row.left-side {
    justify-content: flex-start;
}

.timeline-row .node-content {
    width: 44%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-row .node-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--tertiary-color);
    margin-bottom: 4px;
    background: var(--neutral-color);
    padding: 2px;
}

/* ---------------- تأثيرات الظهور عند التمرير ---------------- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------- قسم موقع الحفل ---------------- */
.venue-name {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--tertiary-color);
    font-weight: 400;
}

.venue-image-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.venue-building-img {
    max-width: 170px;
    height: auto;
    filter: drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s ease;
}

.venue-building-img:hover {
    transform: translateY(-4px);
}

.elegant-map-frame {
    position: relative;
    padding: 6px;
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    background-color: transparent;
    margin: 0 auto;
    max-width: 100%;
}

.map-inner-border {
    padding: 4px;
    border: 1px dashed var(--gold-light);
    border-radius: 8px;
}

.map-container {
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ---------------- قسم تأكيد الحضور ---------------- */
.rsvp-card-section {
    padding: 50px 20px 40px 20px;
    background-color: #FAF6F0;
    border-bottom: none;
}

.rsvp-gold-title {
    font-family: 'Aref Ruqaa', serif;
    font-size: 2.3rem;
    color: var(--tertiary-color);
    margin-bottom: 4px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.rsvp-subtext {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    color: var(--tertiary-color);
    line-height: 1.6;
    margin-bottom: 25px;
}

.rsvp-subtext span {
    color: var(--tertiary-color);
    font-weight: 400;
}

.wax-seal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin: 15px 0 20px 0;
    user-select: none;
}

.gold-seal-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.wax-seal-wrapper:hover .gold-seal-img {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.22));
}

.seal-arrow {
    font-size: 0.9rem;
    color: var(--tertiary-color);
    margin-top: 10px;
    margin-bottom: 2px;
    font-weight: bold;
}

.click-to-open {
    font-family: 'Aref Ruqaa', serif;
    font-size: 1.2rem;
    color: var(--tertiary-color);
    letter-spacing: 0.5px;
}

.rsvp-modal-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.rsvp-modal-form.active {
    max-height: 350px;
    opacity: 1;
    margin-top: 20px;
}

#rsvp-form input, #rsvp-form select {
    padding: 12px 14px;
    border: 1px solid var(--gold-primary);
    border-radius: 8px;
    background-color: #FFF;
    font-family: 'Amiri', serif;
    font-size: 0.95rem;
    color: var(--tertiary-color);
    outline: none;
}

.submit-btn {
    background-color: var(--primary-color);
    color: #FFF;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Amiri', serif;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background-color: var(--emerald-dark);
}

/* ---------------- التذييل ---------------- */
.matching-footer {
    padding: 40px 20px;
    background-color: var(--footer-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-heart-text {
    font-family: 'Aref Ruqaa', serif;
    font-size: 1.5rem;
    color: var(--tertiary-color);
    margin: 0;
}

/* ---------------- الأقسام العامة ---------------- */
.section {
    padding: 35px 20px;
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

.section h3 {
    color: var(--tertiary-color);
    font-size: 1.7rem;
    margin-bottom: 20px;
    font-family: 'Aref Ruqaa', serif;
    font-weight: 400;
}