@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,400&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ==========================================
   COLOR PALETTE (Rustic Marquee / Forest Theme)
   ========================================== */
:root {
  /* Brand / Primary Actions */
  --primary: #3D4A3E;          /* Deep Forest / Moss Green */
  --primary-hover: #2B352C;    /* Darker Moss for Hover */

  /* Page Canvas (Dark Theme) */
  --bg-page: #1C231E;          /* Dark Forest Charcoal (Rich, Moody Background) */
  
  /* Cards & Surface Elements (Light Theme Floating on Dark) */
  --bg-card: #F7F5F0;          /* Soft Natural Linen / Cream */
  --bg-input: #FFFFFF;         /* Crisp White for Form Fields */
  --border: #E3DEC3;          /* Warm Reed / Oat Border */

  /* Typography */
  --text-main: #272521;       /* Deep Timber / Dark Charcoal for Card Content */
  --text-muted: #736E65;      /* Warm Earthy Slate for Subtitles/Labels */

  /* Accents & Status */
  --accent: #B08D57;         /* Antique Gold / Brass */
  --error: #B84343;          /* Muted Red */
}

section[id], 
article[id],
form[id] {
    scroll-margin-top: 140px;
}

/* ==========================================
   BASE RESET & TYPOGRAPHY
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

h1, h2, h3, .wedding-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ==========================================
   LOGIN CARD
   ========================================== */
.login-card {
    background-color: var(--bg-card); /* Fixed: Soft linen background */
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); /* Deep shadow on dark background */
}

.login-card h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 6px;
    text-align: center;
}

.login-card p.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 28px;
}

/* ==========================================
   FORM INPUTS
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--bg-input); /* Fixed: White input background */
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(61, 74, 62, 0.15);
}

/* ==========================================
   BUTTONS & MESSAGES
   ========================================== */
.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

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

.btn-submit:active {
    transform: scale(0.99);
}

/* Secondary Button Variant (Outlined style for dark theme) */
.btn-submit.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-submit.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

/* Link element styling when using .btn-submit class */
a.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* Venue Action Row (2-column layout on desktop, stacked on mobile) */
.venue-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
    .venue-actions {
        flex-direction: row;
    }

    .btn-venue {
        flex: 1; /* Equal 50/50 width side-by-side on desktop */
    }
}

.error-message {
    background-color: rgba(184, 67, 67, 0.1);
    color: var(--error);
    border: 1px solid rgba(184, 67, 67, 0.2);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.site-footer {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.8;
}

.site-footer p {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.3px;
}

/* ==========================================
   DASHBOARD & NAVIGATION LAYOUT (Mobile First)
   ========================================== */
body.dashboard-body {
    display: block;
    padding: 0;
}

.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column; /* Stack logo above nav on mobile */
    align-items: center;
    gap: 12px;
    width: 100%;
}

.wedding-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0; /* Prevents logo from squishing when nav grows */
}

.wedding-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1px;
    line-height: 1.1;
}

.wedding-sub-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    letter-spacing: 1px;
}

/* Mobile-friendly horizontal pill bar */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    overflow-x: auto; /* Allows smooth swipe on narrow screens */
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 6px 0;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: rgba(61, 74, 62, 0.08); /* Light sage pill highlight */
}

.logout-link {
    border: 1px solid var(--border);
    color: var(--text-main);
}

/* ==========================================
   DESKTOP RESPONSIVE BREAKPOINT (≥ 768px)
   ========================================== */
@media (min-width: 768px) {
    .header-container {
        flex-direction: row; /* Side-by-side layout on desktop */
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        gap: 100px;
    }

    .wedding-brand-container {
        align-items: flex-start; /* Align brand to left on desktop */
        text-align: left;
    }

    .wedding-brand {
        font-size: 1.7rem;
    }

    .nav-menu {
        width: auto;
        justify-content: flex-end;
        flex-wrap: wrap; /* KEY FIX: Wraps menu pills if list gets too long */
        overflow-x: visible;
        gap: 8px 12px; /* Row gap and column gap */
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

/* ==========================================
   DASHBOARD CONTAINER & CARDS
   ========================================== */
.dashboard-container {
    max-width: 900px;
    margin: 24px auto;
    padding: 0 20px;
}

.welcome-banner {
    text-align: center;
    margin-bottom: 24px;
}

.welcome-banner h1 {
    color: #FFFFFF; /* High contrast heading on dark canvas */
    font-size: 2.8rem;
}

.welcome-banner .subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.family-carousel-container {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%); /* Pulls full viewport width */
    overflow: hidden;
}

.family-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 5%;     
    scrollbar-width: none;
}

.family-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 95%;
    max-width: 380px;
    scroll-snap-align: center; /* Locks active card in screen center */
    scroll-snap-stop: always;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Submit Wrapper below Carousel */
.submit-wrapper {
    max-width: 420px;
    margin: 24px auto 40px auto;
    padding: 0 20px;
    text-align: center;
}

.btn-save-household {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* On Desktop (≥ 768px): Show cards grid or wider center */
@media (min-width: 768px) {
    .family-carousel-container {
        width: 100%;
        margin-left: 0;
        transform: none;
    }

    .family-carousel {
        padding: 0;
        justify-content: center;
        flex-wrap: wrap; /* Wraps cleanly into a grid on desktop */
        scroll-snap-type: none;
    }

    .carousel-card {
        flex: 0 0 calc(50% - 12px);
        max-width: 420px;
    }
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.guest-card, .info-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.guest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.guest-card-header h2 {
    font-size: 1.6rem;
    color: var(--primary);
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-attending {
    background-color: rgba(61, 74, 62, 0.15);
    color: var(--primary);
}

.status-declined {
    background-color: rgba(184, 67, 67, 0.15);
    color: var(--error);
}

.status-pending {
    background-color: rgba(115, 110, 101, 0.15);
    color: var(--text-muted);
}

/* Radio Cards for Attendance */
.radio-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.radio-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background-color: var(--bg-input);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all 0.2s;
}

.radio-card:has(input:checked) {
    border-color: var(--primary);
    background-color: rgba(61, 74, 62, 0.08);
    font-weight: 600;
}

.submit-wrapper {
    text-align: center;
    margin-bottom: 48px;
}

.submit-wrapper .btn-submit {
    max-width: 300px;
}

.info-card {
    margin-top: 24px;
}

.info-card h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.info-lead {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-grid h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 6px;
}

/* ==========================================
   ABOUT US / STORY CARD
   ========================================== */
.couple-card {
    position: relative;
    overflow: hidden;
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.story-content {
    line-height: 1.7;
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 28px;
}

.story-content p + p {
    margin-top: 12px;
}

.story-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Highlights Grid */
.story-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-input);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.highlight-icon {
    font-size: 1.4rem;
}

.highlight-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--primary);
}

.highlight-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================
   FLASH NOTIFICATION TOASTS
   ========================================== */
.flash-container {
    position: fixed;
    top: 10px; /* Sits just below the sticky header */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Lets clicks pass through behind it */
}

.flash-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px); /* Gives a glass effect */
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Success Toast (Sage Green & Warm Cream) */
.flash-success {
    background-color: rgba(61, 74, 62, 0.95);
    color: #FFFFFF;
    border: 1px solid var(--border);
}

.flash-success .flash-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Error Toast (Muted Red) */
.flash-error {
    background-color: rgba(184, 67, 67, 0.95);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flash-error .flash-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Entrance Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dismiss Animation */
.flash-toast.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}




/* ==========================================
   IMAGES
   ========================================== */

.image-divider-card {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 280px;
    margin: 32px auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.image-divider-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop-fits cleanly regardless of screen width */
    object-position: center;
    filter: brightness(0.9);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px 16px 24px;
    background: linear-gradient(transparent, rgba(28, 35, 30, 0.85)); /* Smooth gradient fade onto dark canvas */
    display: flex;
    align-items: flex-end;
}

.image-caption {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
    .image-divider-card {
        height: 380px; /* Taller hero height on tablet and desktop */
    }
}

/* ==========================================
   ACCOMMODATION LIST STYLES
   ========================================== */

.accommodation-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.acc-card {
    background-color: var(--bg-input, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.2s ease;
}

.acc-card:hover {
    border-color: rgba(212, 163, 89, 0.4);
}

.acc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.acc-header h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0 0 2px 0;
}

.acc-location {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.acc-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Badges */
.acc-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-onsite {
    background-color: rgba(62, 92, 68, 0.4); /* Forest green tint */
    color: #A3D9B1;
    border: 1px solid rgba(163, 217, 177, 0.3);
}

.badge-recommended {
    background-color: rgba(212, 163, 89, 0.2); /* Antique Gold tint */
    color: var(--primary);
    border: 1px solid rgba(212, 163, 89, 0.4);
}

.badge-pub {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Responsive adjustment for small screens */
@media (max-width: 480px) {
    .acc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ==========================================
   SCHEDULE / TIMELINE STYLES
   ========================================== */

.timeline {
    position: relative;
    margin-top: 24px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-event {
    position: relative;
}

/* Gold Dot on the timeline line */
.timeline-event::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--bg-card, #1A1A1A);
}

.timeline-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.timeline-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Last Event Highlight (Carriages) */
.timeline-event.highlight-event .timeline-time {
    color: var(--primary);
}

.timeline-event.highlight-event::before {
    background-color: #E26D5C; /* Accent warm color for carriages */
    box-shadow: 0 0 8px rgba(226, 109, 92, 0.5);
}

.weekend-box {
    margin-top: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--primary);
    border-radius: 14px;
    padding: 20px;
}

.weekend-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
}

.weekend-box h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.weekend-box p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.weekend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weekend-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    position: relative;
    padding-left: 18px;
}

.weekend-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.weekend-list strong {
    color: var(--text-main);
}

/* ==========================================
   THINGS TO DO STYLES
   ========================================== */

.attractions-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.attraction-card {
    display: flex;
    gap: 16px;
    background-color: var(--bg-input, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    align-items: flex-start;
}

.attraction-icon {
    font-size: 1.8rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.attraction-content h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.attraction-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.attraction-content p:last-child {
    margin-bottom: 0;
}

.attraction-content strong {
    color: var(--primary);
}