:root {
    --wedding-cream: #f9f8f4;
    --wedding-sage: #8a9a7b;
    --wedding-sage-dark: #5c6b52;
    --wedding-sage-light: #d1d9c9;
    --wedding-rose: #c9a89a;
    --wedding-ink: #4a4a4a;
    --wedding-gold: #b8956b;
    --font-display: "Playfair Display", serif;
    --font-body: "Lora", serif;
}

html, body {
    font-family: var(--font-body);
    background: var(--wedding-sage-dark);
    color: var(--wedding-ink);
    margin: 0;
    padding: 0;
}

h1, h2, h3, .hero-title, .brand-link {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--wedding-sage-dark);
}
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--wedding-cream);
}

.page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    z-index: 10;
    background: var(--wedding-cream);
}

.top-row {
    background: none !important;
    border: none !important;
}

.navbar-toggler {
    display: none !important;
}

main {
    flex: 1;
    position: relative;
    overflow-x: hidden;
    background: var(--wedding-cream);
}

.content {
    padding: 0;
    max-width: 100%;
}

.part-container {
    align-content: center;
    text-align: center;
}

.nav-brand {
    padding: 3rem 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(138, 154, 123, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-brand::before {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 60px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%238a9a7b' d='M20,80 Q40,40 80,20 Q60,60 20,80 Z M30,70 Q50,50 70,30'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.15;
    transform: rotate(30deg);
}

.brand-link {
    text-decoration: none;
    font-size: 1.75rem;
    letter-spacing: 0.05em;
    font-style: italic;
}

.nav-link {
    color: var(--wedding-ink) !important;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    padding: 1rem 1.5rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--wedding-sage) !important;
    background: rgba(138, 154, 123, 0.05);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

.nav-link.active {
    background: transparent !important;
    color: var(--wedding-sage-dark) !important;
    font-weight: bold;
}

.nav-footer {
    margin-top: 2rem;
    padding-bottom: 1.5rem;
}

.nav-admin .nav-link {
    color: var(--wedding-gold) !important;
}

.hero {
    position: relative;
    text-align: center;
    padding: 0;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

#heroCarousel {
    position: relative;
    width: 100%;
    height: 400px;
    z-index: 1;
}

.hero-carousel-img {
    height: 830px;
    width: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 2rem 1rem;
    border-radius: 0;
    backdrop-filter: none;
    text-shadow: 1px 1px 1px var(--wedding-sage-dark), 1px -1px 1px var(--wedding-sage-dark), -1px 1px 1px var(--wedding-sage-dark), -1px -1px 1px var(--wedding-sage-dark);
    color: var(--wedding-sage);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 2rem;
}

.hero-title {
    font-size: clamp(2rem, 16vw, 7rem);
    margin: 1rem 0;
    font-style: italic;
    text-shadow: 1px 1px 1px var(--wedding-sage-dark), 1px -1px 1px var(--wedding-sage-dark), -1px 1px 1px var(--wedding-sage-dark), -1px -1px 1px var(--wedding-sage-dark);
    color: var(--wedding-sage);
}

.hero-title span {
    display: block;
    font-size: 2.0rem;
    margin: -0.5rem 0;
}

.hero-date, .hero-welcome {
    font-size: 1.1rem;
    opacity: 0.85;
}

.countdown {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid rgba(138, 154, 123, 0.1);
    border-bottom: 1px solid rgba(138, 154, 123, 0.1);
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.countdown-unit span {
    display: block;
    font-size: 2rem;
    font-family: var(--font-display);
    color: var(--wedding-sage-dark);
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
}

.info-card {
    display: block;
    padding: 2rem;
    background: transparent;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    border: none;
    border-bottom: 1px solid rgba(138, 154, 123, 0.1);
    transition: all 0.3s ease;
}

.info-card h3 {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.info-card:hover {
    transform: none;
    box-shadow: none;
    background: rgba(138, 154, 123, 0.03);
}

.info-card.card-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    /* Optional: Add a dark overlay so text remains readable */
    z-index: 1;
}

.info-card.card-with-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Adjust opacity as needed */
    z-index: -1;
}

.location-card-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2rem; /* Ensure content has breathing room over the bg */
    border-radius: 8px; /* Optional: matches card style */
    overflow: hidden;
    z-index: 1;
    color: white; /* Often needed if using dark overlays */
}

.location-card-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.2); /* Dark overlay for readability */
    z-index: -1;
}

/* Specific background images */
.ceremony-bg {
    background-image: url('img/celler-schloss.png');
}

.celebration-bg {
    background-image: url('img/celler-tor.jpg');
}

.page-section {
    padding: 6rem 2rem;
    animation: fadeIn 0.8s ease;
    position: relative;
}

.page-section::before, .page-section::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.2;
    pointer-events: none;
}

.page-section:nth-child(odd)::before {
    top: 10px;
    left: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%238a9a7b' d='M20,80 Q40,40 80,20 Q60,60 20,80 Z M30,70 Q50,50 70,30'/%3E%3C/svg%3E");
    transform: rotate(-15deg);
}

.page-section:nth-child(even)::after {
    bottom: 10px;
    right: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%238a9a7b' d='M20,80 Q40,40 80,20 Q60,60 20,80 Z M30,70 Q50,50 70,30'/%3E%3C/svg%3E");
    transform: rotate(165deg);
}

.page-section h1 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 2rem;
    color: var(--wedding-sage);
}

.rich-text {
    line-height: 1.8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.schedule-list li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(138, 154, 123, 0.1);
    align-items: center;
    text-align: center;
}

.schedule-list time {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--wedding-sage);
    letter-spacing: 0.1em;
}

.schedule-list strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.schedule-image img {
    max-width: 100%;
    height: auto;
}

.rsvp-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(138, 154, 123, 0.15);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
}

.photo-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.stat-card span {
    display: block;
    font-size: 2rem;
    font-family: var(--font-display);
}

.guest-table .invite-actions {
    white-space: nowrap;
}

.guest-table .invite-actions .btn {
    margin: 0.1rem;
}

.btn-primary {
    background-color: var(--wedding-sage);
    border-color: var(--wedding-sage);
}

.card, .table {
    background: transparent;
    border: 1px solid rgba(138, 154, 123, 0.1);
}

.card {
    border-radius: 0;
}

.table thead th {
    border-bottom: 2px solid rgba(138, 154, 123, 0.2);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.btn-outline-primary {
    color: var(--wedding-sage);
    border-color: var(--wedding-sage);
}

.btn-outline-primary:hover {
    background-color: var(--wedding-sage);
    border-color: var(--wedding-sage);
}

.culture-selector .active {
    font-weight: bold;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .sidebar.open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        overflow-y: auto;
    }
    .mobile-nav-toggle {
        padding: 1rem;
        background: var(--wedding-cream);
        text-align: right;
    }
    .close-menu {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        z-index: 1001;
    }
    .page {
        flex-direction: column;
    }
    main {
        flex: 1;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
    }
}
