/* --- Global & Variables (Cinematic Theme) --- */
:root {
    --color-primary: #FFD700;   /* Gold */
    --color-secondary: #0A192F; /* Deep Navy/Space Blue */
    --color-text: #E6E6FA;      /* Lavender/Off-white */
    --color-glow: #F0F8FF;      /* White-blue glow */
    --font-cinematic: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-secondary);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from 3D transforms */
}

/* --- 3D Environment Setup --- */
#wrapper-3d {
    /* Critical for establishing a 3D context for the whole site */
    perspective: 1000px; 
    transform-style: preserve-3d;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header and 3D Navigation --- */
#main-header {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-3d {
    font-family: var(--font-cinematic);
    font-size: 1.8rem;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

nav ul {
    list-style: none;
    display: flex;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    margin-left: 30px;
    padding: 8px 12px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Setup for 3D hover effect */
    transform-style: preserve-3d;
    display: inline-block;
}

.nav-link:hover {
    color: var(--color-primary);
    text-shadow: 0 0 15px var(--color-primary);
    
    /* 3D Depth/Rotation Effect */
    transform: rotateX(15deg) translateZ(10px);
}

/* --- General Section Styling --- */
.cinematic-section {
    padding: 100px 0;
    text-align: center;
    position: relative; /* Context for children positioning */
    overflow: hidden;
}

.cinematic-container {
    transform-style: preserve-3d;
    perspective: 800px;
}

.title-3d {
    font-family: var(--font-cinematic);
    font-size: 2.5rem;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 2rem;
    
    /* Initial 3D positioning */
    transform: translateZ(-50px);
    opacity: 0;
}

/* Keyframe for initial section title reveal */
@keyframes reveal {
    from { opacity: 0; transform: translateZ(-100px) translateY(50px); }
    to { opacity: 1; transform: translateZ(0) translateY(0); }
}

.reveal-effect {
    animation: reveal 1s ease-out forwards;
}

.subtitle-3d {
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 3rem;
    transform: translateZ(10px);
}

/* --- Home Section (Cinematic Text Reveal) --- */
#home {
    background: radial-gradient(circle at center, rgba(10, 25, 47, 0.8) 0%, var(--color-secondary) 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Main Groom Name Title Effect (Layered/Extruded Text) */
.groom-name-3d {
    font-family: var(--font-cinematic);
    font-size: 5vw; /* Responsive font size */
    text-align: center;
    position: relative;
    color: transparent; /* Hide original text */
    margin-bottom: 40px;
}

/* 3D Text Layering / Extrusion effect */
.groom-name-3d::before, .groom-name-3d::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    text-shadow: 
        1px 1px 0 var(--color-secondary), 
        2px 2px 0 var(--color-secondary), 
        3px 3px 0 var(--color-secondary),
        4px 4px 0 var(--color-primary); /* Gold Extrusion */
    
    /* Animation for the reveal */
    animation: text-reveal 2s ease-out forwards;
    opacity: 0;
}

.groom-name-3d::before {
    color: var(--color-primary);
    z-index: 10;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.5); /* Inner Glow */
    animation-delay: 0.5s;
}

.groom-name-3d::after {
    color: var(--color-text);
    z-index: 5;
    text-shadow: 
        0 0 5px rgba(230, 230, 250, 0.5);
    animation-delay: 0s;
}

@keyframes text-reveal {
    0% { opacity: 0; transform: scale(1.5) translateY(-50px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}


/* Bio Data Grid (Slightly Raised) */
.bio-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 40px auto;
    
    /* Set up 3D perspective for the grid */
    transform: rotateX(10deg) translateZ(50px);
    transition: transform 0.5s ease;
}

.bio-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 20px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    
    /* 3D hover/pop effect */
    transform: translateZ(0);
    transition: all 0.4s ease;
}

.bio-card:hover {
    transform: translateZ(20px) scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.bio-card::before {
    content: attr(data-detail);
    display: block;
    color: var(--color-primary);
    font-family: var(--font-cinematic);
    font-size: 0.8rem;
    margin-bottom: 5px;
    opacity: 0.7;
}

.full-width-card {
    grid-column: 1 / -1;
    font-size: 1rem;
}

/* Starfield Background Effect (Subtle Motion) */
.starfield-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, var(--color-glow), rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 40px 70px, var(--color-glow), rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 50px 100px, var(--color-glow), rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 100px 150px, var(--color-glow), rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: star-move 60s linear infinite;
    opacity: 0.1;
    z-index: -1;
}

@keyframes star-move {
    from { background-position: 0 0; }
    to { background-position: 200px 200px; }
}

/* --- Visitor Greeting Section --- */
.greeting-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    border: 2px solid var(--color-primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    transform: translateZ(30px) rotateX(5deg);
}

.greeting-message-3d {
    font-family: var(--font-cinematic);
    font-size: 2rem;
    color: var(--color-glow);
    text-shadow: 0 0 10px var(--color-primary);
    margin-bottom: 10px;
    
    /* Animation for the greeting text */
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    from { text-shadow: 0 0 5px var(--color-primary); opacity: 0.8; }
    to { text-shadow: 0 0 20px var(--color-primary); opacity: 1; }
}

.location-detail {
    font-size: 0.9rem;
    color: var(--color-text);
}

/* --- About Me Section (Parallax) --- */
.about-section {
    background-color: var(--color-secondary);
}

.about-text-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-paragraph {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 5px solid var(--color-primary);
    border-radius: 3px;
    font-size: 1.1rem;
    
    /* Base for Parallax/Scroll effect */
    transition: transform 0.1s linear; 
}

/* ... [Previous CSS code remains here] ... */

/* ... (Previous CSS code up to the Photo Gallery Section) ... */

/* --- Photo Gallery Section (Horizontal Slider Setup) --- */

.slider-container {
    /* Ensures the slider stays within the main container */
    max-width: 100%;
    margin: 50px auto 20px;
    overflow: hidden; /* Hide the scrollbar, we will use JS/CSS for scrolling */
}

.photo-grid-3d {
    /* Removed the old 'grid' display */
    display: flex; /* Use flexbox for horizontal layout */
    padding: 0;
    gap: 30px;
    
    /* Disable the 3D rotation for the horizontal view to simplify */
    transform: perspective(0) rotateX(0deg); 
    
    /* Ensure all items are on one line */
    flex-wrap: nowrap;
    
    /* Key for smooth sliding: enables snap points */
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    scroll-behavior: smooth;
    
    /* Hide the default scrollbar */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Hide Webkit scrollbar */
.photo-grid-3d::-webkit-scrollbar {
    display: none;
}

/* Each slide/set of images */
.gallery-card {
    /* Calculate width for 5 images plus 4 gaps, divided by 5 */
    /* This ensures 5 images are visible on one "slide" */
    flex: 0 0 calc((100% / 5) - 24px); /* 24px for 4 gaps of 30px divided by 5 images */
    
    height: 300px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 3px solid var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    /* Snap point for clean sliding */
    scroll-snap-align: start;
    
    /* Keep a subtle transform effect */
    transform: translateZ(0); 
    transition: all 0.5s ease;
}

/* Hover effect remains */
.gallery-card:hover {
    transform: translateZ(50px) scale(1.05);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.7);
    z-index: 10;
}

/* --- Pagination Dots Styling --- */
.slider-pagination-dots {
    text-align: center;
    margin-top: 30px;
}

.dot {
    display: inline-block;
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    border: 1px solid var(--color-primary);
}

.dot.active {
    background-color: var(--color-primary);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--color-primary);
}


/* --- Mobile Responsiveness (Adjusted for 2 images per slide) --- */
@media (max-width: 768px) {
    /* ... (Other mobile styles remain) ... */

    .photo-grid-3d {
        gap: 15px; /* Reduce gap on mobile */
    }
    
    /* Show only 2 images per slide on mobile */
    .gallery-card {
        flex: 0 0 calc((100% / 2) - 7.5px); /* (100% / 2) - (1 gap of 15px / 2 images) */
    }

    /* Remove 3D transform on hover for better touch compatibility */
    .gallery-card:hover {
         transform: scale(1.05); 
    }
}

/* NEW: Scrollable Gallery Class */
.scrollable-gallery {
    /* Allow the grid to expand vertically and be scrollable within the section */
    height: auto; 
    max-height: 1000px; /* Set a maximum height to enable scrolling */
    overflow-y: scroll; /* Enable vertical scrolling */
    padding-right: 15px; /* Space for the scrollbar */
    border: 1px solid rgba(255, 215, 0, 0.1); /* Subtle border for container */
    
    /* Custom Scrollbar Styling (Webkit only, for cinematic feel) */
    scrollbar-color: var(--color-primary) var(--color-secondary);
    scrollbar-width: thin;
}

/* Webkit Scrollbar Customization */
.scrollable-gallery::-webkit-scrollbar {
    width: 8px;
}

.scrollable-gallery::-webkit-scrollbar-track {
    background: var(--color-secondary);
}

.scrollable-gallery::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 10px;
    border: 2px solid var(--color-secondary);
}


.gallery-card {
    /* ... [Rest of gallery-card styles remain here] ... */
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 3px solid var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    /* Individual 3D Transform */
    transform: rotateY(5deg) translateZ(0);
    transition: all 0.5s ease;
}
/* ... [Rest of CSS code remains here] ... */
* Applying unique rotation for visual variety */
.gallery-card:nth-child(even) {
    transform: rotateY(-5deg) translateZ(0);
}

.gallery-card:hover {
    transform: rotateY(0deg) translateZ(50px) scale(1.1);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.7);
    z-index: 10;
}

/* --- 3D Lightbox/Modal Styles --- */
.modal-3d {
    display: none; 
    position: fixed; 
    z-index: 3000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Deeper dark background */
    backdrop-filter: blur(8px);
    perspective: 1000px; /* New perspective context for the modal */
    overflow: auto;
}

.modal-content-3d {
    margin: 5% auto; 
    display: block;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    border: 5px solid var(--color-primary);
    
    /* 3D Zoom and Initial Position */
    transform: scale(0.1) rotateY(180deg) translateZ(500px);
    animation: zoom-in-3d 0.8s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes zoom-in-3d {
    to { transform: scale(1) rotateY(0deg) translateZ(0); }
}

.close-btn-3d {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--color-glow);
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    text-shadow: 0 0 10px var(--color-primary);
    transform: translateZ(100px); /* Bring close to viewer */
}

.close-btn-3d:hover,
.close-btn-3d:focus {
    color: var(--color-primary);
    transform: translateZ(120px) scale(1.1);
}

/* --- Footer --- */
footer {
    background-color: var(--color-secondary);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    transform: translateZ(0);
}

.footer-divider-glow {
    height: 2px;
    width: 80%;
    margin: 0 auto 15px;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    box-shadow: 0 0 15px var(--color-primary);
}

.thank-you-glow {
    color: var(--color-primary);
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    
    #main-header .container {
        flex-direction: column;
    }

    nav ul {
        margin-top: 15px;
        justify-content: center;
    }
    
    .logo-3d {
        font-size: 1.4rem;
    }

    .groom-name-3d {
        font-size: 10vw; /* Larger on mobile */
    }

    .bio-data-grid {
        grid-template-columns: 1fr;
        transform: none; /* Reduce 3D effect on small screens for readability */
    }
    
    .greeting-box {
        transform: none;
    }

    .photo-grid-3d {
        grid-template-columns: 1fr;
        transform: none;
    }

    .gallery-card, .gallery-card:nth-child(even) {
        transform: none; /* Remove complex 3D rotation on mobile */
        height: 200px;
    }
    
    .gallery-card:hover {
         transform: scale(1.05); /* Simpler hover effect */
    }

    .modal-content-3d {
        animation: none; /* Remove complex 3D animation */
        transform: scale(1);
    }
}
/* === Custom Groom Cursor === */
/* Replace 'images/groom-cursor.png' with your actual icon path */
body, a, .bio-card, .nav-link {
    cursor: url('../images/groom-cursor.png')8 8, auto;
}

/* Optional: change cursor when hovering specific elements */
.bio-card:hover, .nav-link:hover {
    cursor: url('../images/groom-cursor-hover.png') 8 8, pointer;
}
