@font-face {
    font-family: 'WeddingDay';
    src: url('font/Weddingday.ttf') format('truetype');
}

/* Custom Styles for Wedding Invitation */

/* Core CSS Animations for Cover (Self-Triggered) */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInDown {
    animation: fadeInDown 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Ensure music widget is visible on mobile after invitation opens */
@media (max-width: 767px) {
    #musicToggle {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

@media (min-width: 768px) {
    #musicToggle {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}



/* Couple Section Background (Rotated for Mobile) */
#couple {
    position: relative;
    overflow: hidden;
    background-color: #000;
}

#couple::before {
    content: '';
    position: absolute;
    background-image: var(--couple-bg, none);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: opacity 0.5s ease, background 0.5s ease;
    display: none; /* Hidden by default */
}

#couple.show-before::before {
    display: block;
}

@media (max-width: 767px) {
    #couple.show-before::before {
        display: none; /* Hide main background on mobile */
    }
}

.bg-couple-half {
    background-image: var(--half-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
}


/* Mode Mobile: background responsif tanpa ukuran ekstrim */
@media (max-width: 767px) {
    #couple::before {
        width: 500vh;
        height: 100vw;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
}

/* Mode Desktop: Normal Horizontal */
@media (min-width: 768px) {
    #couple.show-before::before {
        display: block;
    }
    #couple::before {
        inset: 0;
        width: 100%;
        height: 100%;
        transform: rotate(0deg);
        background-attachment: fixed;
    }
}

:root {
    --navy: #000000;
    --gold: #737373;
    /* Muted Gray/Silver */
    --soft: #ffffff;
}

body {
    scroll-behavior: smooth;
}

/* Organic Shapes for Photos (Smooth & Modern) */
.organic-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transition: border-radius 1s ease-in-out;
}

.organic-shape2 {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 70%;
    transition: border-radius 1s ease-in-out;
}

/* Hover effect for shapes */
.organic-shape:hover,
.organic-shape2:hover {
    border-radius: 50% !important;
}



/* Section Card styling */
.section-card {
    border: 1px solid rgba(197, 160, 89, 0.2);
}

/* Custom Scrollbar Global */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.6);
}

::-webkit-scrollbar-thumb {
    background: #F5A623;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #d48a1c;
}

/* Enhanced Scrollbar for Chat/Wishes */
.styling-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.styling-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
}

.styling-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(134, 150, 160, 0.4);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.styling-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(134, 150, 160, 0.7);
}

.styling-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(134, 150, 160, 0.4) transparent;
}

/* Entrance Animation for Hero */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cover h1,
#cover h4,
#cover p,
#cover button {
    animation: fadeInUp 1s ease-out forwards;
}

#cover h4 {
    animation-delay: 0.2s;
}

#cover h1 {
    animation-delay: 0.4s;
}

#cover p {
    animation-delay: 0.6s;
}

#cover button {
    animation-delay: 0.8s;
}

/* Pulse animation for social icons */
.fab:hover {
    transition: transform 0.3s ease;
}

/* --- RESPONSIVE FIXES & FIXED BACKGROUNDS --- */

/* ===== FIXED BACKGROUNDS (STAY EFFECT) FOR ALL DEVICES AND iOS ===== */
.fixed-bg {
    position: relative !important;
    -webkit-clip-path: inset(0) !important;
    clip-path: inset(0) !important;
    background-image: none !important;
    background-color: transparent !important;
    background: transparent !important;
}

.fixed-bg::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: var(--bg-image) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: -2 !important;
    pointer-events: none !important;
    will-change: transform !important;
    transform: translate3d(0, 0, 0) !important; /* Force hardware acceleration */
}

/* Mobile adjustments for specific section backgrounds if needed */
@media (max-width: 768px) {
    #sharedEventWrapper.shared-bg::before {
        background-position: center top !important;
    }
}

/* ===== SHARED EVENT WRAPPER — unified 1 background for Events + Love Story ===== */
#sharedEventWrapper {
    position: relative;
}

#sharedEventWrapper.shared-bg {
    position: relative;
}

/* Ensure child content is above overlay */
#events, #lovestory {
    position: relative;
}
#events > *, #lovestory > * {
    position: relative;
    z-index: 1;
}

/* When same background: both child sections MUST be fully transparent */
#sharedEventWrapper.shared-bg #events,
#sharedEventWrapper.shared-bg #lovestory {
    background-image: none !important;
    background-color: transparent !important;
    background: transparent !important;
}


    /* Adjust font sizes for mobile */
    #greetingHeading {
        font-size: 3.5rem !important;
    }

    #greetingQuote {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }

    #greetingInvitation {
        font-size: 9px !important;
        padding-left: 20px;
        padding-right: 20px;
    }

    #countdown .font-serif {
        font-size: 2rem !important;
    }
    
    #countdown .font-sans {
        font-size: 8px !important;
    }

}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    #greetingHeading {
        font-size: 4.5rem !important;
    }
}

/* Button glow effect and smooth transitions */
button,
.transition-all {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#openInvitation {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    animation: pulse 2s infinite;
}

/* Slideshow Styles for Cover */
.slide-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

#cover {
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

#cover.cover-out {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Gallery Thumbnails Styling */
#carouselThumbnails::-webkit-scrollbar {
    display: none;
}

#carouselThumbnails {
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-top: 19px;
    /* Added padding to prevent active thumb from being cut off */
    padding-bottom: 10px;
}

.thumb-item {
    width: 60px;
    height: 85px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.thumb-item.active {
    opacity: 1;
    border-color: #F5A623;
    transform: translateY(-10px) scale(1.1);
}

.thumb-item:hover {
    opacity: 0.8;
}

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

@media (min-width: 768px) {
    .thumb-item {
        width: 100px;
        height: 140px;
        border-radius: 16px;
    }
}

/* Refined iOS-Style Glassmorphism Modal */
#customModal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#customModal.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: rgba(28, 28, 30, 0.82);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 280px;
    text-align: center;
    transform: scale(1.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#customModal.active .modal-box {
    transform: scale(1);
}

/* For closing animation */
#customModal:not(.active) .modal-box {
    transform: scale(0.9);
}

.modal-icon {
    display: none; /* iOS style normally doesn't use large icons in alerts */
}

.modal-content-wrapper {
    padding: 24px 16px 20px;
}

.modal-title {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.modal-message {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-weight: 400;
}

.modal-btn {
    width: 100%;
    background: transparent;
    border: none;
    border-top: 0.5px solid rgba(255, 255, 255, 0.15);
    padding: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 17px;
    color: #F5A623;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Dynamic Events & Striped Placeholders */
.striped-bg {
    background: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 15px,
        transparent 15px,
        transparent 30px
    );
    border: 1px dashed rgba(245, 166, 35, 0.2);
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    backdrop-filter: blur(4px);
}

.no-data-card {
    opacity: 0.5;
    filter: grayscale(0.5);
    transition: all 0.5s ease;
}

.no-data-card:hover {
    opacity: 0.8;
    filter: grayscale(0.2);
}

/* Modern Toast Notification */
.toast-premium {
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    items-center: center;
    gap: 12px;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    z-index: 10001;
    min-width: 280px;
    max-width: 90vw;
}

.toast-premium.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-premium i {
    font-size: 16px;
}

.toast-success i { color: #4ade80; }
.toast-error i { color: #f87171; }
.toast-warning i { color: #fbbf24; }
.toast-info i { color: #60a5fa; }

/* Custom Unna Font Styles */
.unna-regular {
  font-family: "Unna", serif;
  font-weight: 400;
  font-style: normal;
}

.unna-bold {
  font-family: "Unna", serif;
  font-weight: 700;
  font-style: normal;
}

.unna-regular-italic {
  font-family: "Unna", serif;
  font-weight: 400;
  font-style: italic;
}

.unna-bold-italic {
  font-family: "Unna", serif;
  font-weight: 700;
  font-style: italic;
}