/* Google Fonts Import in HTML, using variables here */

:root {
    /* Colors */
    --color-primary: #789278;
    /* Eucalyptus Green */
    --color-secondary: #728872;
    /* Deep Forest Green */
    --color-gold: #D4AF37;
    /* Metallic Gold */
    --color-bg: #F9F7F2;
    /* Soft Cream */
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;

    /* Fonts */
    --font-heading: "Pacifico", cursive;
    --font-body: "Lato", sans-serif;

    /* Spacing */
    --spacing-container: 1200px;
    --spacing-section: 5rem 1rem;

    /* Transitions */
    --transition-standard: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo,
.eyebrow {
    font-family: var(--font-heading);
    color: var(--color-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-standard);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--spacing-section);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.section-header .subtitle {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-gold);
    font-size: 0.9rem;
    font-weight: 700;
}

/* Animations */
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible,
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    transform: translateX(30px);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}


/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: var(--transition-standard);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-gold);
    transition: var(--transition-standard);
}

.nav-link:hover {
    color: var(--color-secondary);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-rsvp {
    background-color: var(--color-secondary);
    color: var(--color-white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

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

.btn-rsvp::after {
    display: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-secondary);
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: url('../assets/images/hero_bg.png') no-repeat center center/cover;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(0, 0, 0, 0.3); */
    /* Darken bg image slightly */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;

    & .raise {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    & .address {
        color: #333333;
    }

}

.eyebrow {
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.names {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); */
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 1.5rem 0;
    color: var(--color-gold);
}

.line {
    height: 1px;
    width: 60px;
    background-color: var(--color-gold);
}

.hero .date {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.hero .location {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    background-color: #A2A899;
    padding: 1rem;
    border-radius: 25px;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-box span:first-child {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
}

.time-box .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--color-white);
    font-size: 1.5rem;
}

@keyframes bounce {

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

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}


/* Story Section */
.story {
    background-color: var(--color-white);
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.story-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #eee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ccc;
    font-size: 3rem;
    border: 1px solid #ddd;
}

.img-placeholder span {
    font-size: 1rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Details Section */
.details {
    background-color: var(--color-bg);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.detail-card {
    background: var(--color-white);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    border-top: 3px solid var(--color-gold);
}

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

.detail-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.detail-card p {
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.detail-card .time {
    font-weight: 700;
    color: var(--color-secondary);
}

.map-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background-color: var(--color-primary);
    color: var(--color-white);

}

.map-btn {
    display: block;
    margin-top: 1.5rem;
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    color: var(--color-secondary);
    border: 1px solid #A2A899;
    border-radius: 4px;
}

.map-btn:hover {
    background-color: #A2A899;
    color: var(--color-white);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    height: 250px;
    background-color: #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-item:hover {
    transform: scale(1.02);
}

/* Registry */
.registry {
    background-color: var(--color-white);
    text-align: center;
}

.registry-text {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.registry-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.registry-btn {
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.registry-btn:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* RSVP */
.rsvp {
    background-color: var(--color-bg);
}

.rsvp-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    background-color: #fafafa;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #fff;
}

.radio-group p {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.radio-options {
    display: flex;
    gap: 2rem;
}

.radio-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-options input[type="radio"] {
    width: auto;
    margin: 0;
    padding: 0;
    height: auto;
    box-shadow: none;
    /* remove potential shadows */
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 700; /* Match radio-group p or label if desired, or keep normal. text-light used elsewhere. */
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    padding: 0;
    height: auto;
    accent-color: var(--color-secondary);
    box-shadow: none;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-secondary);
    color: var(--color-white);
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

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

/* POV Section */
.pov {
    background-color: var(--color-white);
    text-align: center;
}

.pov-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pov-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 600px; /* Prevent it from being too tall on large screens */
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 3rem 0;
}

.footer-names {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .names {
        font-size: 3rem;
    }

    .countdown {
        gap: 1rem;
    }

    .time-box span:first-child {
        font-size: 1.8rem;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 16px 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
    }

    .story-content {
        grid-template-columns: 1fr;
    }

    .story-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .radio-options {
        flex-direction: column;
        gap: 1rem;
    }

    /* Mobile Swipeable Gallery */
    .gallery-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem; /* Space for scrollbar if visible */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .gallery-item {
        flex: 0 0 85%; /* Show part of next image to encourage scrolling */
        scroll-snap-align: center;
        height: 300px; /* Adjust height for mobile */
    }

    /* Hide scrollbar for cleaner look */
    .gallery-grid::-webkit-scrollbar {
        display: none;
    }
    .gallery-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* Disable hover effects and animations on mobile gallery to fix "grey box" and rollover */
    .gallery-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
        height: 300px;
        transform: translateZ(0); /* Hardware acceleration */
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        perspective: 1000px;
    }

    .gallery-item:hover {
        transform: none;
    }

    .gallery-item img {
        transform: translateZ(0); /* Hardware acceleration */
        -webkit-transform: translateZ(0);
        will-change: transform; /* Hint to browser */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .gallery-item:hover img {
        transform: none;
    }

    .gallery-item.fade-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important; /* Disable transition completely */
        visibility: visible !important;
    }
}

/* Lightbox Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}