/* ================================================
   WEDDING ALBUM — Cinematic Slideshow
   Premium Fine-Art Design System
   ================================================ */

/* --- Custom Properties --- */
:root {
    --bg-dark: #1e1418;
    --bg-panel: #2a1f24;
    --champagne: #d4a373;
    --champagne-light: #e8cdb5;
    --gold: #c9a84c;
    --cream: #f5ede3;
    --white: #ffffff;
    --text-muted: rgba(245, 237, 227, 0.5);
    --text-soft: rgba(245, 237, 227, 0.7);

    --font-script: 'Great Vibes', cursive;
    --font-serif: 'Cormorant Garamond', serif;

    --transition-slow: 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-medium: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.3s ease;

    --panel-width: 38%;
    --thumb-height: 80px;
    --thumb-width: 110px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--cream);
    font-family: var(--font-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

/* ================================================
   PRELOADER — Burning Heart
   ================================================ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.burning-heart-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    transform: scale(1.3);
    margin-bottom: 24px;
}

.heart-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.heart-trail {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawHeart 2.2s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes drawHeart {
    0% {
        stroke-dashoffset: 100;
    }

    80%,
    100% {
        stroke-dashoffset: 0;
    }
}

.spark {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: #fff;
    border-radius: 50%;
    box-shadow:
        0 0 8px 3px #ffc107,
        0 0 12px 5px #ff5722,
        0 0 20px 8px #f44336;
    offset-path: path("M 50 80 C 50 80 15 55 15 30 C 15 10 35 10 50 25 C 65 10 85 10 85 30 C 85 55 50 80 50 80 Z");
    animation: runSpark 2.2s cubic-bezier(0.45, 0, 0.55, 1) forwards;
    z-index: 2;
}

@keyframes runSpark {
    0% {
        offset-distance: 0%;
        opacity: 0;
    }

    5%,
    80% {
        opacity: 1;
    }

    85%,
    100% {
        offset-distance: 100%;
        opacity: 0;
    }
}

/* Firecracker particles */
.spark-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffeb3b;
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.spark-particle.s1 {
    animation: scatter 0.4s linear infinite;
    --dx: -15px;
    --dy: -20px;
    background: #ffc107;
}

.spark-particle.s2 {
    animation: scatter 0.5s linear infinite 0.1s;
    --dx: 15px;
    --dy: -15px;
    background: #ff9800;
}

.spark-particle.s3 {
    animation: scatter 0.3s linear infinite 0.2s;
    --dx: 0px;
    --dy: -25px;
    background: #fff;
}

@keyframes scatter {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0);
        opacity: 0;
    }
}

.preloader-script {
    font-family: var(--font-script);
    font-size: 2.8rem;
    color: var(--champagne);
    text-shadow: 0 0 15px rgba(212, 163, 115, 0.4);
    opacity: 0;
    animation: pulseGlow 2.2s ease-in-out forwards;
}

@keyframes pulseGlow {
    0% {
        opacity: 0;
    }

    30%,
    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ================================================
   MAIN LAYOUT
   ================================================ */
.album-container {
    display: grid;
    grid-template-columns: var(--panel-width) 1fr;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ================================================
   LEFT PANEL — Info
   ================================================ */
.info-panel {
    background: var(--bg-panel);
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px 50px;
    overflow: hidden;
}

/* Subtle grain texture overlay */
.info-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

/* Accent line on the right edge */
.info-panel::after {
    content: '';
    position: absolute;
    top: 15%;
    bottom: 15%;
    right: 0;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(214, 182, 122, 0.3) 30%,
            rgba(214, 182, 122, 0.3) 70%,
            transparent);
}

/* Faint Desktop Quote Background */
.info-bg-quote {
    margin-top: -30px;
    margin-left: -20px;
    font-family: var(--font-serif);
    font-size: clamp(50px, 6.5vw, 100px);
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(214, 182, 122, 0.12);
    /* Champagne Gold at 12% opacity */
    letter-spacing: 5px;
    line-height: 0.82;
    text-align: left;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    flex-shrink: 0;
}

.info-panel-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Distraction-Free Mode (Mobile toggle logic) */
.info-hidden .info-top,
.info-hidden .couple-names,
.info-hidden .wedding-date-wrapper,
.info-hidden .flip-clock,
.info-hidden .info-divider,
.info-hidden .slide-counter {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.info-top,
.couple-names,
.wedding-date-wrapper,
.flip-clock,
.info-divider,
.slide-counter {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.info-hidden.info-panel::before,
.info-hidden.info-panel::after {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* --- Top Content --- */
.info-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* New wrapper to tightly frame the text */
.info-text-box {
    border-top: 1px solid rgba(214, 182, 122, 0.2);
    border-bottom: 1px solid rgba(214, 182, 122, 0.2);
    padding: 30px 0;
    margin: 30px 0;
    /* Reset margin down to rely on flexbox automatic spacing */
    text-align: left;
    /* Keep text left-aligned */
}

.info-tag {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--champagne);
    display: inline-block;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.info-title {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 400;
    color: var(--champagne-light);
    line-height: 1.2;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.8s ease forwards 0.4s;
}

.info-description {
    font-family: var(--font-serif);
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.85;
    color: var(--text-soft);
    max-width: 400px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.8s ease forwards 0.6s;
}

/* --- Bottom Content --- */
.info-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.info-couple {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.couple-names {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--champagne);
}

.wedding-date-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 8px;
    font-family: var(--font-serif);
    color: var(--champagne);
}

.wedding-date-day {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1;
}

.wedding-date-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 400;
    line-height: 1.2;
    border-left: 1px solid rgba(212, 163, 115, 0.3);
    padding-left: 12px;
}

.wedding-date-year {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1;
    color: var(--champagne-light);
}

/* --- Flip Clock Luxury --- */
.flip-clock {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    /* Wider gap for elegance */
    margin-top: 15px;
}

.flip-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Space between card and label */
}

/* Base Card Styling */
.flip-card {
    position: relative;
    width: 65px;
    height: 85px;
    perspective: 800px;
    border-radius: 4px;
    /* Slight rounding, not too much */
    background: #0f111a;
    /* Deep navy / dark charcoal */
    border: 1px solid rgba(214, 182, 122, 0.4);
    /* Thin gold border */
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    /* Soft inner light */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The horizontal split line */
.flip-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.8);
    /* Dark split line */
    z-index: 5;
    transform: translateY(-50%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
    /* Very subtle bottom highlight */
}

/* Number Container */
.flip-top,
.flip-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    overflow: hidden;
    background: linear-gradient(to bottom, #161824 0%, #0c0e14 100%);
}

.flip-top {
    top: 0;
    transform-origin: bottom center;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.flip-bottom {
    bottom: 0;
    transform-origin: top center;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* Typography for Numbers */
.flip-top span,
.flip-bottom span {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;

    /* Make the span height exactly match the parent card, not the half-container */
    height: 85px;
    line-height: 85px;

    /* Center horizontally */
    text-align: center;

    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 400;
    color: #d6b67a;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.flip-top span {
    /* Top half mask reveals from 0 to 42.5px */
    top: 0;
    /* Dịch toàn bộ chữ lên trên 3px để căn giữa theo mắt (bù bù trừ ascender của font) */
    transform: translateY(-3px);
}

.flip-bottom span {
    /* Bottom half mask must reveal from 42.5px to 85px. 
       -50% đẩy từ 0 -> -42.5px để hiển thị phần dưới.
       Trừ tiếp 3px để thẳng hàng tuyệt đối với nửa trên. */
    top: 0;
    transform: translateY(calc(-50% - 3px));
}

/* 3D Flip Mechanics - Fall Animations */
.falling-top {
    animation: foldDownTop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 10;
    /* Keep falling top above the static top */
    transform-origin: bottom center;
}

.falling-bottom {
    animation: foldDownBottom 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
    z-index: 10;
    /* Keep falling bottom above the static bottom */
    transform-origin: top center;
    /* Bắt đầu ở trạng thái gập ngang 90 độ (tàng hình) đợi nửa trên rơi xuống */
    transform: rotateX(90deg);
}

@keyframes foldDownTop {
    0% {
        transform: rotateX(0deg);
        filter: brightness(1);
    }

    100% {
        transform: rotateX(-90deg);
        filter: brightness(0.3);
        /* Tối đi khi gập xuống */
    }
}

@keyframes foldDownBottom {
    0% {
        transform: rotateX(90deg);
        filter: brightness(0.3);
    }

    100% {
        transform: rotateX(0deg);
        filter: brightness(1);
    }
}

/* Label Styling */
.flip-label {
    font-family: var(--font-serif);
    font-size: 0.65rem;
    color: rgba(245, 237, 227, 0.6);
    /* Soft cream/grey */
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 300;
}

.flip-sep {
    font-size: 1.8rem;
    color: rgba(214, 182, 122, 0.4);
    margin-top: 20px;
    font-weight: 300;
}

.info-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 163, 115, 0.2), transparent);
    margin-bottom: 8px;
}

.slide-counter {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 300;
}

.slide-counter #currentSlide {
    color: var(--champagne);
    font-size: 1.1rem;
}

.counter-sep {
    margin: 0 4px;
}

/* ================================================
   RIGHT PANEL — Slideshow
   ================================================ */
.slideshow-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-dark);
}

/* --- Stage --- */
.slideshow-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Cinematic vignette overlay */
.slideshow-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(30, 20, 24, 0.5) 100%);
}

/* Film grain texture */
.slideshow-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.5s steps(4) infinite;
    transform: translateZ(0);
    /* Force GPU */
    will-change: transform;
}

@keyframes grainShift {
    0% {
        transform: translate3d(0, 0, 0);
    }

    25% {
        transform: translate3d(-2px, 2px, 0);
    }

    50% {
        transform: translate3d(2px, -1px, 0);
    }

    75% {
        transform: translate3d(-1px, -2px, 0);
    }

    100% {
        transform: translate3d(1px, 1px, 0);
    }
}

/* --- Slides --- */
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Blurred background behind the contained image */
.slide::before {
    content: '';
    position: absolute;
    inset: -20px;
    background-image: var(--slide-bg);
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.4);
    transform: scale(1.1) translateZ(0);
    /* Hardware accelerate blur */
    will-change: filter, transform;
    z-index: 0;
}

.slide-image {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    will-change: transform;
}

/* Ken Burns Animations — refined, softer 8s */
.slide.active .slide-image {
    animation: var(--kb-animation, kenBurns1) 8s ease-in-out forwards;
}

@keyframes kenBurns1 {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.05) translate3d(-0.8%, -0.5%, 0);
    }
}

@keyframes kenBurns2 {
    from {
        transform: scale(1.04) translate3d(-0.5%, 0.3%, 0);
    }

    to {
        transform: scale(1) translate3d(0.5%, -0.3%, 0);
    }
}

@keyframes kenBurns3 {
    from {
        transform: scale(1) translate3d(0.3%, 0, 0);
    }

    to {
        transform: scale(1.05) translate3d(-0.3%, 0.7%, 0);
    }
}

@keyframes kenBurns4 {
    from {
        transform: scale(1.05) translate3d(0.3%, -0.5%, 0);
    }

    to {
        transform: scale(1) translate3d(-0.5%, 0.3%, 0);
    }
}

/* --- Slide overlay gradient (cinematic) --- */
.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(to right, var(--bg-dark) 0%, transparent 6%),
        linear-gradient(135deg, rgba(30, 20, 24, 0.25) 0%, transparent 50%),
        linear-gradient(to top, rgba(30, 20, 24, 0.4) 0%, transparent 25%),
        radial-gradient(ellipse at center, transparent 60%, rgba(30, 20, 24, 0.2) 100%);
}

/* ================================================
   NAVIGATION BUTTONS
   ================================================ */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(30, 20, 24, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 163, 115, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--champagne-light);
    transition: all var(--transition-fast);
    opacity: 0;
}

.slideshow-stage:hover .nav-btn {
    opacity: 1;
}

.nav-btn:hover {
    background: rgba(212, 163, 115, 0.15);
    border-color: rgba(212, 163, 115, 0.35);
    transform: translateY(-50%) scale(1.08);
}

.nav-prev {
    left: 24px;
}

.nav-next {
    right: 24px;
}

/* --- Pause Button --- */
.pause-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(30, 20, 24, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 163, 115, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--champagne-light);
    transition: all var(--transition-fast);
    opacity: 0;
}

.slideshow-stage:hover .pause-btn {
    opacity: 1;
}

.pause-btn:hover {
    background: rgba(212, 163, 115, 0.15);
    border-color: rgba(212, 163, 115, 0.35);
}

.pause-btn .hidden {
    display: none;
}

/* --- Music Button --- */
.music-btn {
    position: absolute;
    top: 24px;
    right: 80px;
    /* Position to the left of pause, or adjust as needed */
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #000000;
    /* Dark inner background like vinyl */
    border: 2px solid #ffffff;
    /* White border from screenshot */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.music-btn.playing {
    animation: rotateVinyl 4s linear infinite;
}

.music-btn:hover {
    transform: scale(1.05);
    /* slightly scale on hover instead of color change */
}

@keyframes rotateVinyl {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ================================================
   THUMBNAIL BAR — Film Strip
   ================================================ */
.thumbnail-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(30, 20, 24, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 163, 115, 0.1);
    overflow-x: auto;
    scroll-behavior: smooth;
    flex-shrink: 0;
    position: relative;
}

/* Sprocket holes top */
.thumbnail-bar::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: repeating-linear-gradient(90deg,
            rgba(212, 163, 115, 0.12) 0px,
            rgba(212, 163, 115, 0.12) 8px,
            transparent 8px,
            transparent 20px);
    border-radius: 1px;
}

/* Sprocket holes bottom */
.thumbnail-bar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: repeating-linear-gradient(90deg,
            rgba(212, 163, 115, 0.12) 0px,
            rgba(212, 163, 115, 0.12) 8px,
            transparent 8px,
            transparent 20px);
    border-radius: 1px;
}

/* Hide scrollbar but keep scroll functionality */
.thumbnail-bar::-webkit-scrollbar {
    height: 0;
}

.thumbnail-bar {
    scrollbar-width: none;
}

.thumb {
    flex-shrink: 0;
    width: var(--thumb-width);
    height: var(--thumb-height);
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(212, 163, 115, 0.15);
    transition: all var(--transition-fast);
    opacity: 0.5;
    position: relative;
    overflow: hidden;
}

.thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    /* Dark wash for inactive thumbs */
    transition: background var(--transition-fast);
    border-radius: 3px;
}

.thumb:hover {
    opacity: 0.85;
    transform: scale(1.08);
    border-color: rgba(212, 163, 115, 0.35);
}

.thumb:hover::after {
    background: transparent;
}

.thumb.active {
    opacity: 1;
    border-color: var(--gold);
    box-shadow:
        0 0 12px rgba(201, 168, 76, 0.25),
        0 0 24px rgba(201, 168, 76, 0.1),
        inset 0 0 0 1px rgba(201, 168, 76, 0.2);
    transform: scale(1.06);
}

.thumb.active::after {
    background: transparent;
}

/* ================================================
   TEXT ANIMATIONS — Cinematic Slide-In
   ================================================ */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translate3d(-20px, 0, 0);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 15px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.info-tag.animate,
.info-title.animate,
.info-description.animate {
    animation: none;
    opacity: 0;
    transform: translate3d(-20px, 0, 0);
    filter: blur(4px);
}

.info-tag.animate.show {
    animation: fadeSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.info-title.animate.show {
    animation: fadeSlideIn 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards 0.12s;
}

.info-description.animate.show {
    animation: fadeSlideIn 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards 0.24s;
}

/* --- Cinematic Transition Overlay (black flash) --- */
.cinematic-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: var(--bg-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cinematic-overlay.flash {
    opacity: 1;
}

/* ================================================
   SLIDE PROGRESS BAR — Cinematic Timeline Scrubber
   ================================================ */
.slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 15;
    background: rgba(212, 163, 115, 0.08);
    /* faint dark track on light background */
}

.slide-progress-fill {
    position: relative;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, transparent, rgba(212, 163, 115, 1));
    box-shadow: 0 0 8px rgba(212, 163, 115, 0.5);
    transition: width 0.3s linear;
}

/* Glowing playhead dot at the leading edge */
.slide-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow:
        0 0 8px 2px rgba(212, 163, 115, 0.9),
        0 0 15px 5px rgba(212, 163, 115, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide-progress-fill.animating::after {
    opacity: 1;
    /* Only show dot when progress is active */
}

.slide-progress-fill.animating {
    transition: none;
    animation: progressFill 6s linear forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* ================================================
   SWIPE HINT (Mobile)
   ================================================ */
.swipe-hint {
    display: none;
    position: absolute;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: swipeHintFade 4s ease-in-out forwards 3s;
    pointer-events: none;
}

.swipe-hint-icon {
    display: block;
    margin: 0 auto 6px;
    animation: swipeHintSlide 2s ease-in-out infinite 3s;
}

@keyframes swipeHintFade {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 0.7;
    }

    85% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
    }
}

@keyframes swipeHintSlide {

    0%,
    100% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }
}

/* ================================================
   RESPONSIVE — Tablet (≤ 900px)
   ================================================ */
@media (max-width: 900px) {

    html,
    body {
        overflow: hidden;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }

    .album-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: 100vh;
        height: 100dvh;
        /* dynamic viewport height for mobile browsers */
    }

    /* Slideshow takes full screen */
    .slideshow-panel {
        grid-row: 1;
        grid-column: 1;
        height: 100vh;
        height: 100dvh;
    }

    /* Info panel overlays bottom with cinematic gradient */
    .info-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 20;
        padding: 24px 28px 120px;
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(to top,
                rgba(30, 20, 24, 0.97) 0%,
                rgba(30, 20, 24, 0.92) 25%,
                rgba(30, 20, 24, 0.5) 55%,
                transparent 100%);
        align-items: flex-end;
    }

    .info-panel::before {
        display: none;
    }

    .info-panel::after {
        display: none;
    }

    .info-panel-inner {
        height: auto;
    }

    .info-top {
        flex: none;
    }

    .info-tag {
        font-size: 0.65rem;
        letter-spacing: 3px;
        margin-bottom: 12px;
    }

    .info-title {
        font-size: 2.2rem;
        margin-bottom: 14px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .info-description {
        font-size: 0.85rem;
        line-height: 1.5;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
    }

    .info-bottom {
        margin-top: 18px;
    }

    .info-divider {
        display: none;
    }

    .couple-names {
        font-size: 1.3rem;
    }

    /* ---- Thumbnail bar fixed at bottom ---- */
    .thumbnail-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 30;
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        gap: 10px;
        justify-content: center;
        background: rgba(30, 20, 24, 0.95);
        border-top: 1px solid rgba(212, 163, 115, 0.1);
    }

    .thumb {
        width: 64px;
        height: 48px;
        border-radius: 5px;
    }

    /* ---- Controls always visible on mobile (no hover) ---- */
    .nav-btn {
        width: 46px;
        height: 46px;
        opacity: 0.75;
        z-index: 25;
        top: 35%;
        -webkit-tap-highlight-color: transparent;
    }

    .slideshow-stage:hover .nav-btn {
        opacity: 0.75;
    }

    .nav-btn:active {
        opacity: 1;
        transform: translateY(-50%) scale(0.92);
        background: rgba(212, 163, 115, 0.2);
    }

    .nav-prev {
        left: 12px;
    }

    .nav-next {
        right: 12px;
    }

    .pause-btn {
        top: 16px;
        top: calc(16px + env(safe-area-inset-top, 0px));
        right: 16px;
        opacity: 0.75;
        width: 40px;
        height: 40px;
        z-index: 25;
        -webkit-tap-highlight-color: transparent;
    }

    .slideshow-stage:hover .pause-btn {
        opacity: 0.75;
    }

    .pause-btn:active {
        opacity: 1;
        background: rgba(212, 163, 115, 0.2);
    }

    /* ---- Slide image framing on mobile ---- */
    .slide {
        padding: 16px;
        padding-bottom: 45%;
    }

    .slide-image {
        border-radius: 12px;
    }

    /* ---- Slide overlay adjusted for mobile text readability ---- */
    .slide-overlay {
        background:
            linear-gradient(to top, rgba(30, 20, 24, 0.7) 0%, transparent 45%),
            linear-gradient(to bottom, rgba(30, 20, 24, 0.35) 0%, transparent 20%),
            radial-gradient(ellipse at center, transparent 40%, rgba(30, 20, 24, 0.25) 100%);
    }

    /* Show swipe hint on mobile */
    .swipe-hint {
        display: block;
    }
}

/* ================================================
   RESPONSIVE — Phone (≤ 600px)
   ================================================ */
@media (max-width: 600px) {
    .album-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    .info-bg-quote {
        display: none;
    }

    /* Hide the text box borders on all mobile/tablet views */
    .info-text-box {
        border: none !important;
        margin: 0 !important;
        padding-top: 10px !important;
        padding-bottom: 20px !important;
    }

    .info-panel {
        padding: 30px 22px 110px;
        padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
        transition: background-color 0.5s ease;
    }

    .info-hidden.info-panel {
        background-color: transparent !important;
        pointer-events: none;
        /* Let touches pass through to slideshow */
    }

    .info-hidden.info-panel .action-buttons {
        pointer-events: auto;
        /* Re-enable pointer events so buttons can still be clicked */
    }

    .info-tag {
        font-size: 0.6rem;
        letter-spacing: 2.5px;
        margin-bottom: 10px;
    }

    .info-title {
        font-size: 1.85rem;
        margin-bottom: 12px;
    }

    .info-description {
        font-size: 0.82rem;
        line-height: 1.55;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .couple-names {
        font-size: 1.15rem;
    }

    .countdown-wrapper {
        gap: 6px;
        padding: 6px 10px;
        margin-top: 4px;
    }

    .countdown-item {
        min-width: 32px;
    }

    .countdown-value {
        font-size: 1.1rem;
    }

    .countdown-label {
        font-size: 0.5rem;
        letter-spacing: 1px;
    }

    .countdown-sep {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .couple-date {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .countdown-wrapper {
        gap: 8px;
        padding: 8px 12px;
    }

    .countdown-item {
        min-width: 38px;
    }

    .countdown-value {
        font-size: 1.3rem;
    }

    .countdown-label {
        font-size: 0.55rem;
        letter-spacing: 1.5px;
    }

    .countdown-sep {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .slide-counter {
        font-size: 0.75rem;
    }

    .slide-counter #currentSlide {
        font-size: 0.95rem;
    }

    .info-bottom {
        margin-top: 14px;
    }

    /* Thumbnails smaller on phones */
    .thumbnail-bar {
        padding: 8px 12px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }

    .thumb {
        width: 56px;
        height: 42px;
        border-radius: 4px;
        border-width: 1.5px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .nav-prev {
        left: 8px;
    }

    .nav-next {
        right: 8px;
    }

    .pause-btn {
        width: 36px;
        height: 36px;
        top: 12px;
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: 12px;
    }

    .pause-btn svg {
        width: 13px;
        height: 13px;
    }

    .swipe-hint {
        bottom: 105px;
    }
}

/* ================================================
   RESPONSIVE — Small Phone (≤ 400px)
   ================================================ */
@media (max-width: 400px) {
    .info-title {
        font-size: 1.55rem;
        margin-bottom: 10px;
    }

    .info-description {
        font-size: 0.78rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .info-panel {
        padding: 24px 18px 100px;
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }

    .thumb {
        width: 48px;
        height: 36px;
    }

    .thumbnail-bar {
        gap: 6px;
        padding: 6px 10px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    }
}

/* ================================================
   RESPONSIVE — Landscape Mobile
   ================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .info-panel {
        padding: 16px 24px 80px;
        background: linear-gradient(to top,
                rgba(30, 20, 24, 0.95) 0%,
                rgba(30, 20, 24, 0.7) 50%,
                transparent 100%);
    }

    .info-tag {
        margin-bottom: 6px;
        font-size: 0.55rem;
    }

    .info-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .info-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        line-height: 1.4;
    }

    .info-bottom {
        margin-top: 10px;
    }

    .couple-names {
        font-size: 1rem;
    }

    .thumbnail-bar {
        padding: 6px 16px;
    }

    .thumb {
        width: 50px;
        height: 38px;
    }

    .nav-btn {
        width: 38px;
        height: 38px;
    }
}

/* ================================================
   VENUES MODAL & BUTTON
   ================================================ */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.btn-venues {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(212, 163, 115, 0.3);
    border-radius: 30px;
    background: transparent;
    color: var(--champagne-light);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--transition-fast);
}

.btn-author {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(212, 163, 115, 0.3);
    border-radius: 50%;
    background: transparent;
    color: var(--champagne-light);
    transition: all var(--transition-fast);
}

.btn-author:hover {
    background: rgba(212, 163, 115, 0.15);
    border-color: rgba(212, 163, 115, 0.6);
    transform: scale(1.05);
}

.btn-venues:hover {
    background: rgba(212, 163, 115, 0.1);
    border-color: rgba(212, 163, 115, 0.6);
}

.venues-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.venues-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.venues-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 20, 24, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.venues-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 800px;
    background: rgba(42, 31, 36, 0.95);
    border: 1px solid rgba(212, 163, 115, 0.2);
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.venues-modal.is-open .venues-container {
    transform: translateY(0);
}

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.btn-close-modal:hover {
    color: var(--champagne);
}

.venues-title {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--champagne);
    text-align: center;
    margin-bottom: 20px;
}

.venues-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 163, 115, 0.3), transparent);
    margin-bottom: 40px;
}

.venues-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.venue-card {
    text-align: center;
}

.venue-badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.venue-name {
    font-size: 1.5rem;
    color: var(--champagne-light);
    margin-bottom: 12px;
}

.venue-time {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--cream);
    margin-bottom: 12px;
}

.venue-address {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: 24px;
}

.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bg-dark);
    background: var(--champagne);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-map:hover {
    background: var(--champagne-light);
    transform: translateY(-2px);
}

.venues-thankyou {
    text-align: center;
    margin-top: 40px;
    font-style: italic;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .venues-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .venues-container {
        padding: 36px 20px;
        max-height: 85vh;
        width: 92%;
        overflow-y: auto;
    }

    .venues-divider {
        margin-bottom: 24px;
    }

    .venues-title {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }

    .venue-name {
        font-size: 1.35rem;
    }

    .venue-time,
    .venue-address {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .venues-thankyou {
        margin-top: 32px;
        font-size: 0.85rem;
    }

    .btn-close-modal {
        top: 16px;
        right: 16px;
    }
}

@media (max-width: 400px) {
    .venues-title {
        font-size: 2.1rem;
    }

    .venues-container {
        padding: 30px 16px;
        width: 94%;
    }

    .venue-name {
        font-size: 1.25rem;
    }

    .btn-map {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* ================================================
   ACTION BUTTONS & WEDDING INVITATION (ENVELOPE)
   ================================================ */
.action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Eye Toggle & Envelope Buttons Styling */
.btn-envelope,
.btn-toggle-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(214, 182, 122, 0.15) 0%, rgba(214, 182, 122, 0.05) 100%);
    border: 1px solid rgba(214, 182, 122, 0.4);
    border-radius: 8px;
    /* Soft rounding */
    color: var(--champagne);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-envelope:hover,
.btn-toggle-info:hover {
    transform: scale(1.08) translateY(-2px);
    background: linear-gradient(135deg, rgba(214, 182, 122, 0.25) 0%, rgba(214, 182, 122, 0.1) 100%);
    box-shadow: 0 6px 16px rgba(214, 182, 122, 0.2);
    border-color: rgba(214, 182, 122, 0.6);
}

.btn-envelope {
    transform-origin: center bottom;
    animation: wiggleEnvelope 6s ease-in-out infinite;
}

.btn-envelope:hover {
    animation-play-state: paused;
    /* Pause wiggle on hover */
}

.btn-toggle-info .hidden {
    display: none;
}

@keyframes wiggleEnvelope {

    0%,
    90% {
        transform: rotate(0deg);
    }

    92% {
        transform: rotate(-8deg);
    }

    94% {
        transform: rotate(6deg);
    }

    96% {
        transform: rotate(-4deg);
    }

    98% {
        transform: rotate(2deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Invitation Modal Overlay */
.invitation-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.invitation-modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop */
.invitation-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Card */
.invitation-card {
    position: relative;
    z-index: 201;
    width: 100%;
    max-width: 480px;
    background: #140d10;
    /* Darker, richer */
    border-radius: 8px;
    padding: 12px;
    /* Pad for the inner border */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(214, 182, 122, 0.1);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.invitation-modal.show .invitation-card {
    transform: scale(1) translateY(0);
}

/* Inner Ornate Border */
.invitation-border-inner {
    border: 1px solid rgba(214, 182, 122, 0.25);
    border-radius: 4px;
    padding: 50px 40px;
    position: relative;
    text-align: center;
}

.invitation-border-inner::before,
.invitation-border-inner::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(214, 182, 122, 0.5);
    pointer-events: none;
}

.invitation-border-inner::before {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

.invitation-border-inner::after {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
}

/* Close button inside card */
.btn-close-invitation {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(245, 237, 227, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px;
    z-index: 10;
}

.btn-close-invitation:hover {
    color: var(--champagne);
    transform: rotate(90deg) scale(1.1);
}

/* Invitation Content Typography */
.invitation-header {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.invitation-subtitle {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.invitation-names-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 25px;
}

.invitation-name {
    font-family: var(--font-script);
    font-size: 3.5rem;
    line-height: 1;
    background: linear-gradient(to right, #e6d3a8, #c69b5c, #e6d3a8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(214, 182, 122, 0.1);
}

.invitation-amp {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--champagne);
    opacity: 0.7;
}

.invitation-divider {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.invitation-details {
    margin-top: 25px;
}

.invite-time {
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: var(--champagne);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.invite-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid rgba(214, 182, 122, 0.15);
    border-bottom: 1px solid rgba(214, 182, 122, 0.15);
}

.invite-date .date-big {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--text-light);
    line-height: 1;
}

.invite-date .month-year {
    text-align: left;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.6;
    color: var(--text-soft);
}

.invite-location {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: 35px;
}

.invite-location strong {
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.invitation-footer {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ================================================
   AUTHOR INFO MODAL (PMD)
   ================================================ */
.author-modal {
    max-width: 450px;
    text-align: center;
    padding: 40px;
}

.author-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.pmd-name {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--champagne-light);
    display: block;
    margin-top: 10px;
    line-height: 1;
}

.author-contact-group {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin-top: 5px;
}

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(212, 163, 115, 0.3);
    border-radius: 50%;
    background: transparent;
    color: var(--champagne-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-envelope,
.btn-author {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(212, 163, 115, 0.3);
    color: var(--champagne-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    /* For the notification badge */
}

/* --- Notification Badge (+1) --- */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #e63946;
    /* A vibrant, romantic red */
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(230, 57, 70, 0.5);
    pointer-events: none;
    animation: pulseBadge 2s infinite ease-in-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-badge.hidden {
    opacity: 0;
    transform: scale(0.5);
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(230, 57, 70, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    }
}

.btn-envelope:hover,
.btn-author:hover {
    background: var(--champagne-hover);
    border-color: rgba(212, 163, 115, 0.6);
    transform: translateY(-2px);
}

.btn-copy:hover {
    background: var(--champagne-hover);
    border-color: rgba(212, 163, 115, 0.6);
    transform: scale(1.05);
}

.copy-toast {
    position: absolute;
    top: -35px;
    right: 0;
    background: rgba(212, 163, 115, 0.9);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.copy-toast.show {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ================================================
   UTILITY — Reduced Motion
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    .slide-image {
        animation: none !important;
    }

    .slide {
        transition-duration: 0.3s;
    }

    .swipe-hint,
    .swipe-hint-icon {
        animation: none !important;
    }
}
