/**
 * Main Stylesheet for Thiệp Cưới Hoàng & Lệ
 * Responsive Design (Desktop Expansion + Mobile Optimization)
 * Sticky Notes Wishes Board (Sổ Lưu Bút Online)
 */

/* ================= 1. FONTS & ROOT VARIABLES ================= */
@font-face {
    font-family: 'Motherland Signature';
    src: url('../fonts/motherland-signature.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Alisheia';
    src: url('../fonts/alisheia.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #4c6841;
    --primary-dark: #3b5233;
    --primary-light: #608153;
    --bg-page: #ebe7de;
    --bg-parchment: #fcfbf7;
    --bg-card: #ffffff;
    --text-main: #333d2e;
    --text-muted: #6b7765;
    --border-gold: #ded8cb;
    --border-soft: rgba(76, 104, 65, 0.15);
    --font-script: 'Motherland Signature', 'Alisheia', 'Cormorant Garamond', cursive;
    --font-serif: 'Lora', 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

button, input, textarea {
    font-family: inherit;
}

/* ================= 2. PETALS CANVAS ================= */
#petals-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ================= 3. FLOATING MUSIC BUTTON ================= */
.music-floating-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-gold);
    border-radius: 40px;
    padding: 6px 14px 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(76, 104, 65, 0.18);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-floating-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(76, 104, 65, 0.28);
}

.music-wave-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.music-disc-icon {
    display: none;
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    animation: spinDisc 3s linear infinite;
}

.music-floating-btn.is-playing .music-disc-icon {
    display: block;
}

.music-floating-btn.is-playing .music-wave-icon {
    display: block;
}

.music-floating-btn.is-paused .music-disc-icon {
    display: block;
    animation-play-state: paused;
}

.music-floating-btn.is-paused .music-wave-icon {
    display: none;
}

@keyframes spinDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-color);
}

/* ================= 4. RESPONSIVE CONTAINER & CARD WRAPPER ================= */
.invitation-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0;
}

.invitation-wrapper {
    width: 100%;
    max-width: 1140px;
    background: var(--bg-parchment);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

/* ================= 5. SECTION 1: HERO COVER ================= */
.section-hero {
    position: relative;
    padding: 35px 20px 25px;
    background: #fdfbf7;
    text-align: center;
}

.hero-arch-container {
    position: relative;
    width: 340px;
    height: 480px;
    margin: 0 auto;
}

.hero-photo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #2b3a25;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 1px var(--border-gold), 0 14px 35px rgba(0, 0, 0, 0.12);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    display: block;
}

/* Bottom decorative floral wreath */
.hero-bottom-foliage {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    z-index: 2;
    pointer-events: none;
}

.foliage-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Calligraphy names placed with high contrast */
.hero-names-overlay {
    position: absolute;
    bottom: 22px;
    left: 0;
    width: 100%;
    z-index: 3;
    text-align: center;
}

.names-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
}

.couple-calligraphy-name {
    font-family: var(--font-script);
    font-size: 58px;
    color: #ffffff;
    font-weight: normal;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.couple-ampersand-wrap {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.ampersand-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-wax-seal {
    position: absolute;
    bottom: -22px;
    right: -10px;
    width: 90px;
    height: 90px;
    z-index: 5;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.hero-wax-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ================= 6. SECTION 2: CALENDAR ================= */
.section-calendar {
    padding: 45px 25px 50px;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid rgba(76, 104, 65, 0.08);
}

.calendar-inner {
    max-width: 440px;
    margin: 0 auto;
}

.save-the-date-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--primary-color);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.calendar-month-badge {
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.wedding-calendar-table {
    width: 100%;
    max-width: 350px;
    margin: 0 auto 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.calendar-weekdays span {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 8px;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    font-family: var(--font-serif);
    font-size: 14.5px;
    color: #4a5568;
    position: relative;
    border-radius: 50%;
}

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

.calendar-day.is-wedding-day {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(76, 104, 65, 0.35);
}

.calendar-day.is-wedding-day .heart-marker {
    position: absolute;
    top: -5px;
    right: -2px;
    font-size: 12px;
    color: #e53e3e;
    animation: heartBeat 1.5s infinite;
}

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

.calendar-footer-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.calendar-footer-sub .sub-line {
    width: 45px;
    height: 1px;
    background: var(--border-gold);
}

.calendar-footer-sub .sub-text {
    font-family: var(--font-script);
    font-size: 26px;
    color: var(--primary-color);
}

/* ================= 7. SECTION 3: COUPLE PROFILES ================= */
.section-couple {
    padding: 55px 30px;
    background: var(--bg-parchment);
    text-align: center;
}

.couple-profile-card {
    margin-bottom: 24px;
}

.profile-photo-arch {
    width: 195px;
    height: 265px;
    margin: 0 auto 16px;
    border-radius: 20px;
    padding: 6px;
    border: 1.5px solid var(--border-gold);
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo-arch:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.arch-mask {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.arch-mask img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.profile-role-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color);
    padding: 3px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-name {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.profile-parents {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: var(--text-muted);
}

.couple-divider {
    width: 220px;
    margin: 25px auto;
}

.couple-divider img {
    width: 100%;
}

/* ================= 8. SECTION 4: LOVE STORY ================= */
.section-story {
    padding: 55px 25px;
    position: relative;
    background: #ffffff;
}

.story-container {
    position: relative;
    background: #faf8f2;
    border-radius: 16px;
    border: 1px solid var(--border-gold);
    padding: 45px 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
}

.story-paper-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
}

.story-paper-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Flex on mobile, 2-column Grid on desktop */
.story-content-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.story-polaroid-box {
    position: relative;
    width: 220px;
    height: 255px;
    margin: 0 auto 20px;
    transform: rotate(-2deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 10px 10px 32px;
    border-radius: 4px;
}

.polaroid-photo {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.polaroid-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.polaroid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.story-branch-decor {
    width: 140px;
    margin: 15px auto 25px;
}

.story-header {
    margin-bottom: 20px;
}

.story-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.story-script-title {
    font-family: var(--font-script);
    font-size: 46px;
    color: var(--primary-color);
    font-weight: normal;
    line-height: 1.1;
    margin-bottom: 18px;
}

.story-text-block {
    text-align: justify;
    font-size: 15px;
    color: #4a5568;
    line-height: 1.85;
}

.story-paragraph {
    margin-bottom: 16px;
}

.story-paragraph:last-child {
    margin-bottom: 0;
}

/* ================= 9. SECTION 5: INVITATION & VENUE ================= */
.section-invitation {
    padding: 55px 25px;
    background: var(--bg-parchment);
    text-align: center;
}

.invitation-card-box {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-gold);
    padding: 45px 30px;
    box-shadow: 0 4px 20px rgba(76, 104, 65, 0.08);
    max-width: 860px;
    margin: 0 auto;
}

.invitation-ornament-top {
    width: 65px;
    margin: 0 auto 16px;
}

.invitation-names-calligraphy {
    font-family: var(--font-script);
    font-size: 46px;
    color: var(--primary-color);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.invitation-names-calligraphy .inv-and {
    font-size: 28px;
    font-family: var(--font-serif);
    color: var(--border-gold);
}

.invitation-intro-text {
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 24px;
}

.invitation-big-date-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 15px 0 10px;
}

.date-side-left, .date-side-right {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
}

.date-center-number .big-num {
    font-family: var(--font-serif);
    font-size: 68px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    display: block;
    padding: 0 16px;
    border-left: 1.5px solid var(--border-gold);
    border-right: 1.5px solid var(--border-gold);
}

.invitation-lunar-date {
    font-size: 13.5px;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 26px;
}

.invitation-venue-card {
    background: #fbf9f4;
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 28px;
    border: 1px dashed var(--border-gold);
}

.venue-main-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.venue-hall-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #8c6b3e;
    margin-bottom: 8px;
}

.venue-street-address {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-directions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 11px 26px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(76, 104, 65, 0.3);
    transition: all 0.25s ease;
}

.btn-directions:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 104, 65, 0.4);
}

.invitation-parents-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}

.parent-side {
    flex: 1;
}

.family-side-title {
    display: block;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.parent-names {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.parent-address-sub {
    display: block;
    font-family: var(--font-sans);
    font-size: 11px;
    color: #7b8a73;
    margin-top: 4px;
    line-height: 1.35;
}

.parent-side-divider {
    width: 1px;
    height: 70px;
    background: var(--border-gold);
}

.invitation-ceremony-banner {
    margin-top: 25px;
    padding: 16px 20px;
    background: #fbf9f4;
    border: 1px dashed #d8cca8;
    border-radius: 12px;
    text-align: center;
}

.invitation-ceremony-banner .church-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    background: #735436;
    padding: 2px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.invitation-ceremony-banner .church-text {
    font-size: 13px;
    color: #4a5542;
    line-height: 1.5;
}

.invitation-ceremony-banner .church-text strong {
    color: #2b3a25;
}

/* ================= 10. SECTION 6: TIMELINE & DRESS CODE ================= */
.section-timeline {
    padding: 55px 25px;
    background: #ffffff;
    text-align: center;
}

.timeline-header-block {
    position: relative;
    margin-bottom: 35px;
}

.timeline-header-img {
    width: 160px;
    margin: 0 auto;
}

.timeline-main-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: -10px;
}

.timeline-events-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 35px;
}

.timeline-event-card {
    background: var(--bg-parchment);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 20px 14px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.event-icon-circle {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 8px;
}

.event-icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-time {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.event-title {
    font-size: 13.5px;
    color: var(--text-main);
}

.timeline-photo-banner {
    width: 100%;
    max-width: 360px;
    margin: 0 auto 35px;
}

.timeline-arch-mask {
    width: 100%;
    height: 420px;
    border-radius: 24px;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 1px var(--border-gold), 0 12px 32px rgba(0, 0, 0, 0.1);
}

.timeline-arch-mask img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-dresscode-card {
    background: var(--bg-parchment);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 26px 22px;
    max-width: 600px;
    margin: 0 auto;
}

.dresscode-title {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.dresscode-palette-img {
    max-width: 280px;
    margin: 0 auto 14px;
}

.dresscode-note {
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ================= 11. SECTION 7: ALBUM OF LOVE ================= */
.section-album {
    padding: 55px 25px;
    background: var(--bg-parchment);
    text-align: center;
}

.album-header-box {
    margin-bottom: 26px;
}

.album-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.album-script-sub {
    font-family: var(--font-script);
    font-size: 34px;
    color: var(--primary-color);
}

.wedding-gallery-component {
    margin-bottom: 22px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-main-viewport {
    position: relative;
    width: 100%;
    height: 440px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    background: #000;
}

.gallery-current-slide {
    width: 100%;
    height: 100%;
}

.gallery-current-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-current-slide img:hover {
    transform: scale(1.02);
}

.gallery-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.75);
    color: #333;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.gallery-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
}

.nav-left { left: 14px; }
.nav-right { right: 14px; }

.gallery-zoom-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gallery-thumbs-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
}

.gallery-thumbs-track::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs-track::-webkit-scrollbar-thumb {
    background: var(--border-gold);
    border-radius: 4px;
}

.gallery-thumb-item {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.gallery-thumb-item.active {
    opacity: 1;
    border-color: var(--primary-color);
}

.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-bottom-message {
    padding: 16px 15px 0;
    font-size: 15px;
    color: var(--primary-color);
    font-style: italic;
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto;
}

/* ================= 12. SECTION 8: RSVP & ACTION BUTTONS ================= */
.section-rsvp {
    padding: 55px 25px;
    background: #ffffff;
}

.rsvp-action-buttons-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-action-gift, .btn-action-rsvp-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 22px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-action-gift {
    background: #fdf6ec;
    color: #b45309;
    border: 1.5px solid #fde68a;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.12);
}

.btn-action-gift:hover {
    background: #fef3c7;
    transform: translateY(-2px);
}

.btn-action-rsvp-jump {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(76, 104, 65, 0.3);
}

.btn-action-rsvp-jump:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.rsvp-form-card {
    background: var(--bg-parchment);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 35px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    max-width: 780px;
    margin: 0 auto;
}

.rsvp-form-header {
    text-align: center;
    margin-bottom: 28px;
}

.rsvp-sub-badge {
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.rsvp-main-title {
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 4px 0 8px;
}

.rsvp-intro-note {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.rsvp-form-group {
    margin-bottom: 22px;
}

.rsvp-group-label {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.rsvp-group-label .required {
    color: #ef4444;
}

.rsvp-radio-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rsvp-radio-options-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.rsvp-radio-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid var(--border-gold);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 13.5px;
    transition: all 0.2s;
}

.rsvp-radio-card input {
    accent-color: var(--primary-color);
}

.rsvp-radio-card.active {
    border-color: var(--primary-color);
    background: #f2f6f0;
}

.rsvp-pills-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.pill-option {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid var(--border-gold);
    border-radius: 8px;
    padding: 11px 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pill-option input {
    display: none;
}

.pill-option.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.rsvp-input, .rsvp-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-gold);
    border-radius: 10px;
    background: #fff;
    font-size: 14.5px;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rsvp-input:focus, .rsvp-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 104, 65, 0.15);
}

.btn-rsvp-submit {
    width: 100%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 15px 24px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(76, 104, 65, 0.35);
    transition: all 0.25s ease;
}

.btn-rsvp-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.rsvp-feedback-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.rsvp-feedback-msg.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.rsvp-feedback-msg.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ================= 13. SECTION 9: STICKY NOTES WISHES BOARD ================= */
.section-wishes {
    padding: 60px 25px 70px;
    background: #f7f4ec;
    border-top: 1px dashed var(--border-gold);
    border-bottom: 1px dashed var(--border-gold);
}

.wishes-board-wrapper {
    max-width: 1060px;
    margin: 0 auto;
}

.wishes-board-header {
    text-align: center;
    margin-bottom: 45px;
}

.wishes-pre-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.wishes-main-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 6px 0 10px;
}

.wishes-sub-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wishes-sub-divider .divider-line {
    width: 50px;
    height: 1px;
    background: var(--border-gold);
}

.wishes-sub-divider .divider-heart {
    color: #e53e3e;
    font-size: 15px;
}

.wishes-desc {
    font-size: 14.5px;
    color: #64748b;
    max-width: 580px;
    margin: 0 auto;
}

.wishes-pinboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 30px 24px;
    align-items: start;
}

.wish-sticky-note {
    position: relative;
    border-radius: 3px;
    padding: 24px 20px 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: default;
}

.wish-sticky-note:hover {
    transform: translateY(-8px) rotate(0deg) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.washi-tape {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 24px;
    background: rgba(220, 215, 195, 0.7);
    border-left: 2px dashed rgba(255, 255, 255, 0.5);
    border-right: 2px dashed rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 2;
}

.rot-neg-2 { transform: rotate(-2deg); }
.rot-pos-1 { transform: rotate(1.5deg); }
.rot-neg-1 { transform: rotate(-1.2deg); }
.rot-pos-2 { transform: rotate(2.2deg); }
.rot-0     { transform: rotate(0deg); }

.color-cream {
    background: #fffdf5;
    border: 1px solid #f2ead4;
}
.color-cream .washi-tape { background: rgba(235, 222, 185, 0.75); }

.color-sage {
    background: #f4f8f2;
    border: 1px solid #dbe8d8;
}
.color-sage .washi-tape { background: rgba(195, 215, 190, 0.75); }

.color-blush {
    background: #fdf5f6;
    border: 1px solid #f8e1e4;
}
.color-blush .washi-tape { background: rgba(235, 205, 210, 0.75); }

.color-sand {
    background: #f9f5ed;
    border: 1px solid #ece2d0;
}
.color-sand .washi-tape { background: rgba(225, 215, 198, 0.75); }

.note-inner {
    display: flex;
    flex-direction: column;
}

.note-author-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.author-avatar-initial {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(76, 104, 65, 0.25);
    flex-shrink: 0;
}

.author-meta {
    flex-grow: 1;
}

.author-name {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 2px;
}

.author-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(76, 104, 65, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.note-message-content {
    font-family: var(--font-serif);
    font-size: 14.5px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 14px;
    word-break: break-word;
}

.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #94a3b8;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.note-heart-icon {
    font-size: 14px;
}

/* ================= 14. SECTION 10: COUNTDOWN & FOOTER ================= */
.section-countdown {
    padding: 0;
    position: relative;
    background: #2b3327;
    color: #fff;
    text-align: center;
}

.countdown-card-wrapper {
    position: relative;
    width: 100%;
    min-height: 520px;
    overflow: hidden;
}

.countdown-bg-img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    filter: brightness(0.65);
}

.countdown-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    z-index: 2;
}

.countdown-pre-title {
    font-family: var(--font-script);
    font-size: 52px;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.countdown-sub-title {
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 700;
    text-transform: uppercase;
    color: #e2e8f0;
    margin-bottom: 30px;
}

.countdown-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.countdown-unit {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    width: 75px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.unit-val {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.unit-lbl {
    font-family: var(--font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cbd5e1;
}

.countdown-separator {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.countdown-thankyou-text {
    font-size: 14.5px;
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto 16px;
    color: #f1f5f9;
}

.countdown-sign-script {
    font-family: var(--font-script);
    font-size: 42px;
    color: #fff;
}

.wedding-footer {
    background: #1c2219;
    padding: 28px 20px;
    text-align: center;
}

.footer-brand-title {
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
}

.footer-heart-line {
    font-size: 13px;
    color: #64748b;
}

/* ================= 15. MODAL POPUPS ================= */
.wedding-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wedding-modal.is-active {
    display: flex;
    animation: fadeInModal 0.25s ease-out;
}

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

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: popUpModal 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUpModal {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-banner-img {
    width: 100%;
    height: 190px;
    overflow: hidden;
    position: relative;
}

.modal-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-banking-header {
    text-align: center;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 15px;
    margin-bottom: 4px;
}

.modal-desc {
    font-size: 13.5px;
    color: #64748b;
    padding: 0 20px;
    margin-bottom: 16px;
}

.banking-tabs-nav {
    display: flex;
    border-bottom: 1.5px solid var(--border-soft);
    margin: 0 20px 20px;
}

.banking-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    padding: 11px 8px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.banking-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.banking-tabs-body {
    padding: 0 20px 26px;
}

.banking-card-pane {
    display: none;
    text-align: center;
}

.banking-card-pane.active {
    display: block;
}

.bank-qr-box {
    width: 160px;
    height: 160px;
    margin: 0 auto 18px;
    padding: 8px;
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.bank-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bank-info-box {
    background: var(--bg-parchment);
    border-radius: 10px;
    padding: 15px 18px;
    text-align: left;
    border: 1px solid var(--border-soft);
}

.bank-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 8px;
}

.bank-info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: #64748b;
}

.info-value {
    color: #1e293b;
}

.stk-row {
    padding-top: 10px;
    border-top: 1px dashed var(--border-gold);
}

.stk-text {
    font-size: 16px;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.btn-copy-stk {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-stk:hover {
    background: var(--primary-dark);
}

/* Modal RSVP Success */
.modal-success-banner {
    width: 100%;
    height: 180px;
}

.modal-success-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-success-body {
    padding: 26px 20px;
    text-align: center;
}

.modal-success-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.success-title {
    font-family: var(--font-script);
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.success-p1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.success-p2 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 22px;
}

.btn-close-success {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 11px 36px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
}

/* Modal Lightbox */
.modal-lightbox-content {
    background: transparent;
    box-shadow: none;
    max-width: 90vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-holder {
    max-width: 85vw;
    max-height: 85vh;
}

.lightbox-image-holder img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-arrow {
    background: rgba(255, 255, 255, 0.75);
    color: #333;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }


/* ================================================================
   16. DESKTOP EXPANSION LAYOUT (Bao quát to ra trên máy tính)
   ================================================================ */
@media (min-width: 768px) {
    .timeline-events-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .rsvp-action-buttons-box {
        flex-direction: row;
    }

    .btn-action-gift, .btn-action-rsvp-jump {
        flex: 1;
    }
}

@media (min-width: 992px) {
    .section-hero {
        padding: 55px 40px 45px;
    }

    .hero-arch-container {
        width: 380px;
        height: 520px;
    }

    .hero-photo-wrapper {
        border-radius: 28px;
    }

    .couple-calligraphy-name {
        font-size: 68px;
    }

    .couple-ampersand-wrap {
        width: 36px;
        height: 36px;
    }

    /* Couple profiles side by side */
    .section-couple {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 50px;
        padding: 70px 40px;
    }

    .couple-profile-card {
        margin-bottom: 0;
        flex: 1;
        max-width: 320px;
    }

    .profile-photo-arch {
        width: 225px;
        height: 295px;
        border-radius: 24px;
    }

    .arch-mask {
        border-radius: 18px;
    }

    .couple-divider {
        width: 100px;
        margin: 0;
        transform: rotate(90deg);
    }

    /* Love Story 2-Column Grid on Desktop */
    .story-container {
        padding: 55px 50px;
    }

    .story-content-grid {
        display: grid;
        grid-template-columns: 330px 1fr;
        gap: 50px;
        align-items: center;
        text-align: left;
    }

    .story-header {
        text-align: left;
    }

    .story-script-title {
        font-size: 50px;
    }

    .story-polaroid-box {
        width: 250px;
        height: 295px;
        margin: 0 auto;
    }

    .story-branch-decor {
        margin: 20px auto 0;
    }

    /* Invitation Card */
    .invitation-card-box {
        padding: 60px 50px;
    }

    .invitation-names-calligraphy {
        font-size: 56px;
    }

    .date-center-number .big-num {
        font-size: 84px;
        padding: 0 24px;
    }

    /* Timeline & Dress Code */
    .timeline-photo-banner {
        max-width: 420px;
    }

    .timeline-arch-mask {
        height: 480px;
        border-radius: 28px;
    }

    /* Album Gallery */
    .gallery-main-viewport {
        height: 540px;
    }

    .gallery-thumb-item {
        width: 85px;
        height: 85px;
    }

    /* RSVP Form */
    .rsvp-form-card {
        padding: 45px 40px;
    }

    .rsvp-form-row-2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* Wishes Board 3 columns */
    .wishes-pinboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px 26px;
    }

    /* Countdown */
    .countdown-unit {
        width: 90px;
        padding: 14px 6px;
    }

    .unit-val {
        font-size: 38px;
    }

    .unit-lbl {
        font-size: 12px;
    }

    .countdown-pre-title {
        font-size: 64px;
    }
}

/* ================= 0. WEDDING ENVELOPE OPENING OVERLAY ================= */
body.envelope-active {
    overflow: hidden !important;
    height: 100vh !important;
}

.wedding-envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: radial-gradient(circle at 50% 40%, #fcfbf7 0%, #f3ede2 60%, #e2d6c3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1200px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.75s;
}

.wedding-envelope-overlay.is-revealed {
    opacity: 0;
    transform: scale(1.06);
    pointer-events: none;
}

.wedding-envelope-overlay.is-hidden {
    display: none !important;
}

/* Ambient glow & Floating particles */
.envelope-ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(222, 204, 172, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.envelope-floating-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.envelope-floating-particles .particle {
    position: absolute;
    font-size: 18px;
    opacity: 0.6;
    animation: floatDrift 8s infinite linear;
}

.envelope-floating-particles .p1 { top: 12%; left: 15%; animation-duration: 9s; animation-delay: 0s; }
.envelope-floating-particles .p2 { top: 25%; right: 18%; animation-duration: 7s; animation-delay: 1.5s; font-size: 14px; }
.envelope-floating-particles .p3 { bottom: 20%; left: 12%; animation-duration: 11s; animation-delay: 2s; }
.envelope-floating-particles .p4 { bottom: 15%; right: 15%; animation-duration: 8s; animation-delay: 3s; font-size: 14px; }
.envelope-floating-particles .p5 { top: 8%; right: 35%; animation-duration: 10s; animation-delay: 4s; }

@keyframes floatDrift {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(15deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Envelope Modal Wrapper */
.envelope-modal-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* 3D Realistic Envelope */
.envelope-card-outer {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 255px;
    perspective: 1200px;
    cursor: pointer;
    user-select: none;
    filter: drop-shadow(0 22px 35px rgba(58, 45, 30, 0.24));
    transition: transform 0.35s ease;
}

.envelope-card-outer:hover {
    transform: translateY(-4px) scale(1.015);
}

/* Interior pocket view */
.envelope-pocket-back {
    position: absolute;
    inset: 0;
    background: #e6dac8;
    border-radius: 8px;
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

/* The Letter/Card inside that slides up */
.envelope-invitation-card {
    position: absolute;
    width: 90%;
    left: 5%;
    bottom: 12px;
    height: 230px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    text-align: center;
    border: 1px solid #d5c8b7;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.75s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.card-border-ornament {
    width: 100%;
    height: 100%;
    border: 1px solid #dcd1c0;
    outline: 1px solid #e8dfd2;
    outline-offset: -5px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #faf8f5;
}

.card-tag {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #8c7d67;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.card-couple-names {
    font-family: var(--font-script);
    font-size: 38px;
    color: #2e4735;
    line-height: 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2px;
}

.card-couple-names .card-amp {
    font-size: 26px;
    color: #b59b71;
    font-family: var(--font-serif);
    font-style: italic;
}

.card-botanical-line {
    font-size: 13px;
    color: #b89f76;
    margin: 2px 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-botanical-line .heart-symbol {
    font-size: 15px;
    color: #a84242;
}

.card-greeting-text {
    font-family: var(--font-serif);
    font-size: 12px;
    font-style: italic;
    color: #55604e;
    line-height: 1.4;
    margin-bottom: 6px;
}

.card-date-badge {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    color: #6a573e;
    letter-spacing: 1.5px;
    padding: 3px 14px;
    background: #ffffff;
    border: 1px solid #ded5c6;
    border-radius: 12px;
}

/* Front Envelope Pocket (Left, Right, Bottom folds) */
.envelope-pocket-front {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    clip-path: polygon(0% 40%, 50% 68%, 100% 40%, 100% 100%, 0% 100%);
    background: linear-gradient(180deg, #faf5ed 0%, #ede3d3 100%);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
}

.envelope-pocket-front::after {
    content: '';
    position: absolute;
    inset: 0;
    border-bottom: 2px solid #dfd1be;
    border-left: 1px solid #dfd1be;
    border-right: 1px solid #dfd1be;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Top Flap (Triangular flap that flips open 180deg) */
.envelope-top-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 140px;
    transform-origin: top center;
    z-index: 4;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}

.flap-triangle {
    width: 100%;
    height: 100%;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
    background: linear-gradient(180deg, #f5eee2 0%, #e8dcce 100%);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

/* Wax Seal Button on top of flap tip */
.envelope-wax-seal {
    position: absolute;
    top: 112px;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.35s ease, opacity 0.35s ease;
    animation: sealPulse 2.4s infinite ease-in-out;
}

.envelope-wax-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(120, 35, 35, 0.4));
}

.envelope-wax-seal .seal-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
    pointer-events: none;
}

@keyframes sealPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.08);
    }
}

/* Action Button */
.envelope-open-action {
    margin-top: 28px;
    text-align: center;
}

.btn-open-envelope {
    position: relative;
    background: linear-gradient(135deg, #4c6841 0%, #354d2e 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 13px 36px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(53, 77, 46, 0.35);
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-open-envelope:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(53, 77, 46, 0.45);
    background: linear-gradient(135deg, #57774b 0%, #3d5835 100%);
}

.btn-open-sparkle {
    font-size: 16px;
    animation: sparkleGlow 1.8s infinite ease-in-out;
}

@keyframes sparkleGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.25); }
}

.envelope-open-hint {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #7b6f60;
    margin-top: 10px;
    letter-spacing: 0.3px;
}

/* Opening Animations State */
.wedding-envelope-overlay.is-opening .envelope-wax-seal {
    transform: translateX(-50%) scale(0.2);
    opacity: 0;
    pointer-events: none;
}

.wedding-envelope-overlay.is-opening .envelope-top-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.wedding-envelope-overlay.is-opening .envelope-invitation-card {
    transform: translateY(-90px);
    z-index: 6;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .envelope-card-outer {
        max-width: 320px;
        height: 220px;
    }

    .envelope-invitation-card {
        height: 195px;
        padding: 12px 14px;
    }

    .card-couple-names {
        font-size: 28px;
    }

    .card-couple-names .card-amp {
        font-size: 20px;
    }

    .card-greeting-text {
        font-size: 11px;
    }

    .envelope-top-flap {
        height: 118px;
    }

    .envelope-wax-seal {
        top: 94px;
        width: 58px;
        height: 58px;
    }

    .wedding-envelope-overlay.is-opening .envelope-invitation-card {
        transform: translateY(-70px);
    }

    .btn-open-envelope {
        padding: 12px 28px;
        font-size: 14px;
    }
}
