/* CSS Reset & Variables */
:root {
    --primary-color: #ae8f7a;
    --primary-dark: #8b6e5b;
    --secondary-color: #fdf9f6;
    --text-dark: #2e2e2e;
    --text-light: #6c757d;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --font-heading: 'Great Vibes', cursive;
    --font-body: 'Montserrat', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, .title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 400;
}

h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
}

.text-body {
    font-size: 0.9rem;
    color: var(--text-light);
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 500px; /* Mobile first constrained width for invitation feel */
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.w-100 { width: 100%; }

.bg-light { 
    background-color: var(--secondary-color); 
    position: relative;
    z-index: 1;
}

.bg-dark { 
    background-color: var(--dark-bg, #faf5f0); 
    position: relative;
    z-index: 1;
}

/* Background Patterns & Decor (Optional) */
.bg-light::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Subtle dot pattern for light bg */
    background-image: radial-gradient(var(--primary-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-dark::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Subtle diagonal line pattern for dark bg */
    background-image: repeating-linear-gradient(45deg, var(--primary-color) 0, var(--primary-color) 1px, transparent 1px, transparent 15px);
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.ornament-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.floral-divider {
    max-width: 150px;
    height: auto;
}

/* Buttons */
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(174, 143, 122, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(174, 143, 122, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* Floating Controls (Musik & Auto Scroll) */
.floating-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.floating-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-btn:hover {
    transform: scale(1.12);
    background-color: var(--primary-dark);
}

.floating-btn.paused i {
    animation-play-state: paused;
}

.autoscroll-btn.active {
    background-color: var(--primary-color);
}

.autoscroll-btn.active i {
    animation: bounceDown 1.2s infinite;
}

.autoscroll-btn.paused {
    background-color: rgba(60, 60, 60, 0.7);
    color: rgba(255, 255, 255, 0.8);
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Cover Section */
.cover-section {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    /* background-image injected via PHP */
    background-size: cover;
    background-position: center;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: top 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.cover-section.opened {
    top: -100vh;
    opacity: 0;
}

#main-content {
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 1.2s ease;
}

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

.cover-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
}

.cover-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 10vh 20px 30px 20px;
    width: 100%;
}

.cover-content .title {
    font-size: 4rem;
    color: var(--white);
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.cover-content .subtitle {
    letter-spacing: 3px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.guest-info {
    margin: 40px 0;
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.guest-info h3 {
    font-size: 1.5rem;
    margin: 5px 0;
}

.guest-info .note {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Welcome Section */
.bismillah-text {
    font-size: clamp(2rem, 7vw, 3.2rem);
    max-width: 90%;
    color: var(--primary-color);
    margin: 0 auto 20px;
    line-height: 1.3;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Couple Section */
.couple-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-card {
    background: transparent;
}

.photo-frame-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    -webkit-mask-image: url('assets/images/frame1.png');
    mask-image: url('assets/images/frame1.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
    transition: background-color 0.4s ease;
}

.photo-frame {
    width: 155px;
    height: 155px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
    margin: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}
/* Background images for .photo-groom and .photo-bride injected via PHP */

.profile-card .name {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.profile-card .parents {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.ig-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(174, 143, 122, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.3s;
}

.ig-link:hover {
    background: var(--primary-color);
    color: white;
}



.salam-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.and-symbol {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Event Section */
.event-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.event-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.event-time {
    border-top: 1px dashed var(--primary-color);
    border-bottom: 1px dashed var(--primary-color);
    padding: 10px 0;
    margin-bottom: 15px;
}

.event-address {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Countdown */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.cd-item {
    background: var(--primary-color);
    color: white;
    width: 65px;
    height: 75px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(174, 143, 122, 0.3);
}

.cd-item span {
    font-size: 1.5rem;
    font-weight: 600;
}

.cd-item p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1/1;
}

.g-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gallery-item:hover .g-img {
    transform: scale(1.1);
}
/* Gallery background images injected via PHP */

/* Gift Section */
.bank-logo {
    height: 30px;
    margin-bottom: 10px;
}

.bank-title {
    font-size: 1.2rem;
    color: #00a5cf; /* Example color for emoney */
    margin-bottom: 10px;
}

.account-number-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    background: rgba(255,255,255,0.5);
    padding: 10px;
    border-radius: 8px;
}

/* Location Maps Section */
.maps-container {
    width: 100%;
    padding: 15px;
    border-radius: 16px;
    overflow: hidden;
}

.maps-iframe {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.account-number-box h4 {
    letter-spacing: 2px;
    font-size: 1.1rem;
    margin: 0;
}

.btn-copy {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:active {
    transform: scale(0.95);
}

/* RSVP Section */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--glass-border, rgba(0,0,0,0.1));
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--glass-bg, rgba(255,255,255,0.8));
    color: var(--text-dark);
    transition: border-color 0.3s;
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-control option {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Comments */
.comments-section {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.comment-item {
    border-bottom: 1px solid var(--glass-border, #eee);
    padding: 15px 0;
    color: var(--text-dark);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
}

.badge.success { background: #2ecc71; }
.badge.danger { background: #e74c3c; }

.comment-text {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.comment-time {
    font-size: 0.7rem;
    color: var(--text-dark);
    opacity: 0.6;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.btn-report-spam {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-report-spam:hover {
    opacity: 1;
    color: #c0392b;
    text-decoration: underline;
    transform: scale(1.05);
}

/* Scrollbar for comments */
.comments-section::-webkit-scrollbar {
    width: 4px;
}
.comments-section::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.comments-section::-webkit-scrollbar-thumb {
    background: var(--primary-color); 
    border-radius: 4px;
}

/* Footer */
footer {
    padding: 40px 20px 20px;
    background-color: var(--primary-dark);
    color: white;
}

footer p {
    font-size: 0.8rem;
    opacity: 0.9;
}

footer .title {
    color: white;
    font-size: 2.5rem;
}

footer .credit {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Timeline Story Section */
.timeline {
    position: relative;
    max-width: 100%;
    margin: 40px auto 0;
    text-align: left;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
    opacity: 0.5;
}

.timeline-item {
    padding: 10px 0 30px 50px;
    position: relative;
    background: inherit;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    left: 12px;
    background-color: var(--primary-color);
    border: 3px solid var(--secondary-color);
    border-radius: 50%;
    z-index: 2;
    top: 15px;
}

.timeline-content {
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.timeline-title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.timeline-content p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-light);
}

/* Custom Animations */

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

/* Desktop override to keep mobile proportions */
@media (min-width: 768px) {
    body {
        background-color: #333;
        display: flex;
        justify-content: center;
    }
    
    .cover-section, #main-content {
        width: 100%;
        max-width: 480px;
        background-color: var(--secondary-color);
        box-shadow: 0 0 30px rgba(0,0,0,0.3);
        margin: 0 auto;
        position: relative;
    }
    
    .cover-section {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cover-section.opened {
        top: -100%;
        opacity: 0;
        pointer-events: none;
    }

    .floating-btn {
        right: calc(50% - 220px); /* Adjust to stay inside the container */
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    object-fit: contain;
    transition: transform 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 25px; right: 25px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    width: 48px; height: 48px;
    line-height: 48px;
    text-align: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
    user-select: none;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10001;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    user-select: none;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

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

@media (max-width: 480px) {
    .lightbox-prev { left: 10px; width: 40px; height: 40px; }
    .lightbox-next { right: 10px; width: 40px; height: 40px; }
    .lightbox-close { top: 15px; right: 15px; width: 40px; height: 40px; line-height: 40px; }
}
