/* ========================================
   WEDDING INVITATION STYLES
   Design System with Day/Night Theme
   ======================================== */

/* ========================================
   CSS VARIABLES / DESIGN TOKENS
   ======================================== */
:root {
    /* Primary Colors - Sage Green & Rose Gold */
    --color-primary: #7c9885;
    --color-primary-light: #a8c4b0;
    --color-primary-dark: #5a7661;
    --color-secondary: #c9a87c;
    --color-secondary-light: #e0c9a8;
    --color-accent: #d4a5a5;
    --color-accent-light: #f0d4d4;

    /* Background Colors */
    --bg-primary: #fdfcfb;
    --bg-secondary: #f8f5f2;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-overlay: rgba(0, 0, 0, 0.4);

    /* Text Colors */
    --text-primary: #2d2d2d;
    --text-secondary: #5a5a5a;
    --text-muted: #8a8a8a;
    --text-light: #ffffff;

    /* Borders & Shadows */
    --border-color: rgba(124, 152, 133, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(124, 152, 133, 0.3);

    /* Typography */
    --font-display: 'Playfair Display', 'Georgia', serif;
    --font-elegant: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Poppins', 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: 5rem 1.5rem;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
.dark {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-glass: rgba(26, 26, 46, 0.9);
    --text-primary: #f0f0f0;
    --text-secondary: #c0c0c0;
    --text-muted: #888888;
    --border-color: rgba(168, 196, 176, 0.2);
    --shadow-glow: 0 0 30px rgba(168, 196, 176, 0.2);
}

/* ========================================
   BASE STYLES
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.font-display {
    font-family: var(--font-display);
}

.font-elegant {
    font-family: var(--font-elegant);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.05em;
    /* Premium feel */
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-secondary {
    background-color: var(--color-secondary);
}

/* Glass Morphism Card */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-light);
    font-weight: 500;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--color-primary);
    font-weight: 500;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--text-light);
}

/* ========================================
   COVER / OPENING SECTION
   ======================================== */
#cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Parallax effect will be handled by JS or CSS 3D transform if needed,
       but for now we keep it simple or use fixed attachment */
    background: linear-gradient(135deg,
            rgba(124, 152, 133, 0.9),
            rgba(201, 168, 124, 0.8)),
        url('https://images.unsplash.com/photo-1519741497674-611481863552?w=1920&h=1080&fit=crop') center/cover no-repeat fixed;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 2;
}

/* Premium Styles additions */
.flower-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    /* Below modal/lightbox */
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.cover-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.cover-ornament {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-light), transparent);
    margin: 1.5rem auto;
}

.cover-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cover-names {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.3);
}

.cover-names .ampersand {
    font-family: var(--font-elegant);
    font-style: italic;
    font-size: 2.5rem;
    display: block;
    margin: 0.5rem 0;
    opacity: 0.8;
}

.cover-date {
    font-size: 1.25rem;
    font-weight: 300;
    margin-top: 1.5rem;
    letter-spacing: 2px;
}

.cover-guest {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cover-guest-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.cover-guest-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}

#openInvitation {
    margin-top: 2.5rem;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

/* Countdown in Cover */
#countdown {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.countdown-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    min-width: 80px;
}

.countdown-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Countdown Urgency Colors */
.countdown-relaxed .countdown-item {
    background: rgba(72, 187, 120, 0.2);
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.countdown-relaxed .countdown-number {
    color: #48bb78;
}

.countdown-soon .countdown-item {
    background: rgba(214, 158, 46, 0.2);
    border: 1px solid rgba(214, 158, 46, 0.3);
}

.countdown-soon .countdown-number {
    color: #d69e2e;
}

.countdown-urgent .countdown-item {
    background: rgba(237, 137, 54, 0.2);
    border: 1px solid rgba(237, 137, 54, 0.3);
}

.countdown-urgent .countdown-number {
    color: #ed8936;
}

.countdown-imminent .countdown-item {
    background: rgba(245, 101, 101, 0.2);
    border: 1px solid rgba(245, 101, 101, 0.3);
    animation: imminentPulse 1s ease-in-out infinite;
}

.countdown-imminent .countdown-number {
    color: #f56565;
}

@keyframes imminentPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Countdown Celebration (Event Day) */
.countdown-celebration {
    background: linear-gradient(135deg, rgba(236, 201, 75, 0.3), rgba(245, 158, 11, 0.3));
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    animation: celebrationGlow 2s ease-in-out infinite;
}

.countdown-live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.live-icon {
    font-size: 1.5rem;
    animation: bounce 1s ease-in-out infinite;
}

.live-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(90deg, #f59e0b, #ec4899, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s linear infinite;
}

@keyframes celebrationGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(236, 201, 75, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.5);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes shimmerText {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ========================================
   FLOATING CONTROLS
   ======================================== */
.floating-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.floating-btn:hover {
    transform: scale(1.1);
    background: var(--color-primary);
    color: var(--text-light);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
#mainContent {
    opacity: 1;
}

#mainContent.hidden {
    display: none;
}

section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-label {
    font-size: 0.875rem;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.dark .section-title {
    color: var(--color-primary-light);
}

.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 0 auto;
    border-radius: 2px;
}

/* ========================================
   COUPLE SECTION
   ======================================== */
.couple-section {
    background: var(--bg-secondary);
}

.couple-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: center;
}

.couple-card {
    text-align: center;
    padding: 2rem;
}

.couple-photo-wrapper {
    position: relative;
    width: 220px;
    height: 280px;
    margin: 0 auto 2rem;
}

.couple-photo-frame {
    position: absolute;
    inset: 0;
    border: 3px solid var(--color-primary);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-5deg);
}

.couple-photo-frame.right {
    transform: rotate(5deg);
}

.couple-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: var(--shadow-lg);
}

.couple-name {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.dark .couple-name {
    color: var(--color-primary-light);
}

.couple-parents {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.couple-bio {
    font-family: var(--font-elegant);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.couple-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.social-link:hover {
    transform: translateY(-3px);
    background: var(--color-secondary);
}

.couple-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.couple-divider-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
}

.couple-divider-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.5rem;
}

/* Quote Box */
.quote-box {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
    padding: 2rem;
}

.quote-text {
    font-family: var(--font-elegant);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.quote-source {
    color: var(--color-primary);
    font-weight: 500;
}

/* ========================================
   LOVE STORY TIMELINE
   ======================================== */
.story-section {
    background: var(--bg-primary);
}

#storyTimeline {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.story-item {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.story-image {
    flex: 1;
}

.story-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.story-image img:hover {
    transform: scale(1.02);
}

.story-content {
    flex: 1;
    padding: 1rem;
}

.story-content span {
    font-size: 0.875rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.story-content h3 {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin: 0.5rem 0 1rem;
}

.dark .story-content h3 {
    color: var(--color-primary-light);
}

.story-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   EVENTS SECTION
   ======================================== */
.events-section {
    background: var(--bg-secondary);
}

#eventsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.event-card {
    transition: var(--transition-normal);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-icon {
    transition: var(--transition-normal);
}

.event-card:hover .event-icon {
    transform: scale(1.1);
}

/* ========================================
   LOCATION SECTION
   ======================================== */
.location-section {
    background: var(--bg-primary);
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.location-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.distance-display {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-glass);
    border-radius: 1rem;
}

/* ========================================
   RSVP SECTION
   ======================================== */
.rsvp-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-light);
}

.rsvp-section .section-title {
    color: var(--text-light);
}

.rsvp-section .section-label {
    color: rgba(255, 255, 255, 0.8);
}

.rsvp-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.rsvp-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--text-light);
    background: rgba(255, 255, 255, 0.15);
}

.form-select option {
    background: var(--color-primary);
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.rsvp-submit {
    width: 100%;
    padding: 1rem;
    background: var(--text-light);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.rsvp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.rsvp-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   MESSAGE WALL
   ======================================== */
.messages-section {
    background: var(--bg-secondary);
}

#messageWall {
    display: grid;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.message-card {
    transition: var(--transition-normal);
}

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

.message-avatar {
    flex-shrink: 0;
}

/* ========================================
   GALLERY SECTION
   ======================================== */
.gallery-section {
    background: var(--bg-primary);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gallery-filter {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.gallery-filter:hover,
.gallery-filter.active {
    background: var(--color-primary);
    color: var(--text-light);
}

#galleryGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-item img {
    transition: var(--transition-normal);
}

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

.gallery-overlay {
    pointer-events: none;
}

/* Lightbox */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#lightbox.hidden {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

#lightboxImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 1rem;
}

#lightboxCaption {
    text-align: center;
    color: var(--text-light);
    margin-top: 1rem;
    font-size: 1.1rem;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   GIFT SECTION
   ======================================== */
.gift-section {
    background: var(--bg-secondary);
}

#giftAccounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.gift-card {
    transition: var(--transition-normal);
}

.gift-card:hover {
    transform: translateY(-5px);
}

#qrisContainer {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* ========================================
   PROTOCOL SECTION
   ======================================== */
.protocol-section {
    background: var(--bg-primary);
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.protocol-card {
    padding: 2rem;
}

.protocol-card h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dark .protocol-card h3 {
    color: var(--color-primary-light);
}

#protocolRules {
    list-style: none;
}

#protocolRules li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

#contactPersons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ========================================
   CLOSING SECTION
   ======================================== */
.closing-section {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    text-align: center;
}

.closing-content {
    max-width: 700px;
    margin: 0 auto;
}

.closing-message {
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.closing-signature {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.closing-names {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-primary);
}

.dark .closing-names {
    color: var(--color-primary-light);
}

.closing-vendor {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.closing-vendor img {
    height: 50px;
    margin-bottom: 0.5rem;
}

.closing-vendor p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem;
    font-size: 0.875rem;
}

footer a {
    color: var(--text-light);
    text-decoration: underline;
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Base Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ========================================
   OPENING SECTION ADVANCED ANIMATIONS
   ======================================== */

/* Floating Particles - Petals/Hearts */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg) scale(0.5);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(720deg) scale(1);
    }
}

@keyframes floatUpSlow {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) rotate(0deg);
    }

    10% {
        opacity: 0.8;
    }

    50% {
        transform: translateY(0) translateX(30px) rotate(180deg);
    }

    90% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translateY(-100vh) translateX(-30px) rotate(360deg);
    }
}

@keyframes sway {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(20px) rotate(5deg);
    }

    75% {
        transform: translateX(-20px) rotate(-5deg);
    }
}

/* Shimmer Effect for Text */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(255, 255, 255, 0.1);
    }

    50% {
        text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.3),
            0 0 40px rgba(255, 255, 255, 0.3),
            0 0 60px rgba(255, 255, 255, 0.2);
    }
}

/* Decorative Element Animations */
@keyframes rotateFloat {
    0% {
        transform: rotate(0deg) translateY(0);
    }

    25% {
        transform: rotate(5deg) translateY(-5px);
    }

    50% {
        transform: rotate(0deg) translateY(-10px);
    }

    75% {
        transform: rotate(-5deg) translateY(-5px);
    }

    100% {
        transform: rotate(0deg) translateY(0);
    }
}

@keyframes rotateFloatReverse {
    0% {
        transform: scaleX(-1) rotate(0deg) translateY(0);
    }

    25% {
        transform: scaleX(-1) rotate(-5deg) translateY(-5px);
    }

    50% {
        transform: scaleX(-1) rotate(0deg) translateY(-10px);
    }

    75% {
        transform: scaleX(-1) rotate(5deg) translateY(-5px);
    }

    100% {
        transform: scaleX(-1) rotate(0deg) translateY(0);
    }
}

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
}

/* Button Glow Animation */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(124, 152, 133, 0.4),
            0 0 30px rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 4px 25px rgba(124, 152, 133, 0.6),
            0 0 50px rgba(255, 255, 255, 0.2),
            0 0 70px rgba(124, 152, 133, 0.3);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Ornament Line Animation */
@keyframes expandLine {
    0% {
        width: 0;
        opacity: 0;
    }

    100% {
        width: 120px;
        opacity: 1;
    }
}

/* Countdown Bounce */
@keyframes countdownBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Staggered Text Reveal */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) rotateX(-20deg);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
        filter: blur(0);
    }
}

/* ========================================
   SECTION ANIMATIONS
   ======================================== */

/* Photo Frame Animation */
@keyframes frameReveal {
    0% {
        opacity: 0;
        transform: rotate(-5deg) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: rotate(-5deg) scale(1);
    }
}

@keyframes frameRevealRight {
    0% {
        opacity: 0;
        transform: rotate(5deg) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: rotate(5deg) scale(1);
    }
}

/* Timeline Draw Animation */
@keyframes drawLine {
    0% {
        height: 0;
        opacity: 0;
    }

    100% {
        height: 60px;
        opacity: 1;
    }
}

/* Card Reveal Animation */
@keyframes cardSlideLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px) rotateY(10deg);
    }

    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

@keyframes cardSlideRight {
    0% {
        opacity: 0;
        transform: translateX(50px) rotateY(-10deg);
    }

    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

@keyframes cardFlip {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateY(90deg);
    }

    100% {
        opacity: 1;
        transform: perspective(1000px) rotateY(0);
    }
}

/* Map Zoom */
@keyframes mapZoom {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gallery Masonry Reveal */
@keyframes masonryReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Signature Flourish */
@keyframes signatureWrite {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }

    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Sparkle Effect */
@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* ========================================
   OPENING SECTION ENHANCED STYLES
   ======================================== */

/* Particles Container */
.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: floatUpSlow 15s infinite ease-in-out;
    color: rgba(255, 255, 255, 0.6);
}

.particle:nth-child(1) {
    left: 5%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 15%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.particle:nth-child(3) {
    left: 25%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.particle:nth-child(4) {
    left: 35%;
    animation-delay: 1s;
    animation-duration: 13s;
}

.particle:nth-child(5) {
    left: 45%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.particle:nth-child(6) {
    left: 55%;
    animation-delay: 5s;
    animation-duration: 17s;
}

.particle:nth-child(7) {
    left: 65%;
    animation-delay: 2.5s;
    animation-duration: 14s;
}

.particle:nth-child(8) {
    left: 75%;
    animation-delay: 0.5s;
    animation-duration: 12s;
}

.particle:nth-child(9) {
    left: 85%;
    animation-delay: 3.5s;
    animation-duration: 16s;
}

.particle:nth-child(10) {
    left: 95%;
    animation-delay: 1.5s;
    animation-duration: 13s;
}

.particle:nth-child(11) {
    left: 10%;
    animation-delay: 6s;
    animation-duration: 18s;
}

.particle:nth-child(12) {
    left: 30%;
    animation-delay: 7s;
    animation-duration: 14s;
}

.particle:nth-child(13) {
    left: 50%;
    animation-delay: 8s;
    animation-duration: 15s;
}

.particle:nth-child(14) {
    left: 70%;
    animation-delay: 9s;
    animation-duration: 16s;
}

.particle:nth-child(15) {
    left: 90%;
    animation-delay: 10s;
    animation-duration: 17s;
}

/* Enhanced Cover Content */
.cover-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

.cover-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0;
    animation: textReveal 1s ease-out 0.3s forwards;
}

.cover-ornament {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-light), transparent);
    margin: 1.5rem auto;
    animation: expandLine 1.2s ease-out 0.5s forwards;
}

.cover-names {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    animation: textGlow 3s ease-in-out infinite;
    position: relative;
}

.cover-names .groom-nickname,
.cover-names .bride-nickname {
    display: inline-block;
    opacity: 0;
    animation: textReveal 0.8s ease-out forwards;
}

.cover-names .groom-nickname {
    animation-delay: 0.7s;
}

.cover-names .bride-nickname {
    animation-delay: 1.1s;
}

.cover-names .ampersand {
    font-family: var(--font-elegant);
    font-style: italic;
    font-size: 2.5rem;
    display: block;
    margin: 0.5rem 0;
    opacity: 0;
    animation: textReveal 0.6s ease-out 0.9s forwards;
}

/* Shimmer overlay on names */
.cover-names::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.cover-date {
    font-size: 1.25rem;
    font-weight: 300;
    margin-top: 1.5rem;
    letter-spacing: 2px;
    opacity: 0;
    animation: textReveal 0.8s ease-out 1.3s forwards;
}

.cover-guest {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: textReveal 0.8s ease-out 1.5s forwards;
}

/* Enhanced Decorative Elements with Animation */
.cover-decor {
    position: absolute;
    opacity: 0.2;
    color: white;
    font-size: 4rem;
    z-index: 3;
}

.cover-decor-top-left {
    top: 10%;
    left: 5%;
    animation: rotateFloat 6s ease-in-out infinite;
}

.cover-decor-top-right {
    top: 10%;
    right: 5%;
    animation: rotateFloatReverse 6s ease-in-out infinite;
    animation-delay: 1s;
}

.cover-decor-bottom-left {
    bottom: 15%;
    left: 5%;
    animation: heartPulse 2s ease-in-out infinite;
}

.cover-decor-bottom-right {
    bottom: 15%;
    right: 5%;
    animation: heartPulse 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Enhanced Open Button */
#openInvitation {
    margin-top: 2.5rem;
    animation: glowPulse 2s infinite ease-in-out;
    position: relative;
    z-index: 20;
    pointer-events: auto;
    opacity: 0;
    animation: textReveal 0.8s ease-out 1.8s forwards, glowPulse 2s infinite ease-in-out 2s;
}

#openInvitation::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    z-index: -1;
    animation: ripple 2s infinite ease-out;
}

/* Countdown Animation */
.countdown-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    min-width: 80px;
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: scale(1.05);
}

.countdown-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    animation: countdownBounce 1s ease-in-out;
}

/* Parallax Background */
.cover-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: linear-gradient(135deg,
            rgba(124, 152, 133, 0.9),
            rgba(201, 168, 124, 0.8)),
        url('/assets/images/main.webp') center/cover;
    transition: transform 0.1s ease-out;
}

/* ========================================
   SECTION ENHANCED ANIMATIONS
   ======================================== */

/* Couple Photo Animation */
.couple-photo-frame {
    position: absolute;
    inset: 0;
    border: 3px solid var(--color-primary);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-5deg);
    opacity: 0;
    animation: frameReveal 0.8s ease-out forwards;
}

.couple-photo-frame.right {
    transform: rotate(5deg);
    animation: frameRevealRight 0.8s ease-out forwards;
}

[data-aos="fade-right"] .couple-photo-frame,
[data-aos="fade-left"] .couple-photo-frame.right {
    animation-delay: 0.3s;
}

/* Couple Divider Animation */
.couple-divider-line {
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    animation: drawLine 0.8s ease-out forwards;
}

.couple-divider-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.5rem;
    animation: iconBounce 2s ease-in-out infinite;
}

/* Social Links Animation */
.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition-normal);
    animation: iconBounce 2s ease-in-out infinite;
}

.social-link:nth-child(1) {
    animation-delay: 0s;
}

.social-link:nth-child(2) {
    animation-delay: 0.2s;
}

.social-link:nth-child(3) {
    animation-delay: 0.4s;
}

/* Event Card Animation */
.event-card {
    transition: var(--transition-normal);
    transform-style: preserve-3d;
}

.event-card:nth-child(odd) {
    animation: cardSlideLeft 0.6s ease-out;
}

.event-card:nth-child(even) {
    animation: cardSlideRight 0.6s ease-out;
}

.event-card .event-icon {
    animation: iconBounce 2s ease-in-out infinite;
}

/* Story Item Enhanced */
.story-item {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.story-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--color-primary), transparent);
    transform: translateX(-50%);
    opacity: 0.3;
}

/* Map Animation */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    animation: mapZoom 0.8s ease-out;
}

/* Message Card Cascade */
.message-card {
    transition: var(--transition-normal);
    animation: masonryReveal 0.5s ease-out backwards;
}

.message-card:nth-child(1) {
    animation-delay: 0.1s;
}

.message-card:nth-child(2) {
    animation-delay: 0.2s;
}

.message-card:nth-child(3) {
    animation-delay: 0.3s;
}

.message-card:nth-child(4) {
    animation-delay: 0.4s;
}

.message-card:nth-child(5) {
    animation-delay: 0.5s;
}

.message-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Gallery Item Enhanced */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    animation: masonryReveal 0.6s ease-out backwards;
}

.gallery-item:nth-child(1) {
    animation-delay: 0.05s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.15s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.25s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.35s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(9) {
    animation-delay: 0.45s;
}

/* Gift Card Flip Animation */
.gift-card {
    transition: var(--transition-normal);
    animation: cardFlip 0.7s ease-out backwards;
}

.gift-card:nth-child(1) {
    animation-delay: 0.1s;
}

.gift-card:nth-child(2) {
    animation-delay: 0.2s;
}

.gift-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Gift Address Card */
.gift-address-card {
    background: linear-gradient(135deg, var(--color-secondary-light), var(--color-accent-light));
    border: 2px dashed var(--color-secondary);
    animation: cardFlip 0.7s ease-out 0.4s backwards;
}

.dark .gift-address-card {
    background: linear-gradient(135deg, rgba(201, 168, 124, 0.2), rgba(212, 165, 165, 0.2));
}

/* Protocol Card Animation */
.protocol-card {
    padding: 2rem;
    animation: cardSlideRight 0.6s ease-out backwards;
}

.protocol-card:nth-child(1) {
    animation-delay: 0.1s;
}

.protocol-card:nth-child(2) {
    animation-delay: 0.2s;
}

.protocol-card:nth-child(3) {
    animation-delay: 0.3s;
}

.protocol-card h3 i {
    animation: iconBounce 2s ease-in-out infinite;
}

/* Closing Section Enhanced */
.closing-section {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.closing-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    animation: expandLine 1s ease-out;
}

.closing-names {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.closing-names::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
    animation: expandLine 1s ease-out 0.5s backwards;
    transform-origin: center;
}

/* RSVP Form Enhanced */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--text-light);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rsvp-submit {
    width: 100%;
    padding: 1rem;
    background: var(--text-light);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.rsvp-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(124, 152, 133, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.rsvp-submit:hover::before {
    width: 300px;
    height: 300px;
}

/* Quote Box Enhanced */
.quote-box {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.quote-box::before,
.quote-box::after {
    content: '"';
    font-family: var(--font-elegant);
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.2;
    position: absolute;
}

.quote-box::before {
    top: 0;
    left: 1rem;
}

.quote-box::after {
    bottom: 0;
    right: 1rem;
    transform: rotate(180deg);
}

/* Flower decorations */
.flower-top-left,
.flower-top-right,
.flower-bottom-left,
.flower-bottom-right {
    position: absolute;
    width: 200px;
    height: 200px;
    opacity: 0.3;
    pointer-events: none;
}

.flower-top-left {
    top: 0;
    left: 0;
}

.flower-top-right {
    top: 0;
    right: 0;
    transform: scaleX(-1);
}

.flower-bottom-left {
    bottom: 0;
    left: 0;
    transform: scaleY(-1);
}

.flower-bottom-right {
    bottom: 0;
    right: 0;
    transform: scale(-1);
}

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

    .couple-divider {
        flex-direction: row;
    }

    .couple-divider-line {
        width: 60px;
        height: 2px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1rem;
    }

    /* Cover Section Mobile Optimizations */
    .cover-content {
        padding: 1rem;
        width: 100%;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .cover-title {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .cover-names {
        font-size: 2.2rem;
        margin-bottom: 0.25rem;
    }

    .cover-names .ampersand {
        font-size: 1.75rem;
        margin: 0.25rem 0;
    }

    .cover-ornament {
        margin: 0.75rem auto;
        width: 80px;
    }

    .cover-date {
        margin-top: 0.75rem;
        font-size: 1rem;
    }

    .cover-guest {
        margin-top: 1.25rem;
        padding: 0.75rem 1.5rem;
    }

    .cover-guest-name {
        font-size: 1.25rem;
    }

    #openInvitation {
        margin-top: 1.5rem;
        padding: 0.75rem 1.75rem;
    }

    #countdown {
        gap: 0.5rem;
        margin-top: 1.25rem;
    }

    .countdown-item {
        min-width: 55px;
        padding: 0.5rem 0.25rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

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

    .story-item {
        flex-direction: column !important;
        gap: 1rem;
    }

    .story-item>* {
        flex: none;
        width: 100%;
    }

    .story-content {
        padding: 0.5rem 1rem;
        text-align: left;
    }

    .story-content h3 {
        font-size: 1.5rem;
        text-align: center;
    }

    .story-content span {
        display: block;
        text-align: center;
    }

    .story-content p {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: left;
    }

    .story-timeline {
        gap: 2.5rem;
    }

    .story-image img {
        height: 220px;
    }

    .couple-photo-wrapper {
        width: 180px;
        height: 230px;
    }

    #eventsContainer {
        grid-template-columns: 1fr;
    }

    #messageWall {
        grid-template-columns: 1fr;
    }

    #galleryGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item img {
        height: 180px;
    }

    .floating-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .rsvp-form {
        padding: 1.5rem;
    }

    .closing-message {
        font-size: 1.25rem;
    }

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

@media (max-width: 480px) {
    .cover-names {
        font-size: 2rem;
    }

    .cover-guest {
        padding: 0.75rem 1rem;
    }

    .cover-guest-name {
        font-size: 1.25rem;
    }

    .countdown-item {
        min-width: 50px;
        padding: 0.5rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.625rem;
    }

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

    .couple-name {
        font-size: 1.5rem;
    }

    #galleryGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        /* Slightly smaller gap for mobile 2-col */
    }

    .gallery-item img {
        height: 220px;
    }

    .location-actions {
        flex-direction: column;
    }

    .location-actions .btn-primary,
    .location-actions .btn-outline {
        width: 100%;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    #cover,
    .floating-controls,
    #lightbox,
    .rsvp-section {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ========================================
   UNIQUE SECTION ASSEMBLY ANIMATIONS
   ======================================== */

/* -------- COUPLE SECTION: Blur Focus -------- */
@keyframes blurFocus {
    0% {
        opacity: 0;
        filter: blur(15px);
        transform: scale(0.97);
    }

    50% {
        opacity: 0.7;
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

.couple-section {
    position: relative;
    overflow: hidden;
}

/* Hidden state before animation */
.couple-section .section-header,
.couple-section .couple-card,
.couple-section .quote-box {
    opacity: 0;
}

/* Animate when in view */
.couple-section.animate-in .section-header {
    animation: blurFocus 1.2s ease-out forwards;
}

.couple-section.animate-in .couple-card {
    animation: blurFocus 1.4s ease-out forwards;
}

.couple-section.animate-in .couple-card:first-of-type {
    animation-delay: 0.2s;
}

.couple-section.animate-in .couple-card:last-of-type {
    animation-delay: 0.5s;
}

.couple-section.animate-in .quote-box {
    animation: blurFocus 1.2s ease-out 0.8s forwards;
}

/* -------- STORY SECTION: Typewriter Assemble -------- */
@keyframes typewriterSlide {
    0% {
        opacity: 0;
        transform: translateX(-80px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes typewriterSlideRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.story-section {
    position: relative;
    overflow: hidden;
}

.story-section .section-header,
.story-section .story-item {
    opacity: 0;
}

.story-section.animate-in .section-header {
    animation: typewriterSlide 0.8s ease-out forwards;
}

.story-section.animate-in .story-item:nth-child(odd) {
    animation: typewriterSlide 0.8s ease-out forwards;
}

.story-section.animate-in .story-item:nth-child(even) {
    animation: typewriterSlideRight 0.8s ease-out forwards;
}

.story-section.animate-in .story-item:nth-child(1) {
    animation-delay: 0.1s;
}

.story-section.animate-in .story-item:nth-child(2) {
    animation-delay: 0.3s;
}

.story-section.animate-in .story-item:nth-child(3) {
    animation-delay: 0.5s;
}


/* -------- PRAYERS SECTION: Float Blur -------- */
@keyframes floatBlur {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.prayers-section {
    position: relative;
    overflow: hidden;
}

.prayers-section .section-header,
.prayers-section .glass-card {
    opacity: 0;
}

.prayers-section.animate-in .section-header {
    animation: floatBlur 0.8s ease-out forwards;
}

.prayers-section.animate-in .glass-card {
    animation: floatBlur 0.8s ease-out forwards;
}

/* Stagger delays for prayer cards */
.prayers-section.animate-in .glass-card:nth-child(1) {
    animation-delay: 0.2s;
}

.prayers-section.animate-in .glass-card:nth-child(2) {
    animation-delay: 0.35s;
}

.prayers-section.animate-in .glass-card:nth-child(3) {
    animation-delay: 0.5s;
}

.prayers-section.animate-in .glass-card:nth-child(4) {
    animation-delay: 0.65s;
}

.prayers-section.animate-in .glass-card:nth-child(5) {
    animation-delay: 0.8s;
}

.prayers-section.animate-in .glass-card:nth-child(6) {
    animation-delay: 0.95s;
}

.prayers-section .section-ornament svg {
    fill: var(--color-primary);
}



/* -------- EVENTS SECTION: Curtain Reveal -------- */
@keyframes curtainReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 50% 0 50%);
        transform: scale(0.9);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: scale(1);
        filter: blur(0);
    }
}

.events-section {
    position: relative;
    overflow: hidden;
}

.events-section .section-header,
.events-section .event-card {
    opacity: 0;
}

.events-section.animate-in .section-header {
    animation: curtainReveal 0.7s ease-out forwards;
}

.events-section.animate-in .event-card {
    animation: curtainReveal 0.7s ease-out forwards;
}

.events-section.animate-in .event-card:nth-child(1) {
    animation-delay: 0.15s;
}

.events-section.animate-in .event-card:nth-child(2) {
    animation-delay: 0.35s;
}

.events-section.animate-in .event-card:nth-child(3) {
    animation-delay: 0.55s;
}

/* -------- LOCATION SECTION: Zoom Bounce -------- */
@keyframes zoomBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
        filter: blur(10px);
    }

    60% {
        transform: scale(1.05) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.location-section {
    position: relative;
    overflow: hidden;
}

.location-section .section-header,
.location-section .map-container,
.location-section .location-actions {
    opacity: 0;
}

.location-section.animate-in .section-header {
    animation: zoomBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.location-section.animate-in .map-container {
    animation: zoomBounce 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.location-section.animate-in .location-actions {
    animation: zoomBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

/* -------- RSVP SECTION: Wave Assemble -------- */
@keyframes waveIn {
    0% {
        opacity: 0;
        transform: translateY(60px) rotate(3deg);
        filter: blur(10px);
    }

    50% {
        transform: translateY(-10px) rotate(-1deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotate(0);
        filter: blur(0);
    }
}

.rsvp-section {
    position: relative;
    overflow: hidden;
}

.rsvp-section .section-header,
.rsvp-section .rsvp-form {
    opacity: 0;
}

.rsvp-section.animate-in .section-header {
    animation: waveIn 0.8s ease-out forwards;
}

.rsvp-section.animate-in .rsvp-form {
    animation: waveIn 0.8s ease-out 0.2s forwards;
}

/* -------- MESSAGES SECTION: Stagger Pop -------- */
@keyframes staggerPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(30px);
        filter: blur(10px);
    }

    70% {
        transform: scale(1.05) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.messages-section {
    position: relative;
    overflow: hidden;
}

.messages-section .section-header,
.messages-section .message-card {
    opacity: 0;
}

.messages-section.animate-in .section-header {
    animation: staggerPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.messages-section.animate-in .message-card {
    animation: staggerPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.messages-section.animate-in .message-card:nth-child(1) {
    animation-delay: 0.1s;
}

.messages-section.animate-in .message-card:nth-child(2) {
    animation-delay: 0.2s;
}

.messages-section.animate-in .message-card:nth-child(3) {
    animation-delay: 0.3s;
}

.messages-section.animate-in .message-card:nth-child(4) {
    animation-delay: 0.4s;
}

.messages-section.animate-in .message-card:nth-child(5) {
    animation-delay: 0.5s;
}

.messages-section.animate-in .message-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* -------- GALLERY SECTION: Mosaic Build -------- */
@keyframes mosaicBuild {
    0% {
        opacity: 0;
        transform: scale(0) rotate(10deg);
        filter: blur(10px);
    }

    60% {
        transform: scale(1.1) rotate(-2deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: blur(0);
    }
}

.gallery-section {
    position: relative;
    overflow: hidden;
}

.gallery-section .section-header,
.gallery-section .gallery-filters,
.gallery-section .gallery-item {
    opacity: 0;
}

.gallery-section.animate-in .section-header {
    animation: mosaicBuild 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gallery-section.animate-in .gallery-filters {
    animation: mosaicBuild 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

.gallery-section.animate-in .gallery-item {
    animation: mosaicBuild 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Random-like delays for mosaic effect */
.gallery-section.animate-in .gallery-item:nth-child(1) {
    animation-delay: 0.15s;
}

.gallery-section.animate-in .gallery-item:nth-child(2) {
    animation-delay: 0.3s;
}

.gallery-section.animate-in .gallery-item:nth-child(3) {
    animation-delay: 0.2s;
}

.gallery-section.animate-in .gallery-item:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery-section.animate-in .gallery-item:nth-child(5) {
    animation-delay: 0.25s;
}

.gallery-section.animate-in .gallery-item:nth-child(6) {
    animation-delay: 0.45s;
}

.gallery-section.animate-in .gallery-item:nth-child(7) {
    animation-delay: 0.35s;
}

.gallery-section.animate-in .gallery-item:nth-child(8) {
    animation-delay: 0.5s;
}

.gallery-section.animate-in .gallery-item:nth-child(9) {
    animation-delay: 0.4s;
}

/* -------- GIFT SECTION: Card Fan -------- */
@keyframes cardFan {
    0% {
        opacity: 0;
        transform: translateY(100px) rotateX(45deg) rotateZ(-10deg);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) rotateZ(0);
        filter: blur(0);
    }
}

.gift-section {
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.gift-section .section-header,
.gift-section .gift-card,
.gift-section .gift-address-card {
    opacity: 0;
}

.gift-section.animate-in .section-header {
    animation: cardFan 0.7s ease-out forwards;
}

.gift-section.animate-in .gift-card {
    animation: cardFan 0.7s ease-out forwards;
    transform-style: preserve-3d;
}

.gift-section.animate-in .gift-card:nth-child(1) {
    animation-delay: 0.1s;
    transform-origin: left bottom;
}

.gift-section.animate-in .gift-card:nth-child(2) {
    animation-delay: 0.25s;
    transform-origin: center bottom;
}

.gift-section.animate-in .gift-card:nth-child(3) {
    animation-delay: 0.4s;
    transform-origin: right bottom;
}

.gift-section.animate-in .gift-address-card {
    animation: cardFan 0.7s ease-out 0.55s forwards;
    transform-origin: center bottom;
}

/* -------- PROTOCOL SECTION: Slide Stack -------- */
@keyframes slideStack {
    0% {
        opacity: 0;
        transform: translateX(-50px) translateY(30px) rotate(-5deg);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) rotate(0);
        filter: blur(0);
    }
}

.protocol-section {
    position: relative;
    overflow: hidden;
}

.protocol-section .section-header,
.protocol-section .protocol-card {
    opacity: 0;
}

.protocol-section.animate-in .section-header {
    animation: slideStack 0.6s ease-out forwards;
}

.protocol-section.animate-in .protocol-card {
    animation: slideStack 0.6s ease-out forwards;
}

.protocol-section.animate-in .protocol-card:nth-child(1) {
    animation-delay: 0.1s;
}

.protocol-section.animate-in .protocol-card:nth-child(2) {
    animation-delay: 0.25s;
}

.protocol-section.animate-in .protocol-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* -------- CLOSING SECTION: Fade Bloom -------- */
@keyframes fadeBloom {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.closing-section {
    position: relative;
    overflow: hidden;
}

.closing-section .closing-content {
    opacity: 0;
}

.closing-section.animate-in .closing-content {
    animation: fadeBloom 1.2s ease-out forwards;
}

/* ========================================
   DECORATIVE CORNER ORNAMENTS
   ======================================== */

/* Base ornament styles */
.section-ornament {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.section-ornament svg {
    width: 100%;
    height: 100%;
    fill: var(--color-primary);
}

.dark .section-ornament svg {
    fill: var(--color-primary-light);
}

/* Corner positions */
.ornament-top-left {
    top: 1rem;
    left: 1rem;
}

.ornament-top-right {
    top: 1rem;
    right: 1rem;
    transform: scaleX(-1);
}

.ornament-bottom-left {
    bottom: 1rem;
    left: 1rem;
    transform: scaleY(-1);
}

.ornament-bottom-right {
    bottom: 1rem;
    right: 1rem;
    transform: scale(-1);
}

/* Section-specific ornament colors */
.couple-section .section-ornament svg {
    fill: var(--color-primary);
}

.story-section .section-ornament svg {
    fill: var(--color-secondary);
}

.events-section .section-ornament svg {
    fill: var(--color-primary);
}

.gallery-section .section-ornament svg {
    fill: var(--color-accent);
}

.gift-section .section-ornament svg {
    fill: var(--color-secondary);
}

.protocol-section .section-ornament svg {
    fill: var(--color-primary);
}

.closing-section .section-ornament svg {
    fill: var(--color-accent);
}

/* Animated ornaments */
.section-ornament.animated {
    animation: ornamentFloat 6s ease-in-out infinite;
}

@keyframes ornamentFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}

.ornament-top-right.animated {
    animation: ornamentFloatMirror 6s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes ornamentFloatMirror {

    0%,
    100% {
        transform: scaleX(-1) translateY(0) rotate(0deg);
    }

    50% {
        transform: scaleX(-1) translateY(-5px) rotate(-2deg);
    }
}

.ornament-bottom-left.animated {
    animation: ornamentFloatBottom 6s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes ornamentFloatBottom {

    0%,
    100% {
        transform: scaleY(-1) translateY(0) rotate(0deg);
    }

    50% {
        transform: scaleY(-1) translateY(5px) rotate(-2deg);
    }
}

.ornament-bottom-right.animated {
    animation: ornamentFloatCorner 6s ease-in-out infinite;
    animation-delay: 4.5s;
}

@keyframes ornamentFloatCorner {

    0%,
    100% {
        transform: scale(-1) translateY(0) rotate(0deg);
    }

    50% {
        transform: scale(-1) translateY(5px) rotate(2deg);
    }
}

/* Responsive ornaments */
@media (max-width: 768px) {
    .section-ornament {
        width: 80px;
        height: 80px;
        opacity: 0.1;
    }
}

@media (max-width: 480px) {
    .section-ornament {
        width: 60px;
        height: 60px;
        display: none;
        /* Hide on very small screens for cleanliness */
    }
}

/* Message Wall Scroll Container */
.message-wall-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
    /* Space for scrollbar */
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.message-wall-container::-webkit-scrollbar {
    width: 6px;
}

.message-wall-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.dark .message-wall-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.message-wall-container::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
    opacity: 0.5;
}

.message-wall-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Message Actions */
.message-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    padding: 0;
}

.action-btn:hover {
    color: var(--color-primary);
}

.action-btn.liked {
    color: #f56565;
}

.action-btn.liked i {
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Replies */
.replies-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.reply-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

.dark .reply-item {
    background: rgba(255, 255, 255, 0.05);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.reply-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.reply-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Reply Form */
.reply-form {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

.reply-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.reply-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(124, 152, 133, 0.2);
}

.reply-submit {
    background: var(--color-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.reply-submit:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ========================================
   PRELOADER
   ======================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.heart-loader {
    font-size: 3rem;
    color: var(--color-primary);
    animation: heartBeat 1.2s infinite ease-in-out;
}

.loading-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(0.95);
    }

    5% {
        transform: scale(1.1);
    }

    39% {
        transform: scale(0.85);
    }

    45% {
        transform: scale(1);
    }

    60% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(0.9);
    }
}

/* ========================================
   SECTION BACKGROUNDS
   ======================================== */
.section-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.section-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    /* Start hidden */
    transition: opacity 1.5s ease-in-out;
}

.section-bg-image.loaded {
    opacity: 1;
}

.section-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.dark .section-bg-overlay {
    background: rgba(26, 26, 46, 0.85);
}

/* Ensure sections with background handle stacking correctly */
.has-background {
    position: relative !important;
    isolation: isolate;
}

/* Gallery Load More Button */
#loadMoreGalleryBtn button {
    padding: 0.75rem 2rem;
    background-color: var(--color-primary);
    color: var(--text-light, white);
    border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#loadMoreGalleryBtn button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

#loadMoreGalleryBtn button:active {
    transform: translateY(0);
}