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

:root {
    --primary-color: #d4a574;        /* Champagne Gold */
    --secondary-color: #b8926a;      /* Warm Gold */
    --accent-color: #2c2c2c;         /* Dark Accent */
    --text-dark: #ffffff;            /* White text for dark bg */
    --text-light: #f8f8f8;           /* Light Grey */
    --bg-dark: #0f0f0f;              /* Deep Black */
    --bg-card: #1e1e1e;              /* Card Background */
    --bg-overlay: rgba(0, 0, 0, 0.8);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.5);
    --glow-gold: 0 0 20px rgba(212, 165, 116, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
    background: var(--bg-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 3px solid var(--primary-color);
    color: #000000;
    cursor: pointer;
    box-shadow: var(--shadow), var(--glow-gold);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 165, 116, 0.6);
}

.music-toggle svg {
    width: 24px;
    height: 24px;
}

.music-toggle.playing .icon-play {
    display: none;
}

.music-toggle.playing .icon-pause {
    display: block !important;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* ===== FRACTAL BLOOM EFFECT (Enhanced Complex Version) ===== */

/* Fractal Bloom Container with 3D Perspective */
.fractal-bloom-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* Individual Bloom Slice - Vertical strips with enhanced transitions */
.bloom-slice {
    flex: 1;
    height: 100%;
    background-size: 700% 100%;
    background-position: center;
    position: relative;
    transform-origin: center center;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
    /* Smooth transition for progressive effect */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease,
                filter 0.3s ease;
}

/* Background position for each slice to create the full image */
.bloom-slice[data-slice="1"] {
    background-position: 0% center;
}

.bloom-slice[data-slice="2"] {
    background-position: 16.67% center;
}

.bloom-slice[data-slice="3"] {
    background-position: 33.33% center;
}

.bloom-slice[data-slice="4"] {
    background-position: 50% center;
}

.bloom-slice[data-slice="5"] {
    background-position: 66.67% center;
}

.bloom-slice[data-slice="6"] {
    background-position: 83.33% center;
}

.bloom-slice[data-slice="7"] {
    background-position: 100% center;
}

/* Complex Bloom Animation - Left Side (Slices 1-3) */
.bloom-active .bloom-slice[data-slice="1"] {
    transform: translateX(-150px) translateY(-30px) translateZ(80px)
               rotateY(12deg) rotateZ(-3deg) scale(1.15);
    opacity: 0.85;
    filter: blur(0.5px) brightness(0.95);
}

.bloom-active .bloom-slice[data-slice="2"] {
    transform: translateX(-90px) translateY(-15px) translateZ(50px)
               rotateY(8deg) rotateZ(-2deg) scale(1.12);
    opacity: 0.9;
    filter: blur(0.3px) brightness(0.97);
}

.bloom-active .bloom-slice[data-slice="3"] {
    transform: translateX(-45px) translateY(-8px) translateZ(25px)
               rotateY(4deg) rotateZ(-1deg) scale(1.08);
    opacity: 0.95;
    filter: blur(0.2px) brightness(0.98);
}

/* Center Slice - Minimal movement, maximum clarity */
.bloom-active .bloom-slice[data-slice="4"] {
    transform: translateX(0) translateY(0) translateZ(0)
               rotateY(0deg) rotateZ(0deg) scale(1.05);
    opacity: 1;
    filter: blur(0px) brightness(1);
}

/* Complex Bloom Animation - Right Side (Slices 5-7) */
.bloom-active .bloom-slice[data-slice="5"] {
    transform: translateX(45px) translateY(-8px) translateZ(25px)
               rotateY(-4deg) rotateZ(1deg) scale(1.08);
    opacity: 0.95;
    filter: blur(0.2px) brightness(0.98);
}

.bloom-active .bloom-slice[data-slice="6"] {
    transform: translateX(90px) translateY(-15px) translateZ(50px)
               rotateY(-8deg) rotateZ(2deg) scale(1.12);
    opacity: 0.9;
    filter: blur(0.3px) brightness(0.97);
}

.bloom-active .bloom-slice[data-slice="7"] {
    transform: translateX(150px) translateY(-30px) translateZ(80px)
               rotateY(-12deg) rotateZ(3deg) scale(1.15);
    opacity: 0.85;
    filter: blur(0.5px) brightness(0.95);
}

/* Dark Overlay - Like reference image */
.fractal-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(61, 61, 82, 0.3) 0%, rgba(61, 61, 82, 0.7) 100%);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.bloom-active .fractal-dark-overlay {
    opacity: 0.9;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23d4a574" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    animation: wave 10s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Project Label */
.project-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    opacity: 0.9;
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
    color: var(--text-light);
    padding: 40px 20px;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.ornament {
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 0 auto;
}

.top-ornament {
    margin-bottom: 30px;
}

.bottom-ornament {
    margin-top: 30px;
}

.main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.couple-names {
    font-family: 'Great Vibes', cursive;
    font-size: 5rem;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(212, 165, 116, 0.5);
}

.ampersand {
    font-size: 3rem;
    opacity: 0.8;
}

.wedding-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.0rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.scroll-hint {
    position: fixed;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    transition: all 0.3s ease, opacity 0.5s ease, visibility 0.5s ease;
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
    z-index: 1000;
    opacity: 1;
    visibility: visible;
}

.scroll-hint:hover {
    background: var(--primary-color);
    color: #000000;
    box-shadow: 0 0 30px rgba(212, 165, 116, 0.6);
}

.scroll-hint svg {
    width: 24px;
    height: 24px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 1.5s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1.5s ease-out 0.5s backwards;
}

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

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ayat Section */
.ayat-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
    z-index: 3;
    isolation: isolate;
}

.ayat-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--bg-card);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow), var(--glow-gold);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.ayat-card:hover {
    transform: translateZ(10px);
    box-shadow: var(--shadow), 0 0 30px rgba(212, 165, 116, 0.4);
}

.quote-icon {
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: 20px;
    left: 30px;
    font-family: Georgia, serif;
}

.ayat-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    line-height: 2;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-light);
}

.ayat-source {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Section Title */
.section-title {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 60px;
}

/* Couple Section */
.couple-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    z-index: 4;
    isolation: isolate;
}

.couple-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.bride-card,
.groom-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow), var(--glow-gold);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.bride-card:hover,
.groom-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 165, 116, 0.5);
    border-color: rgba(212, 165, 116, 0.5);
}

.profile-image-wrapper {
    margin-bottom: 30px;
}

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.bride-image {
    background-image: url('assets/images/bride.jpg');
    background-size: cover;
    background-position: center;
}

.groom-image {
    background-image: url('assets/images/groom.jpg');
    background-size: cover;
    background-position: center;
}

.profile-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
}

.profile-detail {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.8;
}

.parent-names {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1) rotate(10deg);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.divider-heart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-heart svg {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Our Story Section */
.story-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    position: relative;
    z-index: 5;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: -20px;
    margin-bottom: 60px;
    letter-spacing: 2px;
    font-family: 'Montserrat', sans-serif;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

/* Timeline vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--primary-color) 10%,
        var(--primary-color) 90%,
        transparent 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 50%;
    padding-right: 50px;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    padding-left: 50px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-color),
                0 0 40px rgba(212, 165, 116, 0.5);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 30px var(--primary-color),
                0 0 60px rgba(212, 165, 116, 0.8);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-light), var(--glow-gold);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow), 0 0 30px rgba(212, 165, 116, 0.4);
    border-color: rgba(212, 165, 116, 0.5);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.timeline-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

.timeline-text {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* Countdown Section */
.countdown-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
    z-index: 5;
    isolation: isolate;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.countdown-item {
    background: var(--bg-card);
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light), var(--glow-gold);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.countdown-item:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: var(--shadow), 0 0 30px rgba(212, 165, 116, 0.4);
    border-color: rgba(212, 165, 116, 0.5);
}

.countdown-value {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Cormorant Garamond', serif;
    text-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
}

.countdown-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    opacity: 0.8;
}

/* Event Section */
.event-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    z-index: 6;
    isolation: isolate;
}

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow), var(--glow-gold);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.event-card:hover {
    transform: translateY(-10px) rotateZ(2deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 165, 116, 0.5);
    border-color: rgba(212, 165, 116, 0.5);
}

.event-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light);
}

.event-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-light);
}

.event-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(212, 165, 116, 0.3);
}

.event-detail p {
    margin: 8px 0;
    color: var(--text-light);
}

.event-time {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.event-date {
    font-weight: 600;
}

.event-location {
    font-weight: 600;
    margin-top: 15px;
}

.event-address {
    color: var(--text-light);
    opacity: 0.7;
}

.map-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.map-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(212, 165, 116, 0.3);
}

.map-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.btn-map {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.btn-map:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Gallery Section - Horizontal Parallax */
.gallery-section {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 7;
    isolation: isolate;
}

.gallery-header {
    text-align: center;
    padding: 50px 20px 20px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.gallery-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 10px;
    opacity: 0.7;
}

/* Horizontal Scroll Container */
.horizontal-gallery-wrapper {
    overflow: hidden;
    flex: 1;
    position: relative;
    min-height: 0;
}

/* Hide scrollbar but keep functionality */
.horizontal-scroll-container::-webkit-scrollbar {
    width: 1px;
    height: 1px;
}

.horizontal-scroll-container::-webkit-scrollbar-button {
    width: 1px;
    height: 1px;
}

.horizontal-scroll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vh;
    transform: rotate(-90deg) translate3d(0, -100vh, 0);
    transform-origin: right top;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    height: 100vw;
    perspective: 1px;
    transform-style: preserve-3d;
    padding-bottom: 10rem;
    /* Smooth scrolling for mobile */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Performance optimization */
    will-change: scroll-position;
    cursor: grab;
}

.horizontal-scroll-container:active {
    cursor: grabbing;
}

/* Photo Wrapper with Parallax Effect */
.photo-wrapper {
    transform: rotate(90deg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    transform-origin: 50% 50%;
    transform: rotate(90deg) translateZ(0.1px) scale(0.9) translateX(0px) translateY(-3vh);
    transition: 1s;
}

.photo-wrapper:hover {
    min-height: 65vh;
}

/* Different Parallax Speeds and Positions */
.photo-wrapper.slower {
    transform: rotate(90deg) translateZ(-0.2px) scale(1.1) translateX(0%) translateY(-10vh);
}

.photo-wrapper.slower-down {
    transform: rotate(90deg) translateZ(-0.2px) scale(1.1) translateX(0%) translateY(16vh);
}

.photo-wrapper.faster {
    transform: rotate(90deg) translateZ(0.15px) scale(0.8) translateX(0%) translateY(14vh);
}

.photo-wrapper.vertical {
    transform: rotate(90deg) translateZ(-0.15px) scale(1.15) translateX(0%) translateY(0%);
}

.photo-wrapper.last {
    transform: rotate(90deg) translateZ(-0.2px) scale(1.1) translateX(25vh) translateY(-8vh);
}

/* Polaroid-style Photo Frame */
.photo-frame {
    overflow: hidden;
    display: block;
    padding: 1.5vh;
    background: var(--bg-card);
    border: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8), var(--glow-gold);
    transition: all 0.5s ease;
    position: relative;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), transparent);
    pointer-events: none;
}

.photo-wrapper:hover .photo-frame {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 165, 116, 0.6);
    transform: scale(1.02);
    border-color: rgba(212, 165, 116, 0.6);
}

.photo-frame img {
    max-width: 45vh;
    max-height: 50vh;
    width: auto;
    height: auto;
    transition: 0.5s;
    vertical-align: top;
    display: block;
    filter: brightness(0.95) contrast(1.05);
    /* Performance optimization for mobile */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.photo-wrapper:hover .photo-frame img {
    filter: brightness(1) contrast(1.1);
    transform: scale(1.02) translateZ(0);
}

/* Loading placeholder for images */
.photo-frame img[src=""],
.photo-frame img:not([src]) {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-color) 100%);
    min-height: 40vh;
}

/* RSVP Section */
.rsvp-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    z-index: 10;
    clear: both;
}

.rsvp-section .section-title {
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(212, 165, 116, 0.5);
}

.rsvp-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow), var(--glow-gold);
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(212, 165, 116, 0.2);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(212, 165, 116, 0.3);
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: rgba(248, 248, 248, 0.5);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: var(--bg-card);
    padding: 0 5px;
}

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

.btn-submit {
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000000;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light), var(--glow-gold);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow), 0 0 30px rgba(212, 165, 116, 0.6);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Footer */
.footer {
    padding: 80px 20px 40px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
}

.footer-text {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.footer-ornament {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 30px auto;
}

.footer-couple {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(212, 165, 116, 0.4);
}

.footer-tagline {
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Simplify perspective for mobile performance */
    .fractal-bloom-container {
        perspective: 800px;
    }

    /* Fractal Bloom - Reduce complexity on tablet */
    .bloom-active .bloom-slice[data-slice="1"] {
        transform: translateX(-75px) translateY(-15px) translateZ(40px)
                   rotateY(8deg) rotateZ(-2deg) scale(1.08);
        opacity: 0.9;
        filter: blur(0.3px) brightness(0.96);
    }

    .bloom-active .bloom-slice[data-slice="2"] {
        transform: translateX(-45px) translateY(-10px) translateZ(25px)
                   rotateY(5deg) rotateZ(-1deg) scale(1.06);
        opacity: 0.93;
        filter: blur(0.2px) brightness(0.97);
    }

    .bloom-active .bloom-slice[data-slice="3"] {
        transform: translateX(-23px) translateY(-5px) translateZ(13px)
                   rotateY(2deg) rotateZ(-0.5deg) scale(1.04);
        opacity: 0.96;
        filter: blur(0.1px) brightness(0.98);
    }

    .bloom-active .bloom-slice[data-slice="4"] {
        transform: translateX(0) translateY(0) translateZ(0)
                   rotateY(0deg) rotateZ(0deg) scale(1.03);
        opacity: 1;
        filter: blur(0px) brightness(1);
    }

    .bloom-active .bloom-slice[data-slice="5"] {
        transform: translateX(23px) translateY(-5px) translateZ(13px)
                   rotateY(-2deg) rotateZ(0.5deg) scale(1.04);
        opacity: 0.96;
        filter: blur(0.1px) brightness(0.98);
    }

    .bloom-active .bloom-slice[data-slice="6"] {
        transform: translateX(45px) translateY(-10px) translateZ(25px)
                   rotateY(-5deg) rotateZ(1deg) scale(1.06);
        opacity: 0.93;
        filter: blur(0.2px) brightness(0.97);
    }

    .bloom-active .bloom-slice[data-slice="7"] {
        transform: translateX(75px) translateY(-15px) translateZ(40px)
                   rotateY(-8deg) rotateZ(2deg) scale(1.08);
        opacity: 0.9;
        filter: blur(0.3px) brightness(0.96);
    }

    .project-label {
        font-size: 0.65rem;
    }

    /* Scroll hint - slightly smaller on tablet */
    .scroll-hint {
        bottom: 3vh;
        width: 45px;
        height: 45px;
    }

    .scroll-hint svg {
        width: 22px;
        height: 22px;
    }

    .couple-names {
        font-size: 3rem;
        flex-direction: column;
        gap: 10px;
    }

    .ampersand {
        font-size: 2rem;
    }

    .couple-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .divider-heart {
        transform: rotate(0deg);
    }

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

    .countdown {
        grid-template-columns: repeat(2, 1fr);
    }

    .events-container {
        grid-template-columns: 1fr;
    }

    /* Gallery responsive - Tablet */
    .gallery-section {
        height: 90vh;
    }

    .gallery-header {
        padding: 40px 20px 20px;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

    .horizontal-scroll-container {
        padding-bottom: 5rem;
    }

    .photo-wrapper {
        min-height: 35vh;
    }

    .photo-wrapper:hover {
        min-height: 55vh;
    }

    .photo-frame {
        padding: 1.2vh;
    }

    .photo-frame img {
        max-width: 35vh;
        max-height: 40vh;
    }

    /* Simplify parallax for tablet */
    .photo-wrapper.slower,
    .photo-wrapper.slower-down,
    .photo-wrapper.faster,
    .photo-wrapper.vertical {
        transform: rotate(90deg) translateZ(0.05px) scale(0.95) translateX(0%) translateY(0vh);
    }

    .photo-wrapper.last {
        transform: rotate(90deg) translateZ(0.05px) scale(0.95) translateX(15vh) translateY(0vh);
    }

    .music-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .ayat-card {
        padding: 40px 30px;
    }

    .ayat-text {
        font-size: 1.1rem;
    }

    .rsvp-card {
        padding: 30px 20px;
    }

    /* Timeline responsive - Tablet */
    .timeline::before {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
        padding-left: 80px;
        padding-right: 20px;
        text-align: left;
    }

    .timeline-dot {
        left: 30px;
    }
}

@media (max-width: 480px) {
    /* Further simplify for small mobile - disable 3D for performance */
    .fractal-bloom-container {
        perspective: none;
    }

    /* Fractal Bloom - Simplified 2D version for mobile */
    .bloom-slice[data-slice="1"],
    .bloom-slice[data-slice="2"],
    .bloom-slice[data-slice="3"],
    .bloom-slice[data-slice="4"],
    .bloom-slice[data-slice="5"],
    .bloom-slice[data-slice="6"],
    .bloom-slice[data-slice="7"] {
        transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s,
                    opacity 0.7s ease 0s;
    }

    .bloom-active .bloom-slice[data-slice="1"] {
        transform: translateX(-50px) translateY(-10px) scale(1.05);
        opacity: 0.92;
    }

    .bloom-active .bloom-slice[data-slice="2"] {
        transform: translateX(-30px) translateY(-6px) scale(1.04);
        opacity: 0.94;
    }

    .bloom-active .bloom-slice[data-slice="3"] {
        transform: translateX(-15px) translateY(-3px) scale(1.03);
        opacity: 0.97;
    }

    .bloom-active .bloom-slice[data-slice="4"] {
        transform: translateX(0) translateY(0) scale(1.02);
        opacity: 1;
    }

    .bloom-active .bloom-slice[data-slice="5"] {
        transform: translateX(15px) translateY(-3px) scale(1.03);
        opacity: 0.97;
    }

    .bloom-active .bloom-slice[data-slice="6"] {
        transform: translateX(30px) translateY(-6px) scale(1.04);
        opacity: 0.94;
    }

    .bloom-active .bloom-slice[data-slice="7"] {
        transform: translateX(50px) translateY(-10px) scale(1.05);
        opacity: 0.92;
    }

    .project-label {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }

    /* Scroll hint - smaller on mobile */
    .scroll-hint {
        bottom: 4vh;
        width: 40px;
        height: 40px;
    }

    .scroll-hint svg {
        width: 20px;
        height: 20px;
    }

    .main-title {
        font-size: 1.2rem;
    }

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

    .wedding-date {
        font-size: 1.5rem;
    }

    .countdown {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .countdown-item {
        padding: 20px 10px;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    /* Timeline mobile */
    .timeline::before {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
        width: 16px;
        height: 16px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-title {
        font-size: 1.3rem;
    }

    .timeline-text {
        font-size: 0.95rem;
    }

    /* Gallery mobile - Better mobile experience */
    .gallery-section {
        height: 80vh;
        min-height: 500px;
    }

    .gallery-header {
        padding: 30px 15px 15px;
    }

    .gallery-subtitle {
        font-size: 0.9rem;
        margin-top: 5px;
    }

    .horizontal-scroll-container {
        padding-bottom: 3rem;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .photo-wrapper {
        min-height: 30vh;
        scroll-snap-align: center;
    }

    .photo-wrapper:hover {
        min-height: 30vh; /* Disable hover zoom on mobile */
    }

    .photo-frame {
        padding: 1vh;
        border-width: 1px;
    }

    .photo-frame img {
        max-width: 28vh;
        max-height: 32vh;
    }

    /* Simplify parallax completely for mobile - all photos same depth */
    .photo-wrapper,
    .photo-wrapper.slower,
    .photo-wrapper.slower-down,
    .photo-wrapper.faster,
    .photo-wrapper.vertical,
    .photo-wrapper.last {
        transform: rotate(90deg) translateZ(0px) scale(0.9) translateX(0%) translateY(0vh);
    }

    /* Better spacing between photos on mobile */
    .photo-wrapper + .photo-wrapper {
        margin-top: 2vh;
    }

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

/* Extra small mobile */
@media (max-width: 375px) {
    .gallery-section {
        height: 75vh;
        min-height: 450px;
    }

    .gallery-header {
        padding: 25px 10px 10px;
    }

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

    .gallery-subtitle {
        font-size: 0.85rem;
    }

    .photo-frame img {
        max-width: 24vh;
        max-height: 28vh;
    }

    .photo-wrapper {
        min-height: 28vh;
    }
}


/* Mobile landscape orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .gallery-section {
        height: 100vh;
        min-height: 100vh;
    }

    .gallery-header {
        padding: 20px 15px 10px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .gallery-subtitle {
        font-size: 0.85rem;
    }

    .horizontal-scroll-container {
        padding-bottom: 2rem;
    }

    .photo-frame img {
        max-width: 40vh;
        max-height: 45vh;
    }

    .photo-wrapper {
        min-height: 35vh;
    }
}

/* Reduce motion for users who prefer */
@media (prefers-reduced-motion: reduce) {
    /* Disable bloom animations for accessibility */
    .bloom-slice {
        transition: none !important;
    }

    .bloom-active .bloom-slice {
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    .fractal-dark-overlay {
        transition: none;
    }

    .fractal-bloom-container {
        perspective: none;
    }

    .horizontal-scroll-container {
        scroll-behavior: auto;
    }

    .photo-wrapper,
    .photo-frame,
    .photo-frame img {
        transition: none;
    }

    .photo-wrapper,
    .photo-wrapper.slower,
    .photo-wrapper.slower-down,
    .photo-wrapper.faster,
    .photo-wrapper.vertical,
    .photo-wrapper.last {
        transform: rotate(90deg) translateZ(0) scale(1) translateX(0) translateY(0);
    }
}
