/* ==========================================================================
   Premium Indian Wedding Invitation Stylesheet (Slideshow Version)
   ========================================================================== */

:root {
    /* Color Palette */
    --crimson-dark: #3a0005;
    --crimson: #700b1a;
    --ruby: #9b111e;
    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --amber: #ffbf00;
    --text-light: #fdfbf7;
    --text-muted: #e2d1c3;

    /* Fonts */
    --font-heading: 'Cinzel Decorative', cursive;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Lora', serif;
    --font-hindi: 'Tiro Devanagari Hindi', serif;

    /* Glassmorphism */
    --glass-bg: rgba(45, 0, 5, 0.5);
    --glass-border: rgba(212, 175, 55, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

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

html,
body {
    /* Prevent Scrolling for mobile/app view */
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-family: var(--font-body);
    background-color: var(--crimson-dark);
    color: var(--text-light);
    position: relative;
    touch-action: pan-y;
    /* Prevent default touch scroll */
}

/* ==========================================================================
   Backgrounds & Mandala
   ========================================================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, var(--crimson) 0%, var(--crimson-dark) 100%);
    z-index: -3;
}

.bg-ornaments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.mandala {
    position: absolute;
    width: 600px;
    height: 600px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%23d4af37' stroke-width='0.5' stroke-opacity='0.15' d='M50 0 A50 50 0 1 1 49.9 0 M50 20 A30 30 0 1 1 49.9 20 M50 35 A15 15 0 1 1 49.9 35 M0 50 L100 50 M50 0 L50 100'/%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%23d4af37' stroke-width='0.5' stroke-opacity='0.15' stroke-dasharray='1 2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: rotateSlow 60s linear infinite;
}

.mandala-1 {
    top: -150px;
    left: -150px;
}

.mandala-2 {
    bottom: -150px;
    right: -150px;
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Invitation Cover
   ========================================================================== */
#invitation-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, var(--crimson) 0%, var(--crimson-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

#invitation-cover.opened {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.cover-names {
    font-family: var(--font-script);
    font-size: 4rem;
    color: var(--gold-light);
    margin: 1.5rem 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.diya-container {
    text-align: center;
    padding: 2rem;
}

.diya {
    width: 60px;
    height: 30px;
    background: var(--gold-primary);
    border-radius: 0 0 30px 30px;
    margin: 0 auto 20px auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.flame {
    width: 20px;
    height: 30px;
    background: var(--amber);
    border-radius: 50% 50% 20% 20%;
    position: absolute;
    top: -25px;
    left: 20px;
    box-shadow: 0 0 20px var(--amber), 0 0 40px var(--gold-light);
    animation: flicker 0.5s infinite alternate;
}

@keyframes flicker {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.1) translate(1px, -2px);
        opacity: 1;
    }
}

.loading-text {
    font-family: var(--font-heading);
    color: var(--gold-light);
    letter-spacing: 2px;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Global UI Elements
   ========================================================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(212, 175, 55, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 6s infinite, none;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.ms-1 {
    margin-left: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

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

.hidden {
    display: none !important;
}

.btn-primary,
.btn-secondary,
.contact-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, #aa8529 100%);
    color: var(--crimson-dark);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.btn-secondary,
.contact-btn {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--gold-primary);
}

.btn-secondary:hover,
.contact-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Slideshow Core
   ========================================================================== */
#slideshow {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 1rem;
}

.slide.slide-active {
    opacity: 1;
    visibility: visible;
    z-index: 5;
}

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

.section-title {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Animations Inside Slides
   ========================================================================== */
.fade-in-up,
.fade-in-scale,
.slide-in-left,
.slide-in-right,
.reveal-text {
    opacity: 0;
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
    transition-delay: 0.3s;
}

.fade-in-up {
    transform: translateY(50px);
}

.fade-in-scale {
    transform: scale(0.9);
}

.slide-in-left {
    transform: translateX(-50px);
}

.slide-in-right {
    transform: translateX(50px);
}

/* When slide gets active, elements animate inside */
.slide-active .fade-in-up,
.slide-active .fade-in-scale,
.slide-active .slide-in-left,
.slide-active .slide-in-right,
.slide-active .reveal-text {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
}

/* Delay staggered elements */
.slide-active .family-card:nth-child(2) {
    transition-delay: 0.6s;
}

.slide-active .ring-animation {
    transition-delay: 0.9s;
}

/* ==========================================================================
   Hero Styles
   ========================================================================== */
.hero-content {
    max-width: 800px;
    width: 100%;
    padding: 3rem 2rem;
    text-align: center;
}

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

.ganesha-text {
    font-size: 2rem;
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.subtext {
    font-family: var(--font-heading);
    color: var(--text-muted);
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.couple-names {
    font-family: var(--font-script);
    font-size: 4.5rem;
    color: var(--gold-light);
    margin: 1rem 0;
    line-height: 1.2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.heart {
    color: var(--ruby);
    font-size: 3rem;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

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

    15% {
        transform: scale(1.2);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.2);
    }

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

.event-type {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.hero-date {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
}

.date-highlight {
    font-size: 2.5rem;
    color: var(--gold-light);
    font-weight: 700;
}

.date-month,
.date-year {
    font-size: 1.3rem;
    color: var(--gold-primary);
    text-transform: uppercase;
}

/* ==========================================================================
   Families Section
   ========================================================================== */
.families-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.family-card {
    padding: 2rem 1.5rem;
}

.family-card h3 {
    font-family: var(--font-heading);
    color: var(--gold-light);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.divider {
    height: 10px;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.family-member {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.family-member:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   The Couple Section
   ========================================================================== */
.couple-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 3rem 1.5rem;
    gap: 1.5rem;
}

.couple-details {
    flex: 1;
}

.couple-details .name {
    font-family: var(--font-script);
    font-size: 3.5rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.couple-details .desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.ring-animation {
    flex: 0 0 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rings {
    position: relative;
    width: 60px;
    height: 60px;
}

.ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--gold-primary);
    border-radius: 50%;
    top: 10px;
}

.ring-1 {
    left: -10px;
    animation: spin 4s linear infinite;
}

.ring-2 {
    right: -10px;
    border-color: var(--gold-light);
    animation: spin 4s linear infinite reverse;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

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

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

/* ==========================================================================
   Event Details Section
   ========================================================================== */
.event-card {
    max-width: 650px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.event-icon {
    font-size: 2.5rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.ceremony-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
}

.event-info {
    text-align: left;
    margin-bottom: 2rem;
    max-width: 350px;
    margin-inline: auto;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.2);
}

.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-row i {
    color: var(--gold-primary);
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

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

/* ==========================================================================
   RSVP Section
   ========================================================================== */
.rsvp-container {
    max-width: 650px;
    margin: 0 auto;
}

.rsvp-quote {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
}

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

.rsvp-form {
    text-align: left;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gold-primary);
    outline: none;
    font-family: var(--font-body);
}

.input-group select {
    color: var(--gold-light);
}

.input-group select option {
    background: var(--crimson-dark);
    color: var(--text-light);
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:focus~label,
.input-group textarea:not(:placeholder-shown)~label {
    top: -18px;
    font-size: 0.8rem;
    color: var(--gold-primary);
}

.rsvp-form .btn-primary {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.form-loader {
    position: absolute;
    inset: 0;
    background: rgba(45, 0, 5, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 16px;
}

/* ==========================================================================
   Slide Navigation Dots
   ========================================================================== */
.slide-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--gold-primary);
}

.nav-dot.active {
    background: var(--gold-primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--gold-light);
}

/* ==========================================================================
   Music Button
   ========================================================================== */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.music-btn.playing {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* ==========================================================================
   Animations (Petals)
   ========================================================================== */
.petal {
    position: fixed;
    top: -10vh;
    background: linear-gradient(135deg, var(--ruby) 0%, #d11a2a 100%);
    border-radius: 15px 0 15px 0;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    animation: fall linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg) rotateX(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(110vh) rotate(360deg) rotateX(360deg);
        opacity: 0;
    }
}

/* ==========================================================================
   Custom Alert Modal
   ========================================================================== */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.custom-alert-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8) translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 2.5rem 2rem;
}

.custom-alert-overlay:not(.hidden) .custom-alert-box {
    transform: scale(1) translateY(0);
}

.alert-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    animation: success-pulse 2s infinite;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
        border-radius: 50%;
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
        border-radius: 50%;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
        border-radius: 50%;
    }
}

.alert-title {
    font-family: var(--font-heading);
    color: var(--gold-light);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.alert-message {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Mobile/Responsive Fixes
   ========================================================================== */
@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem;
    }

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

    .ganesha-text {
        font-size: 1.6rem;
    }

    .families-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .family-card {
        padding: 1.2rem;
    }

    .family-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }

    .family-member {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .couple-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .couple-details .name {
        font-size: 2.8rem;
    }

    .ring-animation {
        flex: 0 0 70px;
        margin: 0;
    }

    .event-card {
        padding: 1.5rem;
    }

    .ceremony-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .info-row {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem;
    }

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

    .rsvp-quote {
        font-size: 1.8rem;
    }

    .contact-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .slide-nav {
        bottom: 15px;
    }
}