/* Google Fonts Import for Premium Wedding Typography */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Great+Vibes&family=Amiri:ital,wght@0,400;0,700;1,400&family=Reem+Kufi:wght@400;500;700&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* CSS Custom Properties / Design Tokens */
:root {
    --primary-burgundy: #4A1E23;
    --secondary-crimson: #801823;
    --bg-ivory: #FAF6F0;
    --text-off-white: #F5EBE6;
    --gold-primary: #D4AF37;
    --gold-light: #FBF5B7;
    --gold-dark: #AA771C;
    --gold-gradient: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    
    --font-serif: 'Cinzel', 'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
    --font-arabic-heading: 'Reem Kufi', sans-serif;
    --font-arabic-body: 'Amiri', serif;
    --font-sans: 'Inter', sans-serif;
    
    --transition-slow: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-medium: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-deep: 0 20px 50px rgba(0, 0, 0, 0.3);
    --shadow-wax: 0 8px 24px rgba(74, 30, 35, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--primary-burgundy);
    color: var(--text-off-white);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Polished global page fade-in-up transition */
    animation: pageFadeIn 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* RTL Specific Overrides for Arabic Layouts */
html[dir="rtl"] body {
    font-family: var(--font-arabic-body);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--primary-burgundy);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* Utilities for Layout */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 1.5rem;
    overflow: hidden;
}

/* Background Textures */
.linen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(var(--text-off-white) 1px, transparent 0),
                      radial-gradient(var(--text-off-white) 1px, transparent 0);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    pointer-events: none;
    z-index: 1;
}

.radial-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150vw;
    height: 150vh;
    background: radial-gradient(circle, rgba(128,24,35,0.15) 0%, rgba(74,30,35,0) 70%);
    pointer-events: none;
    z-index: 1;
    animation: gentleGlowDrift 25s infinite ease-in-out;
    will-change: transform;
}

@keyframes gentleGlowDrift {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-47%, -53%) scale(1.08);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}


/* Interactive Sticky Language Widget */
.lang-widget {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
    background: rgba(74, 30, 35, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.4rem;
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-medium);
}

.lang-widget:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-off-white);
    padding: 0.5rem 1rem;
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
}

html[dir="rtl"] .lang-btn[data-lang="ar"] {
    font-family: var(--font-arabic-heading);
}

.lang-btn.active {
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* PREMIUM FULL-SCREEN PAGE TRANSITION OVERLAY */
#page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-burgundy);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

#page-transition-overlay.fade-out {
    opacity: 0;
}

.transition-logo {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--gold-primary);
    letter-spacing: 4px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    animation: monogramPulse 2s infinite ease-in-out;
}

@keyframes monogramPulse {
    0%, 100% {
        transform: scale(0.96);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.04);
        opacity: 1;
        text-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
    }
}

/* STATIC NEXT-PAGE CTA BUTTON */
.next-page-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2.2rem;
    width: 100%;
    z-index: 10;
}

.next-page-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-family: var(--font-serif);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    transition: var(--transition-medium);
}

.next-page-btn svg, .next-page-btn i {
    width: 16px;
    height: 16px;
    stroke: var(--primary-burgundy);
    stroke-width: 2.5px;
    transition: var(--transition-fast);
}

.next-page-btn:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.5);
    color: var(--secondary-crimson);
}

.next-page-btn:hover svg, .next-page-btn:hover i {
    transform: translateX(4px);
    stroke: var(--secondary-crimson);
}

.next-page-btn:active {
    transform: scale(0.96) translateY(1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* RTL Support - rotates chevron direction naturally for Arabic layouts */
html[dir="rtl"] .next-page-btn svg, html[dir="rtl"] .next-page-btn i {
    transform: rotate(180deg);
}

html[dir="rtl"] .next-page-btn:hover svg, html[dir="rtl"] .next-page-btn:hover i {
    transform: rotate(180deg) translateX(4px);
}

/* Alignment fixes for Lucide Icons */
.lucide-icon {
    display: inline-block;
    vertical-align: middle;
    width: 1.2em;
    height: 1.2em;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}


/* ========================================================
   SECTION 1: THE ENVELOPE (HERO LANDING)
   ======================================================== */
.envelope-section {
    background-color: var(--primary-burgundy);
    z-index: 2;
}

.envelope-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Curved Arc Text directly above Wax Seal */
.arc-container {
    width: 220px;
    height: 60px;
    margin-bottom: -10px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.arc-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.arc-text {
    font-family: var(--font-serif);
    font-size: 13px;
    letter-spacing: 5px;
    fill: var(--text-off-white);
    text-transform: uppercase;
    text-anchor: middle;
    font-weight: 500;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

html[dir="rtl"] .arc-text {
    font-family: var(--font-arabic-heading);
    letter-spacing: 1px;
    font-size: 14px;
}

/* 3D Realistic Wax Seal Button */
.wax-seal-container {
    position: relative;
    cursor: pointer;
    transition: var(--transition-medium);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wax-seal {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #801823 0%, #4A1E23 70%, #290d11 100%);
    box-shadow: var(--shadow-wax);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(128, 24, 35, 0.8);
}

.wax-seal::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 53% 47% 52% 48% / 47% 53% 48% 52%;
    background: inherit;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.15), 0 5px 15px rgba(0,0,0,0.3);
    z-index: -1;
}

.wax-seal-inner {
    width: 76%;
    height: 73%;
    border-radius: 50%;
    border: 2.5px double rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(255, 255, 255, 0.15);
    background: radial-gradient(circle at 50% 50%, #61131a 0%, #401417 100%);
}

.wax-seal-emblem {
    width: 55%;
    height: 55%;
    fill: rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0px 1px 1px rgba(255,255,255,0.15));
    opacity: 0.85;
    transition: var(--transition-medium);
}

.wax-seal-container:hover {
    transform: scale(1.06) rotate(3deg);
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
}

.wax-seal-container:hover .wax-seal-emblem {
    opacity: 1;
    fill: rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

.wax-seal-container:active {
    transform: scale(0.96);
}


/* ========================================================
   SECTION 2: THE MAIN INVITATION CARD
   ======================================================== */
.invitation-section {
    background-color: var(--primary-burgundy);
}

.invitation-card {
    background-color: var(--bg-ivory);
    color: var(--primary-burgundy);
    max-width: 580px;
    width: 90%;
    border-radius: 4px;
    box-shadow: var(--shadow-deep);
    padding: 5rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Floral Branch Sideliners */
.floral-border-left, .floral-border-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: auto;
    pointer-events: none;
    opacity: 0.85;
    z-index: 2;
}

.floral-border-left {
    left: -2.5rem;
}

.floral-border-right {
    right: -2.5rem;
    transform: translateY(-50%) scaleX(-1);
}

/* Card inner borders */
.card-border {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid rgba(74, 30, 35, 0.15);
    pointer-events: none;
}

.card-border-inner {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid var(--gold-primary);
    opacity: 0.6;
    pointer-events: none;
}

/* Basmala calligraphy */
.basmala {
    font-family: var(--font-arabic-body);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-burgundy);
    letter-spacing: 0;
    text-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

/* Subtitles & Headings */
.family-subtitle {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    letter-spacing: 2px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    max-width: 85%;
    font-weight: 600;
}

html[dir="rtl"] .family-subtitle {
    font-family: var(--font-arabic-body);
    font-size: 1.15rem;
    letter-spacing: 0;
    line-height: 1.6;
}

/* Big Script Names styling */
.couple-names {
    font-family: var(--font-script);
    font-size: 4.8rem;
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--secondary-crimson);
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
    display: inline-block;
}

html[dir="rtl"] .couple-names {
    font-family: var(--font-arabic-heading);
    font-size: 3rem;
    line-height: 1.4;
    color: var(--primary-burgundy);
}

/* Subtext/Date Below Names */
.invitation-date {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    letter-spacing: 6px;
    font-weight: 600;
    color: var(--primary-burgundy);
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    padding: 0.8rem 1.5rem;
    margin-top: 1rem;
    display: inline-block;
}


/* ========================================================
   DETAILS PAGE: CALENDAR & LOCALISATION CARDS
   ======================================================== */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    width: 90%;
    z-index: 10;
    margin-bottom: 4rem;
}

.details-card {
    background: rgba(250, 246, 240, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-deep);
    text-align: center;
    position: relative;
    backdrop-filter: blur(8px);
    transition: var(--transition-medium);
}

.details-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.15);
}

.calendar-heading {
    font-family: var(--font-serif);
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

html[dir="rtl"] .calendar-heading {
    font-family: var(--font-arabic-heading);
    letter-spacing: 0;
    font-size: 1.8rem;
}

.calendar-month {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 6px;
    color: var(--gold-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

/* Localized 7-column grid generated via JS */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.weekday-header {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--gold-primary);
    padding: 0.4rem 0;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 50%;
    transition: var(--transition-fast);
    position: relative;
}

.calendar-day.empty {
    opacity: 0;
    pointer-events: none;
}

.calendar-day.highlight-date {
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    animation: pulseGold 2.5s infinite;
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.calendar-day.highlight-date::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1.5px dashed var(--gold-primary);
    border-radius: 50%;
    pointer-events: none;
}

/* Map frame card cutout */
.location-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

html[dir="rtl"] .location-title {
    font-family: var(--font-arabic-heading);
    letter-spacing: 0;
}

.location-subheading {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--gold-primary);
    margin-bottom: 2rem;
}

html[dir="rtl"] .location-subheading {
    font-family: var(--font-arabic-body);
    letter-spacing: 0;
}

.map-card {
    background: var(--bg-ivory);
    padding: 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--gold-primary);
    box-shadow: var(--shadow-deep);
    overflow: hidden;
}

.map-frame {
    width: 100%;
    height: 260px;
    border: none;
    border-radius: 2px;
    display: block;
}


/* ========================================================
   DEDICATED RSVP PAGE FORM STYLES
   ======================================================== */
.rsvp-page-card {
    background-color: var(--bg-ivory);
    color: var(--primary-burgundy);
    max-width: 580px;
    width: 90%;
    border-radius: 4px;
    box-shadow: var(--shadow-deep);
    padding: 4rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 10;
    border: 1px solid rgba(212, 175, 55, 0.35);
    margin-bottom: 5rem;
}

.rsvp-page-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    letter-spacing: 4px;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--primary-burgundy);
}

html[dir="rtl"] .rsvp-page-title {
    font-family: var(--font-arabic-heading);
    letter-spacing: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

html[dir="rtl"] .form-group {
    text-align: right;
}

.form-label {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

html[dir="rtl"] .form-label {
    font-family: var(--font-arabic-heading);
    letter-spacing: 0;
    font-size: 0.95rem;
}

.form-label svg {
    color: var(--gold-primary);
    width: 16px;
    height: 16px;
}

.form-input, .form-select, .form-textarea {
    background: #ffffff;
    border: 1px solid rgba(74, 30, 35, 0.2);
    border-radius: 4px;
    padding: 0.8rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--primary-burgundy);
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

/* Radio Choice Alignment */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.3rem;
}

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

.radio-input {
    accent-color: var(--primary-burgundy);
    width: 18px;
    height: 18px;
}

/* Form buttons */
.submit-btn {
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 4px;
    padding: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    text-transform: uppercase;
}

html[dir="rtl"] .submit-btn {
    font-family: var(--font-arabic-heading);
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212,175,55,0.35);
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    pointer-events: none;
    display: none;
}


/* ========================================================
   SECTION 6: FOOTER SIGN-OFF
   ======================================================== */
.footer-section {
    background-color: var(--primary-burgundy);
    padding-bottom: 7rem;
}

.footer-card {
    background-color: var(--bg-ivory);
    color: var(--primary-burgundy);
    max-width: 580px;
    width: 90%;
    border-radius: 4px;
    box-shadow: var(--shadow-deep);
    padding: 4.5rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--primary-burgundy);
    max-width: 85%;
}

html[dir="rtl"] .footer-text {
    font-family: var(--font-arabic-body);
    font-size: 1.35rem;
    font-style: normal;
    line-height: 1.6;
}

/* Large corner illustrations (SVGs) */
.floral-corner-tl, .floral-corner-tr, .floral-corner-bl, .floral-corner-br {
    position: absolute;
    width: 75px;
    height: auto;
    pointer-events: none;
    opacity: 0.85;
    z-index: 2;
}

.floral-corner-tl { top: 0; left: 0; }
.floral-corner-tr { top: 0; right: 0; transform: scaleX(-1); }
.floral-corner-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.floral-corner-br { bottom: 0; right: 0; transform: scale(-1); }


/* ========================================================
   DEDICATED DOCK/ADMIN.HTML STYLES
   ======================================================== */
.admin-body {
    background-color: #240c0f;
    min-height: 100vh;
    padding: 2.5rem;
}

/* Password Lock Overlay Card */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    position: relative;
}

.admin-login-card {
    background: var(--bg-ivory);
    color: var(--primary-burgundy);
    border-radius: 6px;
    border: 1.5px solid var(--gold-primary);
    padding: 3.5rem 2.5rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-deep);
}

.admin-login-icon {
    background: rgba(74, 30, 35, 0.08);
    color: var(--primary-burgundy);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.admin-login-icon svg {
    width: 32px;
    height: 32px;
}

.admin-login-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

/* Master Panel */
.admin-panel-container {
    display: none; /* Revealed on login */
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-off-white);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.admin-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-title-group svg {
    color: var(--gold-primary);
    width: 32px;
    height: 32px;
}

.admin-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-off-white);
}

.admin-nav {
    display: flex;
    gap: 1rem;
}

.admin-nav-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--text-off-white);
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav-btn svg {
    width: 16px;
    height: 16px;
}

.admin-nav-btn.active, .admin-nav-btn:hover {
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    border-color: transparent;
}

/* KPIs analytical charts */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: rgba(250, 246, 240, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    padding: 1.8rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(5px);
    transition: var(--transition-medium);
}

.kpi-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
}

.kpi-label {
    font-size: 0.8rem;
    font-family: var(--font-serif);
    color: var(--gold-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.kpi-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0.5rem;
}

/* Tabs content states */
.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Search bar control layout */
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-wrapper svg {
    position: absolute;
    left: 1rem;
    color: rgba(255,255,255,0.4);
    width: 16px;
    height: 16px;
}

.search-input {
    background: rgba(250, 246, 240, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--text-off-white);
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border-radius: 4px;
    outline: none;
    width: 320px;
    font-size: 0.92rem;
    transition: var(--transition-fast);
}

.search-input:focus {
    border-color: var(--gold-primary);
    background: rgba(250, 246, 240, 0.08);
}

.btn-export {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-serif);
    font-weight: 600;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export svg {
    width: 16px;
    height: 16px;
}

.btn-export:hover {
    background: var(--gold-primary);
    color: var(--primary-burgundy);
}

/* Tables styling */
.table-wrapper {
    overflow-x: auto;
    background: rgba(250, 246, 240, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.admin-table th, .admin-table td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.admin-table th {
    background: rgba(74, 30, 35, 0.4);
    color: var(--gold-primary);
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background: rgba(250, 246, 240, 0.04);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge svg {
    width: 12px;
    height: 12px;
}

.badge.attending {
    background: rgba(46, 125, 50, 0.15);
    color: #81c784;
    border: 1px solid rgba(74, 175, 80, 0.25);
}

.badge.declined {
    background: rgba(198, 40, 40, 0.15);
    color: #e57373;
    border: 1px solid rgba(229, 115, 115, 0.25);
}

/* CMS structures */
.cms-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    margin-top: 1rem;
}

.cms-lang-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cms-lang-btn {
    background: rgba(250, 246, 240, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: var(--text-off-white);
    padding: 0.9rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-serif);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cms-lang-btn svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.cms-lang-btn.active, .cms-lang-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.cms-lang-btn.active svg {
    opacity: 1;
}

.cms-editor-pane {
    background: rgba(250, 246, 240, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    padding: 2.5rem;
}

.cms-editor-scroll {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cms-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cms-field-label {
    font-size: 0.8rem;
    font-family: var(--font-serif);
    color: var(--gold-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.cms-field-input {
    background: rgba(74, 30, 35, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: var(--text-off-white);
    padding: 0.8rem 1rem;
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition-fast);
}

.cms-field-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.cms-submit-btn {
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    border: none;
    padding: 1.1rem 2.5rem;
    font-family: var(--font-serif);
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    margin-top: 2rem;
    align-self: flex-start;
    transition: var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cms-submit-btn svg {
    width: 18px;
    height: 18px;
}

.cms-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.35);
}


/* ========================================================
   ANIMATION & PRESENTATION EFFECTS (INTERSECTION OBSERVER)
   ======================================================== */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: var(--transition-slow);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }


/* ========================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ======================================================== */
@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }
    
    .invitation-card, .rsvp-page-card {
        padding: 3.5rem 1.5rem;
    }
    
    .floral-border-left, .floral-border-right {
        width: 55px;
    }
    
    .floral-border-left { left: -1.3rem; }
    .floral-border-right { right: -1.3rem; }
    
    .basmala {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .couple-names {
        font-size: 3.4rem;
    }
    
    html[dir="rtl"] .couple-names {
        font-size: 2.2rem;
    }
    
    .invitation-date {
        font-size: 1.15rem;
        letter-spacing: 3px;
        padding: 0.6rem 1rem;
    }
    
    .floating-nav {
        padding: 0.5rem 1.2rem;
        gap: 1.2rem;
        bottom: 1.5rem;
    }
    
    .nav-item {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }
    
    .cms-grid {
        grid-template-columns: 1fr;
    }
    
    .cms-lang-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .admin-body {
        padding: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
}

/* PREMIUM MINIMAL CREDITS FOOTER */
.credits-footer {
    width: 100%;
    background-color: var(--primary-burgundy);
    color: var(--text-off-white);
    padding: 2.5rem 1rem 3rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    font-family: var(--font-serif);
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    line-height: 1.8;
    text-transform: uppercase;
    position: relative;
    z-index: 10;
}

.credits-link {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1.5px solid transparent;
    transition: var(--transition-fast);
}

.credits-link:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-light);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* PREMIUM FOOTER SHORTCUT BUTTON & 404 */
.admin-shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.2rem;
    color: var(--text-off-white);
    opacity: 0.4;
    font-size: 0.72rem;
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
}

.admin-shortcut-btn i {
    width: 12px;
    height: 12px;
}

.admin-shortcut-btn:hover {
    opacity: 0.95;
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

/* PREMIUM 404 CUSTOM ERROR STYLES */
.error-404-container {
    min-height: 100vh;
    background-color: var(--primary-burgundy);
    background-image: radial-gradient(circle at 50% 50%, #801823 0%, #4A1E23 75%, #230b0d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.error-404-card {
    background-color: rgba(74, 30, 35, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-off-white);
    max-width: 520px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: var(--shadow-deep), 0 0 40px rgba(0, 0, 0, 0.5);
    padding: 4rem 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.error-404-icon {
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
    animation: successHeartBeat 2s infinite ease-in-out;
}


/* CMS FIELD HELPERS & MAP LIVE PREVIEW */
.cms-field-helper {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    margin-top: -0.2rem;
}

.cms-field-helper code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: var(--gold-light);
    font-family: monospace;
}

.cms-map-preview-container {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cms-map-preview-frame {
    width: 100%;
    height: 180px;
    border: 1px solid var(--gold-primary);
    border-radius: 4px;
    background: #000;
}

/* ========================================================
   FULLSCREEN RSVP SUCCESS POPUP COMPONENT (PHASE 8)
   ======================================================== */
#fullscreen-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-burgundy);
    background-image: radial-gradient(circle at 50% 50%, #801823 0%, #4A1E23 75%, #230b0d 100%);
    color: var(--text-off-white);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

#fullscreen-success-overlay.active {
    opacity: 1;
    transform: scale(1);
}

.success-popup-card {
    background-color: rgba(74, 30, 35, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-off-white);
    max-width: 440px;
    width: 90%;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: var(--shadow-deep), 0 0 40px rgba(0, 0, 0, 0.5);
    padding: 3rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 100000;
    gap: 1rem;
    animation: successCardEntry 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.success-popup-card .card-border {
    border: 1px solid rgba(212, 175, 55, 0.25);
}

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

.success-heart-icon {
    color: var(--gold-primary);
    transform: scale(1.0);
    margin: 0.25rem 0;
    animation: successHeartBeat 1.8s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes successHeartBeat {
    0%, 100% {
        transform: scale(1.0);
        filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2));
    }
    14% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
    }
    28% {
        transform: scale(1.0);
        filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2));
    }
    42% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
    }
    70% {
        transform: scale(1.0);
        filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2));
    }
}

.success-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--gold-primary);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

html[dir="rtl"] .success-title {
    font-family: var(--font-arabic-heading);
    font-size: 1.85rem;
    letter-spacing: 0;
}

.success-desc {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-off-white);
    max-width: 380px;
}

html[dir="rtl"] .success-desc {
    font-family: var(--font-arabic-body);
    font-size: 1.25rem;
    line-height: 1.6;
}

.success-dismiss-text {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    letter-spacing: 2px;
    opacity: 0.65;
    text-transform: uppercase;
    margin-top: 1rem;
    animation: successTextBlink 2.5s infinite ease-in-out;
}

@keyframes successTextBlink {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.9;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
}

.success-card-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    opacity: 0.85;
    z-index: 15;
}

.success-card-corner-tl { top: 18px; left: 18px; }
.success-card-corner-tr { top: 18px; right: 18px; transform: scaleX(-1); }
.success-card-corner-bl { bottom: 18px; left: 18px; transform: scaleY(-1); }
.success-card-corner-br { bottom: 18px; right: 18px; transform: scale(-1); }

/* DEDICATED LOCATION EDITOR COMPONENT */
.location-editor-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .location-editor-grid {
        flex-direction: column;
    }
}

