/* Cover Section (Envelope) */
.cover-section {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
    padding: 20px;
}

.cover-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #fff, #f0f5f9);
    z-index: -1;
}

.cover-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.08);
    max-width: 500px;
    width: 100%;
    padding: 3rem 2rem;
    position: relative;
    z-index: 10;
}

.cover-sub {
    font-size: 0.7rem;
    letter-spacing: 5px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.cover-name {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
}

.btn-open-invitation {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 16px 35px;
    border-radius: 100px;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 15px 35px rgba(91, 143, 185, 0.3);
    transition: 0.4s;
    font-size: 0.9rem;
}

.btn-open-invitation:hover {
    transform: translateY(-5px);
    background: var(--dark);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.cover-section.is-opened { transform: translateY(-100%); }

/* Main Invitation Content */
.main-invitation {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease 0.5s;
    width: 100%;
}

.main-invitation.show { opacity: 1; visibility: visible; }

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: radial-gradient(circle at center, #fff, #f0f5f9);
    position: relative;
    overflow: hidden;
    padding: 100px 20px 60px;
}

.parallax-ornament {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.parallax-ornament.layer-1 { top: 10%; left: 5%; width: 150px; opacity: 0.3; }
.parallax-ornament.layer-2 { bottom: 10%; right: 5%; width: 200px; opacity: 0.3; }
.parallax-ornament.layer-3 { top: 40%; left: 20%; font-size: 3rem; transform: rotate(45deg); }
.parallax-ornament img { width: 100%; }

.hero-box { max-width: 800px; width: 100%; }
.hero-sub { font-size: 0.8rem; font-weight: 600; letter-spacing: 6px; color: var(--primary); display: block; margin-bottom: 2rem; }

.hero-frame {
    width: 190px;
    height: 260px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    z-index: 10;
}

@media (min-width: 768px) {
    .hero-frame {
        width: 280px;
        height: 380px;
    }
}

.hero-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 95px 95px 0 0;
    border: 6px solid var(--white);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    filter: saturate(1.02) contrast(1.02) brightness(1);
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .hero-frame img {
        border-radius: 150px 150px 0 0;
        border-width: 10px;
    }
}

.frame-border {
    position: absolute;
    inset: -12px;
    border: 1.5px solid var(--primary);
    border-radius: 105px 105px 0 0;
    z-index: 1;
    opacity: 0.4;
}

@media (min-width: 768px) {
    .frame-border {
        inset: -15px;
        border-radius: 165px 165px 0 0;
    }
}

.hero-frame:hover .frame-border {
    inset: -25px;
    opacity: 0.5;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 12vw, 6.5rem);
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--primary);
    margin-top: 1rem;
}

.hero-date { font-size: clamp(1rem, 3vw, 1.2rem); font-weight: 500; letter-spacing: 4px; color: var(--text-muted); }

/* Profile/Welcome Section */
.name-display { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: var(--primary); }

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--white);
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-top: 2rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

/* Family Section Signature Heritage */
.family-heritage-card { position: relative; padding-bottom: 40px; }

.family-visual-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.family-arch-shape {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 80%;
    background: linear-gradient(180deg, rgba(91, 143, 185, 0.05) 0%, rgba(240, 245, 249, 0.3) 100%);
    border-radius: 200px 200px 0 0;
    z-index: 1;
    border: 1px solid rgba(91, 143, 185, 0.1);
}

.family-photo-container { position: relative; z-index: 2; filter: drop-shadow(0 30px 60px rgba(0,0,0,0.15)); }
.family-img-premium { width: 100%; max-width: 600px; height: auto; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }

.parent-name-display {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 8vw, 3.2rem);
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1.1;
}

.family-location-footer {
    max-width: 450px;
    background: var(--white);
    border-radius: 30px;
    padding: 20px 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    border: 1px solid rgba(91, 143, 185, 0.1);
    position: relative;
}

.family-location-footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: var(--primary);
    opacity: 0.3;
}

.location-inner { display: flex; align-items: center; justify-content: center; gap: 15px; text-align: left; }
.location-inner i { font-size: 1.5rem; color: var(--primary); }
.location-inner p { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); line-height: 1.5; }

.family-bg-ornament {
    position: absolute;
    top: 50%;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(91, 143, 185, 0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .family-heritage-card { padding-bottom: 20px; }
    .family-arch-shape { border-radius: 120px 120px 0 0; }
    .family-location-footer { padding: 15px 20px; width: 100%; max-width: 400px; margin: 0 auto; }
}

/* Gallery Section */
.gallery-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(5rem, 15vw, 18vw);
    font-weight: 900;
    color: var(--primary);
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
    letter-spacing: clamp(10px, 5vw, 30px);
    font-family: var(--font-cinzel);
    white-space: nowrap;
}

.gallery-leaf { position: absolute; color: var(--primary); opacity: 0.15; font-size: 2rem; z-index: 1; pointer-events: none; animation: leafFloat 8s ease-in-out infinite; }
.leaf-1 { top: 10%; left: 5%; animation-delay: 0s; }
.leaf-2 { bottom: 15%; right: 8%; animation-delay: 2s; font-size: 3rem; }
.leaf-3 { top: 40%; right: 5%; animation-delay: 4s; }

.gallery-premium-masonry { display: flex; flex-wrap: wrap; gap: clamp(10px, 4vw, 30px); justify-content: center; position: relative; z-index: 2; padding-bottom: 50px; }

.art-frame {
    background: #fff;
    padding: 15px 15px 50px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    overflow: visible;
    transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    background-image: linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)), url('https://www.transparenttextures.com/patterns/paper.png');
}

.washi-tape {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 100px;
    height: 35px;
    background: rgba(182, 226, 161, 0.4);
    backdrop-filter: blur(2px);
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tape-blue { background: rgba(91, 143, 185, 0.4); transform: translateX(-50%) rotate(3deg); }

.art-frame:hover { transform: translateY(-20px) rotate(0deg) !important; box-shadow: 0 40px 80px rgba(91, 143, 185, 0.25); z-index: 10; }
.art-frame img { width: 100%; height: auto; display: block; }

.art-overlay {
    position: absolute;
    inset: 0;
    background: rgba(48, 71, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: 0.4s;
    z-index: 6;
}

.art-frame:hover .art-overlay { opacity: 1; }
.frame-rotated-left { transform: rotate(-2deg); }
.frame-rotated-right { transform: rotate(2deg); }

.masonry-item { text-decoration: none !important; display: block; transition: transform 0.5s ease; }
.item-lg { width: clamp(280px, 45%, 550px); }
.item-md { width: clamp(240px, 30%, 420px); }
.item-sm { width: clamp(180px, 20%, 320px); }

@media (max-width: 768px) {
    .masonry-item { width: 100% !important; max-width: 350px; margin: 0 auto 25px !important; transform: none !important; }
    .art-frame { padding: 10px 10px 35px; }
    .washi-tape { width: 80px; height: 30px; top: -10px; }
}

/* Prayer Section */
.bg-fixed-overlay {
    position: relative;
    background: linear-gradient(rgba(48, 71, 94, 0.75), rgba(48, 71, 94, 0.75)), url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media (max-width: 1024px) { .bg-fixed-overlay { background-attachment: scroll; } }

.prayer-text {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-style: italic;
    line-height: 1.6;
    padding: 0 10px;
}

/* Event Section Premium */
.section-title { font-family: var(--font-serif); font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }

.event-master-card {
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.5);
}

.event-visual-side {
    height: 100%;
    min-height: 500px;
    background: url('https://images.unsplash.com/photo-1511795409834-ef04bbd61622?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(48, 71, 94, 0.2), rgba(48, 71, 94, 0.6)); }
.visual-content { position: relative; z-index: 2; }
.event-details-side { background: linear-gradient(135deg, #ffffff 0%, #fcfdfe 100%); }

.date-number-box { text-align: center; background: var(--cream); padding: 15px 25px; border-radius: 25px; min-width: 120px; }
.day-name { font-size: 0.65rem; font-weight: 800; letter-spacing: 2px; color: var(--primary); display: block; }
.date-num { font-family: var(--font-serif); font-size: clamp(2rem, 8vw, 3rem); font-weight: 700; line-height: 1; color: var(--dark); }
.month-year { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); display: block; }
.date-divider { width: 2px; height: 60px; background: var(--primary); opacity: 0.2; }

.info-item .info-icon {
    width: 45px; height: 45px; background: var(--cream); border-radius: 15px;
    display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; flex-shrink: 0;
}

.btn-premium-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    background: var(--dark);
    color: #fff;
    text-decoration: none !important;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 2px;
    box-shadow: 0 20px 40px rgba(48, 71, 94, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-premium-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.btn-premium-action:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(91, 143, 185, 0.3);
    color: #fff;
}

.btn-premium-action:hover::before {
    left: 100%;
}

.minimap-wrapper {
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    border: 8px solid var(--white);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    background: var(--white);
    line-height: 0;
    position: relative;
    transition: 0.5s ease;
}

.minimap-wrapper::after {
    content: 'KLIK UNTUK NAVIGASI';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    pointer-events: none;
}

.minimap-wrapper iframe {
    transition: 0.5s ease;
}

@media (max-width: 768px) {
    .event-master-card { border-radius: 40px; }
    .date-number-box { min-width: 90px; padding: 10px 15px; }
    .event-details-side { padding: 1.5rem !important; } /* Kurangi padding biar map makin lebar */
    
    /* Map & Button Mobile Optimization - HORIZONTAL WITH PADDING */
    .event-details-side { padding: 1.5rem !important; }
    
    .event-map-block {
        margin: 1.5rem 0 0 0; /* Remove negative margins, keep it inside padding */
    }
    
    .minimap-wrapper { 
        border: 2px solid var(--primary); 
        border-radius: 20px; 
        overflow: hidden;
    }
    
    .minimap-wrapper iframe { 
        height: 280px !important; /* Tinggi lebih pendek agar tetap HORIZONTAL di HP */
        width: 100%;
    }
    
    .event-map-block .btn-premium-action {
        width: 100% !important;
        margin: 1rem 0;
        border-radius: 15px;
    }
}

/* Footer */
.footer { padding: clamp(4rem, 10vw, 6rem) 0; }

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    color: var(--primary);
    text-decoration: none !important;
    border: 1px solid rgba(91, 143, 185, 0.3);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    border-color: var(--primary);
}

/* Footer Peningkatan */
.footer-ornament {
    position: absolute;
    width: 250px;
    z-index: 0;
    pointer-events: none;
    filter: sepia(0.5) brightness(1.1);
}

.ornament-left { top: -50px; left: -100px; transform: rotate(15deg); }
.ornament-right { bottom: -50px; right: -100px; transform: rotate(-15deg); }

.decorative-divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.decorative-divider i {
    background: var(--cream);
    padding: 0 10px;
    font-size: 0.8rem;
}

.btn-back-to-top {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.btn-back-to-top i {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(91, 143, 185, 0.2);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-back-to-top span {
    font-size: 0.6rem;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.6;
}

.btn-back-to-top:hover {
    color: var(--primary);
}

.btn-back-to-top:hover i {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.footer-credits {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .footer-credits {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
