/* 
    Undangan Haflah Takharruj
    Design System & Base Styles 
*/

:root {
    --emerald-green: #042f2e;
    --dark-navy: #020617;
    --champagne-gold: #d4af37;
    --pearl-white: #f8fafc;
    --soft-gold: #fef3c7;
    --metallic-gold: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--dark-navy);
    color: var(--pearl-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Add a subtle geometric pattern body background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("https://images.unsplash.com/photo-1542458428-1bba0c4da7b0?auto=format&fit=crop&q=80&w=1920&h=1080");
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Utilities */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Glassmorphism utility */
.glass-card {
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(212, 175, 55, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2), inset 0 0 30px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.8);
}

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, #d4af37, #fef3c7, #d4af37);
    color: var(--dark-navy);
    border: none;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    display: inline-block;
    text-align: center;
}

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

.btn-outline-gold {
    background: transparent;
    color: var(--champagne-gold);
    border: 1px solid var(--champagne-gold);
    padding: 10px 20px;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-outline-gold:hover {
    background: var(--champagne-gold);
    color: var(--dark-navy);
}

.w-100 {
    width: 100%;
}

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

/* Typography Utilities */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    background-image: var(--metallic-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 3rem;
    position: relative;
    filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.2));
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--metallic-gold);
    border-radius: 3px;
}

.icon-gold {
    color: var(--champagne-gold);
    font-size: 1.5rem;
}

/* Spacers for Layout */
.spacer-blank {
    height: 5vh;
}

@media (min-width: 768px) {
    .spacer-blank {
        height: 10vh;
    }
}

/* =========================================
   ENVELOPE OVERLAY ANIMATION
   ========================================= */

.envelope-hint {
    position: absolute;
    top: 15%;
    text-align: center;
    color: var(--champagne-gold);
    animation: bounce 2s infinite;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.hint-arrow {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.envelope-hint p {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

@keyframes bounce {

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

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--emerald-green), var(--dark-navy));
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

/* Envelope Container */
.envelope-container {
    width: 320px;
    height: 220px;
    position: relative;
    /* Floating Effect */
    animation: float 3s ease-in-out infinite;
    z-index: 2;
    transition: transform 0.6s ease;
    cursor: pointer;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

/* Stop floating when JS adds .open-animation */
.envelope-container.open-animation {
    animation: none;
    transform: scale(1.1);
    /* slight zoom before opening */
}

/* Envelope Construct */
.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.envelope-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #022c22, #064e3b);
    border-radius: 4px;
    border: 1px solid var(--champagne-gold);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
}

/* The Paper Inside */
.envelope-paper {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background-color: var(--pearl-white);
    border: 2px solid var(--champagne-gold);
    border-radius: 4px;
    z-index: 2;
    /* Between back and front */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    /* Initial state */
    transform: translateY(0);
    transition: transform 1s ease-in-out, opacity 0.5s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h20v20H0V0zm10 17L3 10l7-7 7 7-7 7z" fill="%23d4af37" fill-opacity="0.05" fill-rule="evenodd"/%3E');
}

.paper-decoration-top,
.paper-decoration-bottom {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--champagne-gold);
    opacity: 0.5;
}

.paper-decoration-top {
    top: 5px;
    left: 5px;
    border-right: none;
    border-bottom: none;
}

.paper-decoration-bottom {
    bottom: 5px;
    right: 5px;
    border-left: none;
    border-top: none;
}

/* Front Pocket */
.envelope-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 110px solid transparent;
    border-right: 160px solid #064e3b;
    border-bottom: 110px solid #042f2e;
    border-left: 160px solid #064e3b;
    z-index: 3;
    border-radius: 4px;
    pointer-events: none;
    filter: drop-shadow(0 -5px 10px rgba(0, 0, 0, 0.5));
}

/* Add a gold border effect to the front flaps */
.envelope-front::after {
    content: '';
    position: absolute;
    left: -160px;
    top: 0;
    width: 320px;
    height: 110px;
    border-bottom: 1px solid var(--champagne-gold);
    pointer-events: none;
}

/* Envelope Flap (Top Triangle) */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 115px solid #064e3b;
    border-right: 160px solid transparent;
    border-left: 160px solid transparent;
    transform-origin: top;
    transition: transform 0.6s ease-in-out, z-index 0.6s;
    z-index: 4;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.6));
}

/* Wax Seal */
.wax-seal {
    position: absolute;
    top: -30px;
    left: -25px;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #b91c1c, #7f1d1d, #450a0a);
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8);
    border: 2px solid #991b1b;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wax-seal::after {
    content: '★';
    color: #fca5a5;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0.8;
}

/* Paper Content Styling */
.envelope-text {
    font-family: var(--font-body);
    color: var(--dark-navy);
    font-size: 14px;
    margin-bottom: 5px;
}

.envelope-guest {
    font-family: var(--font-heading);
    color: var(--dark-navy);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--champagne-gold);
    padding-bottom: 5px;
}

/* Animation Classes added by JS */

/* 1. Flap opens */
.envelope-container.open-animation .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
    /* Drop behind paper so it doesn't clip */
}

/* 2. Paper pulls out */
.envelope-container.pull-out .envelope-paper {
    transform: translateY(-150px);
    z-index: 5;
    /* Bring above front pocket */
}

/* 3. Transition Screen expands */
.transition-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 20px;
    height: 20px;
    background-color: var(--dark-navy);
    /* matches body bg */
    border-radius: 50%;
    z-index: 100;
    transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
}

.transition-screen.expand {
    transform: translate(-50%, -50%) scale(200);
    /* Enlarge to cover screen */
}

/* Main Content fade in */
.main-content {
    opacity: 0;
    transition: opacity 1s ease;
}

.main-content.visible {
    opacity: 1;
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
    min-height: 100vh;
    padding: 60px 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('https://images.unsplash.com/photo-1542458428-1bba0c4da7b0?auto=format&fit=crop&q=80&w=1920&h=1080');
    /* Islamic pattern bg */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(6, 78, 59, 0.8), rgba(15, 23, 42, 0.95));
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><rect x="24" y="24" width="32" height="32" fill="none" stroke="%23d4af37" stroke-width="1.5" /><rect x="24" y="24" width="32" height="32" fill="none" stroke="%23d4af37" stroke-width="1.5" transform="rotate(45 40 40)" /><path d="M40 0 L40 17 M40 63 L40 80 M0 40 L17 40 M63 40 L80 40" stroke="%23d4af37" stroke-width="1.5" /><path d="M0 0 L22 22 M80 0 L58 22 M80 80 L58 58 M0 80 L22 58" stroke="%23d4af37" stroke-width="1.5" /></svg>');
    background-size: 80px 80px;
    opacity: 0.15;
    z-index: 2;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-kaligrafi {
    width: 440px;
    max-width: 90%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(212, 175, 55, 0.6));
    margin-top: -30px; /* Pull up to reduce empty top gap */
    margin-bottom: 0px; /* Pull closer to ROAD TO */
    display: block;
}

@media (max-width: 767px) {
    .hero-kaligrafi {
        width: 300px;
        margin-top: -20px;
        margin-bottom: -5px;
    }
    .hero-title {
        font-size: clamp(1.8rem, 7.5vw, 2.5rem) !important;
        letter-spacing: 2px !important;
        margin-bottom: 10px !important;
        padding: 0 10px;
    }
    .hero-road-to {
        font-size: 1.1rem !important;
        letter-spacing: 3px !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }
    .hero-road-to::before,
    .hero-road-to::after {
        width: 25px !important;
    }
    .hero-peismataris {
        font-size: 0.95rem !important;
        letter-spacing: 2px !important;
        padding: 0 10px;
    }
    .hero-slogan {
        font-size: 0.9rem !important;
        max-width: 95% !important;
        margin-top: 10px !important;
        padding: 0 15px;
    }
    .hero-pesantren {
        font-size: 1.2rem !important;
        letter-spacing: 1px !important;
    }
}

.footer-logo-animated {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.7)) drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
    animation: logoGlow 3s ease-in-out infinite alternate;
    margin-bottom: 25px;
    display: inline-block;
}

@media (max-width: 767px) {
    .footer-logo-animated {
        width: 110px;
        height: 110px;
        margin-bottom: 15px;
    }
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.25));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.9)) drop-shadow(0 0 40px rgba(212, 175, 55, 0.5));
        transform: scale(1.06);
    }
}

.hero-road-to {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--champagne-gold);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-style: italic;
    width: 100%;
}
.hero-road-to::before,
.hero-road-to::after {
    content: '';
    display: inline-block;
    width: 50px;
    height: 1px;
    background-color: var(--champagne-gold);
    opacity: 0.6;
}

.hero-title {
    font-size: 3.5rem;
    background-image: linear-gradient(
        -45deg, 
        #bf953f 0%, 
        #fcf6ba 20%, 
        #b38728 40%, 
        #ffffff 50%, 
        #b38728 60%, 
        #fcf6ba 80%, 
        #bf953f 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 4px;
    text-transform: uppercase;
    filter: drop-shadow(0 10px 30px rgba(212, 175, 55, 0.4));
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 700;
    animation: shineText 3s linear infinite;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

.hero-peismataris {
    font-family: var(--font-body);
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--soft-gold);
    opacity: 0.9;
}

.hero-slogan {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--pearl-white);
    font-style: italic;
    margin-top: 15px;
    max-width: 90%;
    text-align: center;
    opacity: 0.9;
    letter-spacing: 1px;
}

.hero-pesantren {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 6vw, 2rem);
    color: var(--pearl-white);
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Corner Ornaments */
.corner-ornament {
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cpath d="M0 0h100v2H2v98H0zM15 15h70v2H17v68h-2z" fill="%23d4af37" fill-opacity="0.8"/%3E');
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
    opacity: 0.8;
}

.corner-ornament.top-left {
    top: 20px;
    left: 20px;
}

.corner-ornament.top-right {
    top: 20px;
    right: 20px;
    transform: scaleX(-1);
}

.corner-ornament.bottom-left {
    bottom: 20px;
    left: 20px;
    transform: scaleY(-1);
}

.corner-ornament.bottom-right {
    bottom: 20px;
    right: 20px;
    transform: scale(-1, -1);
}



/* =========================================
   COUNTDOWN SECTION
   ========================================= */

.countdown-section {
    padding: 5rem 0;
    position: relative;
}

.target-date-display {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--champagne-gold);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.countdown-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    flex: 1;
    min-width: 0;
    aspect-ratio: 1 / 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 7.5vw, 2.8rem);
    font-weight: 700;
    color: var(--champagne-gold);
    line-height: 1;
}

.countdown-label {
    font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pearl-white);
    margin-top: 5px;
    opacity: 0.8;
}

/* =========================================
   EVENT DETAILS SECTION
   ========================================= */

.event-details {
    padding: 5rem 0;
    background: linear-gradient(to right, rgba(6, 78, 59, 0.3), rgba(15, 23, 42, 0.5));
}

.event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.event-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .event-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

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

.info-item h3 {
    color: var(--champagne-gold);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.info-item p {
    color: var(--pearl-white);
    font-size: 0.95rem;
}

.address-text {
    opacity: 0.7;
    margin-top: 5px;
    font-size: 0.85rem !important;
}

.event-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(6, 78, 59, 0.4);
}

.map-placeholder {
    padding: 40px;
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    width: 100%;
    margin-bottom: 20px;
}

.map-icon {
    font-size: 3rem;
    color: var(--soft-gold);
    margin-bottom: 15px;
    opacity: 0.5;
}

/* =========================================
   GALLERY SECTION
   ========================================= */

.gallery-section {
    padding: 5rem 0;
    position: relative; /* Tambahkan ini agar overlay tidak berantakan */
}

/* Ganti .gallery.overlay menjadi .gallery-overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(6, 78, 59, 0.3), rgba(15, 23, 42, 0.5));
    z-index: 1;
}

/* Taruh kode ini di bawah .gallery-overlay (Sekitar baris 805) */
.gallery-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Mengambil pola yang sama persis dengan bagian hero */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><rect x="24" y="24" width="32" height="32" fill="none" stroke="%23d4af37" stroke-width="1.5" /><rect x="24" y="24" width="32" height="32" fill="none" stroke="%23d4af37" stroke-width="1.5" transform="rotate(45 40 40)" /><path d="M40 0 L40 17 M40 63 L40 80 M0 40 L17 40 M63 40 L80 40" stroke="%23d4af37" stroke-width="1.5" /><path d="M0 0 L22 22 M80 0 L58 22 M80 80 L58 58 M0 80 L22 58" stroke="%23d4af37" stroke-width="1.5" /></svg>');
    background-size: 80px 80px;
    opacity: 0.15; /* Tingkat kejelasan pola */
    z-index: 1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

/* Tambahkan ini supaya teks judul & grid foto muncul di atas background gelap */
.gallery-section .container {
    position: relative;
    z-index: 2; 
}

.gallery-grid {
    display: grid;
    /* Masonry effect approximated with auto-fit */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    /* Fixed aspect ratio 16:9 */
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.8);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    transition: border-color 0.5s ease;
    border-radius: 8px;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: var(--champagne-gold);
}

/* =========================================
   RSVP & GUESTBOOK SECTION
   ========================================= */

.rsvp-section {
    padding: 5rem 0;
    background: linear-gradient(to top, rgba(6, 78, 59, 0.3), transparent);
}

.rsvp-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 850px) {
    .rsvp-container {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--soft-gold);
    font-weight: 600;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: var(--pearl-white);
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--champagne-gold);
    background: rgba(255, 255, 255, 0.1);
}

.form-group select option {
    background: var(--dark-navy);
    color: var(--pearl-white);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--pearl-white);
}

.wishes-title {
    color: var(--champagne-gold);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}

.wishes-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom scrollbar for wishes */
.wishes-list::-webkit-scrollbar {
    width: 6px;
}

.wishes-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.wishes-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 10px;
}

.wish-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.wish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wish-item h4 {
    color: var(--soft-gold);
    font-size: 1.1rem;
}

.wish-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wish-badge.attending {
    background: rgba(6, 78, 59, 0.6);
    color: #a7f3d0;
    border: 1px solid #34d399;
}

.wish-badge.not-attending {
    background: rgba(153, 27, 27, 0.6);
    color: #fca5a5;
    border: 1px solid #f87171;
}

.wish-text {
    font-size: 0.95rem;
    color: var(--pearl-white);
    opacity: 0.9;
    font-style: italic;
}

/* =========================================
   FOOTER (REDESIGNED)
   ========================================= */

.site-footer {
    position: relative;
    background: var(--dark-navy);
    padding: 2rem 0 0 0;
    margin-top: 0;
}

.footer-wave-container {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    position: relative;
    z-index: 1;
}

/* ========================================= GALLERY MODAL (LIGHTBOX) ========================================= */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80vh;
    border-radius: 12px;
    border: 3px solid var(--soft-gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--pearl-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--soft-gold);
}

.gallery-item img {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery-item img:hover {
    transform: scale(1.03);
}

.footer-wave-svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

@media (min-width: 768px) {
    .footer-wave-svg {
        height: 180px;
    }
}

.footer-content-container {
    background-color: var(--dark-navy);
    position: relative;
    z-index: 2;
    padding-bottom: 3rem;
    max-width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-greeting-section {
    text-align: center;
    margin-top: 0;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.footer-greeting {
    background-image: var(--metallic-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.footer-thanks {
    color: var(--pearl-white);
    opacity: 0.8;
    margin-bottom: 2rem;
}

.footer-main-image {
    width: 100%;
    max-width: 350px; /* Mengecilkan ukuran kartu */
    margin: 0 auto; /* Memastikan kartu berada di tengah kolom */
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--champagne-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.footer-main-image:hover {
    transform: scale(1.02);
}

.footer-main-image img,
.footer-main-image video {
    width: 100%;
    display: block;
    aspect-ratio: 16/9; /* Memastikan proporsi video konsisten */
    object-fit: cover;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 4rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: center;
    }
}

.footer-col-image {
    display: flex;
    justify-content: center; /* Memastikan card video terpusat di kolomnya */
    align-items: flex-start;
}

.footer-col h4 {
    color: var(--pearl-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--soft-gold);
    opacity: 0.8;
    font-size: 0.9rem;
    transition: opacity 0.3s, color 0.3s;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--champagne-gold);
}

.footer-contact-info {
    margin-top: 15px;
    margin-bottom: 15px;
}

.footer-contact-info p {
    font-size: 0.9rem;
    color: var(--soft-gold);
    opacity: 0.8;
    margin-bottom: 8px;
}

.footer-brand-name {
    color: var(--champagne-gold);
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-address {
    font-size: 0.9rem;
    color: var(--soft-gold);
    opacity: 0.8;
    line-height: 1.6;
}

/* Social Buttons */
.footer-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid var(--champagne-gold);
    color: var(--champagne-gold);
    text-transform: uppercase;
    width: fit-content;
}

.btn-social:hover {
    background: var(--champagne-gold);
    color: var(--dark-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* Bottom Bar */
.footer-bottom-bar {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

@media (min-width: 1024px) {
    .footer-bottom-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.footer-copyright-info {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

@media (min-width: 1024px) {
    .footer-copyright-info {
        text-align: left;
    }
}

.footer-copyright-info p {
    margin-bottom: 5px;
}

.footer-flags {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
    color: var(--champagne-gold);
    font-size: 1.5rem;
}

@media (min-width: 1024px) {
    .footer-flags {
        justify-content: flex-start;
    }
}

.footer-rights {
    margin-top: 10px;
}

.footer-partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.footer-logo {
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-pesantren {
    height: 38px;
    filter: brightness(0) saturate(100%) invert(77%) sepia(26%) saturate(1514%) hue-rotate(5deg) brightness(96%) contrast(89%) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-santri {
    height: 55px;
    filter: brightness(0) saturate(100%) invert(77%) sepia(26%) saturate(1514%) hue-rotate(5deg) brightness(96%) contrast(89%) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-steammi {
    height: 25px;
    filter: brightness(0) saturate(100%) invert(77%) sepia(26%) saturate(1514%) hue-rotate(5deg) brightness(96%) contrast(89%) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-angkatan {
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.footer-logo:hover {
    transform: scale(1.08);
}

/* Media Queries */
@media (max-width: 767px) {
    .footer-links-grid {
        gap: 30px;
        margin-bottom: 2.5rem;
    }
    .footer-col {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-social-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    .btn-social {
        width: auto;
        flex: 1;
        max-width: 160px;
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    .footer-greeting {
        font-size: 1.6rem;
    }
    .footer-thanks {
        margin-bottom: 1.5rem;
    }
    .footer-content-container {
        padding-bottom: 6rem !important; /* Spacing extra at the bottom to prevent cutoff */
    }
    .footer-partner-logos {
        margin-top: 25px;
        padding-bottom: 40px; /* Leave extra space below the logos */
    }
}
@media (min-width: 768px) {
    .hero-title {
        font-size: 5.5rem;
    }

    .hero-pesantren {
        font-size: 2.8rem;
    }

    .corner-ornament {
        width: 250px;
        height: 250px;
    }

    .countdown-card {
        width: 100px;
        height: 120px;
    }

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

/* =========================================
   MUSIC TOGGLE BUTTON
   ========================================= */
.music-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--champagne-gold);
    color: var(--champagne-gold);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.music-toggle-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.music-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5);
}

.music-toggle-btn.playing i {
    animation: rotateMusic 3s linear infinite;
}

@keyframes rotateMusic {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   CLASSY QUOTE & FAREWELL SECTION
   ========================================= */
.quotes-section {
    padding: 6rem 0;
    position: relative;
}

.quote-card-elegant {
    text-align: center;
    padding: 60px 50px;
    max-width: 850px;
    margin: 0 auto;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6), 
        inset 0 0 30px rgba(212, 175, 55, 0.03);
    position: relative;
    overflow: hidden;
}

/* Elegant inside thin border */
.quote-card-elegant::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    pointer-events: none;
    border-radius: 12px;
}

.quran-quote-block {
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.arabic-verse {
    font-family: 'Amiri', serif;
    font-size: 2.3rem;
    color: var(--champagne-gold);
    margin-bottom: 22px;
    line-height: 2.2;
    text-shadow: 0 2px 12px rgba(212, 175, 55, 0.2);
}

.translation-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: rgba(248, 250, 252, 0.95);
    margin: 0 auto 15px auto;
    line-height: 1.8;
    max-width: 680px;
    position: relative;
    letter-spacing: 0.2px;
}

.translation-text::before {
    content: '“';
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--champagne-gold);
    opacity: 0.15;
    position: absolute;
    left: -25px;
    top: -20px;
}

.translation-text::after {
    content: '”';
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--champagne-gold);
    opacity: 0.15;
    position: absolute;
    right: -25px;
    bottom: -40px;
}

.surah-reference {
    font-family: var(--font-body);
    color: var(--soft-gold);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 15px;
}

.classy-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 45px 0;
    position: relative;
    z-index: 2;
}

.classy-divider::before,
.classy-divider::after {
    content: '';
    height: 1px;
    width: 80px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
    margin: 0 20px;
}

.classy-divider i {
    color: var(--champagne-gold);
    font-size: 1rem;
    opacity: 0.6;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.farewell-section {
    padding: 7rem 0 3rem 0;
    background-color: var(--dark-navy);
    position: relative;
    overflow: hidden;
}

.farewell-container-new {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 5;
}

/* Precise Relative Container for Overlapping Title */
.farewell-title-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 3rem auto;
    padding: 30px 0;
}

.farewell-the {
    font-family: 'Pinyon Script', cursive;
    font-size: 3.8rem;
    color: var(--soft-gold);
    font-weight: 400 !important;
    position: absolute;
    top: 5px;
    left: 20%;
    transform: rotate(-10deg);
    z-index: 3;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1;
}

.farewell-final {
    font-family: 'Playfair Display', serif;
    font-size: 5.8rem;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 8px;
    line-height: 0.9;
    margin: 0;
    z-index: 1;
    background: linear-gradient(
        -45deg, 
        #bf953f 0%, 
        #fcf6ba 30%, 
        #b38728 70%, 
        #fcf6ba 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.farewell-chapter {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 16px;
    line-height: 1;
    margin: 8px 0 0 0;
    color: var(--pearl-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 2;
    padding-left: 16px; /* offset letter-spacing to center it perfectly */
}

/* Tagline Subtitle */
.farewell-subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.35rem;
    color: var(--champagne-gold);
    opacity: 0.95;
    margin-bottom: 3.5rem;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Body Content */
.farewell-body {
    max-width: 580px;
    margin: 0 auto 3.5rem auto;
    padding: 0 15px;
}

.farewell-body p {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    line-height: 2.3;
    color: var(--pearl-white);
    opacity: 0.95;
    margin-bottom: 2.2rem;
    font-weight: 400;
    letter-spacing: 0.4px;
    text-align: center;
}

.farewell-body em {
    font-family: 'Playfair Display', serif;
    color: var(--champagne-gold);
    font-style: italic;
    font-weight: 600;
}

.farewell-body p:last-child {
    margin-bottom: 0;
}

/* Signature at bottom - completely redesigned for no wrap & perfect lines */
.farewell-signature {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--soft-gold);
    text-transform: uppercase;
    margin-top: 1rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    white-space: nowrap; /* Prevent ugly multi-line text wrapping */
}

.farewell-signature::before,
.farewell-signature::after {
    content: '';
    display: inline-block;
    width: 35px;
    height: 1px;
    background-color: var(--soft-gold);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .quote-card-elegant {
        padding: 40px 25px;
    }
    
    .arabic-verse {
        font-size: 1.8rem;
        line-height: 2.0;
    }
    
    .translation-text {
        font-size: 1.1rem;
    }
    
    .translation-text::before,
    .translation-text::after {
        display: none; /* Hide large quotes on small screen to save space */
    }
    
    .farewell-section {
        padding: 5rem 0 2rem 0;
    }

    /* Precise relative & flex scaling for mobile */
    .farewell-title-lockup {
        max-width: 320px;
        margin-bottom: 1.5rem;
        padding: 15px 0;
        height: auto;
    }

    .farewell-the {
        font-size: 2.6rem;
        left: 22%;
        top: 0px;
    }

    .farewell-final {
        font-size: 3.8rem;
        letter-spacing: 4px;
    }

    .farewell-chapter {
        font-size: 1.9rem;
        letter-spacing: 10px;
        padding-left: 10px;
        margin-top: 5px;
    }

    .farewell-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }

    .farewell-body p {
        font-size: 1rem;
        line-height: 2.0;
        margin-bottom: 1.8rem;
    }
    
    .farewell-signature {
        font-size: 0.8rem;
        letter-spacing: 1.5px;
        gap: 10px;
    }

    .farewell-signature::before,
    .farewell-signature::after {
        width: 20px;
    }
}

/* =========================================
   ATTENDANCE & GUEST BOOK SECTION
   ========================================= */

.attendance-section {
    padding: 5rem 0;
    position: relative;
    z-index: 10;
}

.attendance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

@media (min-width: 992px) {
    .attendance-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.card-header-elegant {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 15px;
}

.card-header-elegant h3 {
    font-size: 1.8rem;
    color: var(--champagne-gold);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.card-header-elegant p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Elegant Form Styling */
.elegant-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

@media (min-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.elegant-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--soft-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.elegant-form input[type="text"],
.elegant-form input[type="password"],
.elegant-form input[type="url"],
.elegant-form select,
.elegant-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: var(--pearl-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.elegant-form input:focus,
.elegant-form select:focus,
.elegant-form textarea:focus {
    outline: none;
    border-color: var(--champagne-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

.elegant-form select option {
    background: var(--dark-navy);
    color: var(--pearl-white);
}

.elegant-form textarea {
    resize: vertical;
}

/* Spinner and loading */
.spinner {
    margin-left: 10px;
    display: inline-block;
}

/* Live Wishes Feed Styling */
.wishes-container {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Custom scrollbar for wishes feed and tables */
.wishes-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.wishes-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 3px;
}

.wishes-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 3px;
}

.wishes-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--champagne-gold);
}

.wish-card {
    background: rgba(15, 23, 42, 0.4);
    border-left: 3px solid var(--champagne-gold);
    border-radius: 0 8px 8px 0;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.wish-card:hover {
    transform: translateX(4px);
    background: rgba(15, 23, 42, 0.5);
}

.wish-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--soft-gold);
    flex-wrap: wrap;
    gap: 5px;
}

.wish-name {
    font-weight: 600;
    color: var(--pearl-white);
    font-size: 0.95rem;
}

.wish-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--champagne-gold);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.wish-text {
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
    color: rgba(248, 250, 252, 0.9);
}

.wishes-loading, .wishes-empty {
    text-align: center;
    padding: 30px 10px;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* =========================================
   FOOTER ADMIN LINK
   ========================================= */

.admin-link {
    color: var(--champagne-gold);
    font-weight: 600;
    transition: color 0.3s ease;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-link:hover {
    color: var(--pearl-white);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* =========================================
   ADMIN DASHBOARD MODAL
   ========================================= */

.admin-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 10000; /* Above all */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px 15px;
    align-items: center;
    justify-content: center;
}

.admin-modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: auto;
    animation: modalSlide 0.4s ease-out;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    padding: 30px !important;
}

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

.admin-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--pearl-white);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.admin-modal-close:hover {
    color: var(--champagne-gold);
}

/* Auth Container */
.admin-auth-container {
    max-width: 420px;
    margin: 20px auto;
    padding: 20px 10px;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-icon {
    font-size: 3.5rem;
    color: var(--champagne-gold);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-error-msg {
    color: #f87171;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dashboard Container */
.admin-dashboard-container {
    padding: 10px 5px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: var(--champagne-gold);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--pearl-white);
    padding: 10px 20px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    opacity: 1;
    color: var(--champagne-gold);
}

.tab-btn.active {
    opacity: 1;
    color: var(--champagne-gold);
    border-bottom-color: var(--champagne-gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--champagne-gold);
    background: rgba(212, 175, 55, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.stat-val {
    font-size: 1.4rem;
    color: var(--pearl-white);
    font-weight: 700;
}

/* Search and Filter Controls */
.search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(212, 175, 55, 0.6);
    z-index: 5;
}

.search-box input {
    padding-left: 40px !important;
}

.search-filter-bar input[type="text"],
.search-filter-bar select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 6px !important;
    color: var(--pearl-white) !important;
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease;
}

.search-filter-bar input[type="text"]:focus,
.search-filter-bar select:focus {
    outline: none;
    border-color: var(--champagne-gold) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
    background: rgba(15, 23, 42, 0.8) !important;
}

.search-filter-bar select option {
    background: var(--dark-navy);
    color: var(--pearl-white);
}

.filter-box {
    min-width: 180px;
}

@media (max-width: 768px) {
    .search-filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    .search-box {
        min-width: 100%;
        width: 100%;
    }
    .filter-box {
        width: 100%;
        min-width: 100%;
    }
}

/* Responsive Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.3);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th, 
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table th {
    background: rgba(2, 6, 23, 0.6);
    color: var(--champagne-gold);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.admin-table tbody tr {
    transition: background 0.2s;
}

.admin-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.admin-table td {
    color: rgba(248, 250, 252, 0.95);
    white-space: nowrap;
}

/* Allow messages to wrap and take up space */
.admin-table td:nth-child(2),
.admin-table td:nth-child(3) {
    white-space: normal;
    min-width: 120px;
}

.admin-table td:nth-child(6) {
    white-space: normal;
    min-width: 200px;
    font-style: italic;
    color: rgba(248, 250, 252, 0.8);
}

.btn-delete-row {
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.btn-delete-row:hover {
    background: rgba(248, 113, 113, 0.1);
    color: #ef4444;
}

/* Settings Form Specifics */
.settings-form {
    max-width: 700px;
}

.settings-section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--champagne-gold);
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding-bottom: 5px;
}

.settings-desc {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.settings-toast {
    color: #34d399;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.3s;
}

.quick-guide-card {
    background: rgba(212, 175, 55, 0.05);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 15px;
    margin-top: 30px;
}

.quick-guide-card h4 {
    color: var(--champagne-gold);
    margin-bottom: 8px;
    font-size: 1rem;
}

.quick-guide-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.85;
}

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

/* Mobile responsive fixes */
@media (max-width: 576px) {
    .admin-modal {
        padding: 15px 10px;
    }
    
    .admin-modal-content {
        padding: 20px 15px !important;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

.btn-danger-outline {
    color: #f87171 !important;
    border-color: #f87171 !important;
}

.btn-danger-outline:hover {
    background: #f87171 !important;
    color: var(--dark-navy) !important;
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4) !important;
}

.show-on-mobile {
    display: none !important;
}

.hide-on-mobile {
    display: block !important;
}

/* Responsive Dashboard Admin Cards for Mobile View */
@media (max-width: 768px) {
    .show-on-mobile {
        display: block !important;
    }
    
    .hide-on-mobile {
        display: none !important;
    }
    
    .admin-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
        max-height: 480px;
        overflow-y: auto;
        padding-right: 8px;
        margin-top: 15px;
    }
    
    .admin-mobile-card {
        background: rgba(15, 23, 42, 0.4);
        border: 1px solid rgba(212, 175, 55, 0.25);
        border-radius: 8px;
        padding: 15px;
        position: relative;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s ease, border-color 0.2s ease;
    }
    
    .admin-mobile-card:hover {
        border-color: var(--champagne-gold);
        transform: translateY(-2px);
    }
    
    .admin-mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 8px;
    }
    
    .admin-mobile-card-no {
        font-family: var(--font-heading);
        color: var(--champagne-gold);
        font-weight: 700;
        font-size: 1.1rem;
    }
    
    .admin-mobile-card-title {
        font-weight: 600;
        color: var(--pearl-white);
        font-size: 0.95rem;
        flex-grow: 1;
        margin-left: 10px;
    }
    
    .admin-mobile-card-body {
        font-size: 0.85rem;
        color: rgba(248, 250, 252, 0.85);
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .admin-mobile-card-body p {
        font-style: italic;
        margin-top: 5px;
        background: rgba(2, 6, 23, 0.3);
        padding: 8px;
        border-radius: 4px;
    }
    
    .admin-mobile-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.75rem;
        color: var(--soft-gold);
        opacity: 0.8;
    }
    
    .admin-mobile-card-actions {
        display: flex;
        gap: 10px;
    }
}
