@media (min-width: 601px) {
    .nav-links a:hover:not(.active) {
        background: var(--color-highlight);
        color: var(--color-bg);
        cursor: pointer;
        transition:
            background 0.2s,
            color 0.2s;
    }
}
/* Wedding Site Main Stylesheet */

.contributo-box {
    margin: 0 auto 32px auto;
    max-width: 480px;
    box-sizing: border-box;
    display: grid;
    gap: 18px;
}

.contributo-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: start;
    font-size: 1rem;
    gap: 10px;
    margin-bottom: 2px;
}

@media (max-width: 520px) {
    .contributo-box {
        padding: 18px 6px 14px 6px;
    }
    .contributo-row {
        grid-template-columns: 100px 1fr auto;
        font-size: 0.97rem;
        gap: 6px;
    }
    .contributo-label {
        min-width: 70px;
    }
}

.contributo-label {
    font-weight: 400;
    color: var(--color-text);
    font-size: 1.08em;
    min-width: 110px;
    text-align: left;
    letter-spacing: 0.01em;
}

.contributo-value {
    font-weight: 700;
    color: var(--color-text);
    font-family: inherit;
    word-break: break-all;
    font-size: 1em;
    letter-spacing: 0.01em;
    text-align: left;
    justify-self: start;
}

.gift-copy,
.gift-bic-copy {
    margin-left: 8px;
    padding: 4px 14px;
    border: none;
    background: var(--color-ui, #95b6c2);
    color: #fff;
    border-radius: 7px;
    font-size: 0.98em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
    box-shadow: 0 1px 4px rgba(45, 85, 100, 0.04);
    outline: none;
}
.gift-copy:active,
.gift-bic-copy:active,
.gift-copy.copied,
.gift-bic-copy.copied {
    background: #70a2b5;
}
.gift-copy:focus,
.gift-bic-copy:focus {
    outline: 2px solid #0099bb;
    outline-offset: 2px;
}
.gift-copy:focus,
.gift-bic-copy:focus {
    outline: 2px solid #013c57;
    outline-offset: 2px;
}

.gift-copied-message,
.gift-bic-copied-message {
    color: #179277;
    font-weight: 500;
    margin-left: 8px;
    font-size: 0.98em;
    padding: 2px 4px 0 4px;
    transition: opacity 0.2s;
    background: transparent;
    border-radius: 5px;
    display: inline-block;
    min-width: 90px;
    text-align: left;
}

:root {
    /* Colors */
    --color-bg: #f5efdb;
    --color-highlight: #f0da89;
    --color-ui: #95b6c2;
    --color-text: #95b6c2;

    /* Fonts */
    --font-title: "Open Sans", sans-serif;
    --font-body: "Open Sans", sans-serif;

    /* Sizes */
    --nav-height: 64px;
    --section-minheight: 100vh;
    --gallery-width: 100%;
    --slide-transition: 0.6s;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

section {
    min-height: var(--section-minheight);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 16px 32px 16px;
    box-sizing: border-box;
    overflow: visible !important;
    width: 100%;
    max-width: 100vw;
}

body {
    padding-top: var(--nav-height);
}
html,
body,
main,
section {
    overflow: visible !important;
}

/* Navigation Bar Styles */
nav {
    height: var(--nav-height);
    width: 100%;
    max-width: 100vw;
    background: var(--color-bg);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

.nav-logo {
    margin-top: 8px;
    margin-bottom: 0;
    flex-shrink: 0;
    max-width: calc(100% - 60px);
}
.nav-logo-svg {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto 4px auto;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}
.nav-links a {
    font-family: var(--font-title);
    color: var(--color-ui);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--space-xs);
    transition:
        background 0.3s,
        color 0.3s;
    font-size: 1.1rem;
}
.nav-links a.active {
    background: var(--color-highlight);
    color: var(--color-bg);
}

@media (min-width: 601px) {
    nav {
        box-shadow: none;
    }
    .nav-links {
        display: flex !important;
        position: static;
        background: none;
        box-shadow: none;
    }
    .hamburger {
        display: none !important;
    }
}

.nav-logo {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--color-ui);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    font-family: var(--font-title);
    color: var(--color-ui);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--space-xs);
    transition:
        background 0.3s,
        color 0.3s;
}

.nav-links a.active {
    background: var(--color-highlight);
    color: var(--color-bg);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: var(--color-ui);
    position: absolute;
    right: 24px;
    top: 12px;
    z-index: 101;
    cursor: pointer;
    transition: color 0.2s;
}
.hamburger:focus {
    outline: 2px solid var(--color-highlight);
}
.hamburger.open {
    color: var(--color-highlight);
}
@media (max-width: 600px) {
    .hamburger {
        display: block;
        right: 16px;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        max-width: 100vw;
        flex-direction: column;
        background: var(--color-bg);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        z-index: 99;
        padding: var(--space-sm) 0;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        text-align: center;
        padding: var(--space-md);
        width: 100%;
        box-sizing: border-box;
    }

    /* Mobile typography adjustments */
    .hero-title {
        font-size: 2rem;
        padding: 0 var(--space-sm);
    }

    /* Ensure all content containers fit */
    .gift-iban {
        font-size: 1rem;
        letter-spacing: 1px;
        padding: var(--space-sm);
    }

    .map-container {
        max-width: calc(100vw - 32px);
    }
}

/* Hero Section */
.hero-section {
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    scroll-margin-top: 40px;
}
.hero-svg {
    max-width: 600px;
    width: 100%;
    height: auto;
    margin-bottom: var(--space-md);
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-height: 55vh;
}

.hero-names-svg {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-md);
}

.hero-date-svg {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-md);
}

@media (max-width: 600px) {
    .hero-svg {
        max-width: 320px;
        max-height: 40vh;
    }
    .hero-date-svg {
        max-width: 140px;
    }
    .hero-names-svg {
        max-width: 200px;
    }
}
.hero-title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--color-ui);
    margin-bottom: var(--space-md);
}
.hero-date {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

/* Story Gallery */
.story-section {
    background: var(--color-bg);
}

/* Gallery Wrapper - Main Container */
.gallery-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

/* Gallery Main - Flex row with arrows beside image */
.gallery-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    width: 100%;
}

/* Gallery Image Container - Fixed height, centered */
.gallery-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    height: 60vh;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-image {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Gallery Arrows */
.gallery-arrow {
    background: none;
    border: none;
    color: var(--color-ui);
    border-radius: 50%;
    padding: var(--space-sm);
    cursor: pointer;
    transition:
        color 0.3s,
        box-shadow 0.3s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.gallery-arrow:hover {
    color: var(--color-highlight);
    box-shadow: 0 2px 8px rgba(240, 218, 137, 0.18);
}

.gallery-arrow:focus {
    outline: 2px solid var(--color-highlight);
    box-shadow: 0 0 0 3px var(--color-highlight);
}

.gallery-arrow:disabled,
.gallery-arrow[aria-disabled="true"] {
    opacity: 0.3;
    pointer-events: none;
    visibility: hidden;
}

/* Gallery Caption */
.gallery-caption {
    color: var(--color-text);
    text-align: center;
    font-size: 1rem;
    min-height: 1.4em;
    margin: 0;
    padding: 0 var(--space-md);
}

/* Gallery Dots - Simple small circles */
.gallery-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 0;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-ui);
    opacity: 0.4;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.gallery-dot.active {
    opacity: 1;
    background: var(--color-highlight);
}

/* No memories fallback styling */
.gallery-empty {
    text-align: center;
    color: var(--color-ui);
    font-size: 1.4rem;
    padding: var(--space-lg) 0;
    min-height: 160px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .gallery-main {
        gap: var(--space-xs);
    }

    .gallery-arrow {
        font-size: 1.5rem;
        min-width: 36px;
        min-height: 36px;
        padding: var(--space-xs);
    }

    .gallery-image-container {
        height: 45vh;
    }
    /* --- Mobile: Stack contributo label above data --- */
    @media (max-width: 600px) {
        .contributo-row {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5em;
        }
        .contributo-label {
            margin-bottom: 0.2em;
            min-width: 0;
            width: 100%;
            text-align: left;
        }
        .contributo-data {
            width: 100%;
            word-break: break-all;
        }
    }
}

/* Extra small screens (390px and below) */
@media (max-width: 390px) {
    :root {
        --nav-height: 56px;
    }

    .nav-logo-svg {
        height: 32px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-date {
        font-size: 1rem;
    }

    .hamburger {
        font-size: 1.8rem;
        right: 12px;
        top: 10px;
    }

    .gift-iban {
        font-size: 0.9rem;
        letter-spacing: 1px;
        padding: var(--space-xs);
    }

    .gift-copy {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.9rem;
    }

    section {
        padding: var(--space-lg) var(--space-sm);
    }
}

/* Ceremony & Party (Maps) */
.ceremony-section,
.party-section {
    background: var(--color-bg);
}
.map-container {
    width: 100%;
    max-width: 100%;
    height: 250px;
    border-radius: var(--space-sm);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: var(--space-md);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.address {
    color: var(--color-ui);
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* RSVP Section */
.rsvp-section {
    background: var(--color-bg);
}
.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-sm);
    box-sizing: border-box;
}

@media (min-width: 420px) {
    .rsvp-form {
        max-width: 420px;
        padding: 0;
    }
}
.rsvp-form label {
    font-weight: 600;
    color: var(--color-ui);
}
.rsvp-form input,
.rsvp-form textarea {
    padding: var(--space-sm);
    border-radius: var(--space-xs);
    border: 1px solid var(--color-ui);
    background: #fff9ea;
    color: var(--color-ui);
}
.rsvp-form button {
    background: var(--color-highlight);
    color: var(--color-bg);
    border: none;
    border-radius: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: 1.1rem;
    font-family: var(--font-title);
    cursor: pointer;
    transition: background 0.2s;
}
.rsvp-form button:hover {
    background: var(--color-ui);
    color: var(--color-bg);
}
.rsvp-confirm {
    color: var(--color-ui);
    font-weight: bold;
    margin-top: var(--space-md);
    text-align: center;
}

/* Gift Section */
.gift-section {
    background: var(--color-bg);
}
.gift-iban {
    font-family: var(--font-title);
    color: var(--color-ui);
    font-size: 1.2rem;
    background: #fff9ea;
    padding: var(--space-sm);
    border-radius: var(--space-xs);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: var(--space-md);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    word-break: break-all;
    max-width: 100%;
}

.gift-iban-value {
    word-break: break-all;
    text-align: center;
}
.gift-copy {
    background: var(--color-highlight);
    color: var(--color-ui);
    border: none;
    border-radius: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-size: 1rem;
    margin-left: var(--space-sm);
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
}
.gift-copy.copied {
    background: var(--color-ui);
    color: var(--color-bg);
}
.gift-copied-message {
    color: var(--color-highlight);
    margin-top: var(--space-xs);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--color-bg);
    color: var(--color-ui);
    text-align: center;
    font-size: 1rem;
    padding: var(--space-lg);
    font-family: var(--font-body);
}

/* Section fade-in animation */
.fade-section {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.7s,
        transform 0.7s;
}
.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 600px) {
    section {
        padding: var(--space-lg) var(--space-lg);
    }
    .gallery-container,
    .map-container {
        max-width: 650px;
        height: 300px;
    }
    .rsvp-form {
        max-width: 540px;
        padding: 0;
    }
}

@media (min-width: 1024px) {
    section {
        padding: var(--space-lg) calc(var(--space-lg) * 2);
    }
}

/* Utility class for spacing */
.margin-bottom-lg {
    margin-bottom: var(--space-lg);
}

/* Gallery Overlay */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    box-sizing: border-box;
}

.gallery-overlay-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    width: 100%;
    max-width: 90vw;
    max-height: 80vh;
}

.gallery-overlay-img-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 85vw;
    max-height: 78vh;
}

.gallery-overlay-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gallery-overlay-caption {
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    margin-top: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 600px;
}

.gallery-overlay-arrow {
    background: none;
    border: none;
    color: #fff;
    border-radius: 50%;
    padding: var(--space-sm);
    cursor: pointer;
    transition:
        color 0.3s,
        background 0.3s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gallery-overlay-arrow:hover {
    color: var(--color-highlight);
    background: rgba(255, 255, 255, 0.1);
}

.gallery-overlay-arrow:focus {
    outline: 2px solid var(--color-highlight);
    box-shadow: 0 0 0 3px var(--color-highlight);
}

.gallery-overlay-arrow svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.gallery-overlay-close-btn {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: var(--space-sm);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        color 0.3s,
        background 0.3s;
    border-radius: 50%;
}

.gallery-overlay-close-btn:hover {
    color: var(--color-highlight);
    background: rgba(255, 255, 255, 0.1);
}

.gallery-overlay-close-btn:focus {
    outline: 2px solid var(--color-highlight);
    box-shadow: 0 0 0 3px var(--color-highlight);
}

.gallery-overlay-close-btn svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.gallery-image {
    cursor: pointer;
}

body.gallery-overlay-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .gallery-overlay-content {
        gap: var(--space-sm);
        max-width: 95vw;
    }

    .gallery-overlay-arrow svg {
        width: 24px;
        height: 24px;
    }

    .gallery-overlay-caption {
        font-size: 1rem;
    }

    .gallery-overlay-close-btn {
        bottom: 32px;
    }

    .gallery-overlay-close-btn svg {
        width: 24px;
        height: 24px;
    }

    section {
        padding: var(--space-lg) var(--space-sm);
    }
}
