/* --- Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap');

/* --- CSS Variables & Global Styles --- */
:root {
    /* ===== PRIMARY COLORS ===== */
    --primary: #005F60;
    --primary-dark: #004a4b;
    --primary-light: #007a7b;

    /* Legacy aliases */
    --primary-color: var(--primary);
    --primary-color-dark: var(--primary-dark);

    /* ===== WARM NEUTRAL BACKGROUNDS ===== */
    --bg-cream: #FAF8F5;
    --bg-warm: #F5F3F0;
    --bg-white: #FFFFFE;

    /* Legacy alias */
    --light-gray: var(--bg-cream);

    /* ===== TEXT COLORS ===== */
    --text-primary: #2C3E50;
    --text-secondary: #5D6D7E;
    --text-muted: #7F8C8D;
    --text-muted-light: rgba(255,255,255,0.9);
    --text-muted-dark: #5D6D7E;

    /* Legacy alias */
    --secondary-color: var(--text-primary);

    /* ===== ACCENT COLORS ===== */
    --accent-gold: #C9A962;
    --accent-warm: #D4B896;

    /* Legacy alias */
    --accent-color: var(--accent-gold);

    /* ===== BORDERS ===== */
    --border-light: #E8E4DF;
    --border-medium: #D5CFC7;

    /* Legacy alias */
    --border-color: var(--border-light);

    /* ===== SHADOWS (warm-tinted) ===== */
    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.06);
    --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.10);
    --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.12);
    --shadow-xl: 0 16px 48px rgba(44, 62, 80, 0.16);

    /* ===== SPACING SCALE ===== */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* ===== BORDER RADIUS ===== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* ===== TRANSITIONS ===== */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.7;
}

h1, .display-4 {
    font-family: 'Playfair Display', serif;
    font-style: normal;
    font-weight: 700;
    color: var(--primary);
}

h2, h3, h4, h5, .card-title {
    font-family: 'Roboto', sans-serif;
    font-style: normal;
    font-weight: 700;
    color: var(--text-primary);
}

/* Improved paragraph styling */
p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Muted text uses warm gray */
.text-muted {
    color: var(--text-muted) !important;
}

.container { max-width: 1200px; }

/* --- Utility Classes --- */
.d-none-important { display: none !important; }

/* Responsive line break helpers */
.mobile-only { display: inline; }
.desktop-only { display: none; }

@media (min-width: 768px) {
    .mobile-only { display: none; }
    .desktop-only { display: inline; }
}

/* --- Component Enhancements --- */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   UNIFIED COMPONENT SYSTEM
   ============================================ */

/* Unified Card - use for consistent card styling across all pages */
.card-unified {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card-unified:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Unified Section Styling */
.section-unified {
    padding: var(--space-3xl) var(--space-lg);
}
.section-unified.bg-cream {
    background-color: var(--bg-cream);
}
.section-unified.bg-white {
    background-color: var(--bg-white);
}
.section-unified.bg-warm {
    background-color: var(--bg-warm);
}

/* Unified Section Header */
.section-header-unified {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.section-header-unified h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}
.section-header-unified p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Icon Box - unified icon containers */
.icon-box-unified {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}
.icon-box-unified.accent {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm));
}
.icon-box-unified.lg {
    width: 72px;
    height: 72px;
    font-size: 1.75rem;
    border-radius: var(--radius-lg);
}
.memorial-list-item {
  position: relative; 
  z-index: 2;
}
.btn {
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-accent {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #fff;
}
.btn-accent:hover {
    background-color: #b8963f;
    border-color: #b8963f;
    color: #fff;
}

/* ===== UNIFIED BUTTON SYSTEM ===== */
.btn-primary-unified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    min-height: 48px;
    border: none;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
}
.btn-primary-unified:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 95, 96, 0.35);
}

.btn-secondary-unified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-white);
    color: var(--primary);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    min-height: 48px;
    border: 2px solid var(--primary);
    text-decoration: none;
    transition: all var(--transition-base);
}
.btn-secondary-unified:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-accent-unified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent-gold);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    min-height: 48px;
    border: none;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(201, 169, 98, 0.25);
}
.btn-accent-unified:hover {
    background: #b8963f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.35);
}

/* Ensure minimum touch targets on mobile (44x44px minimum per WCAG) */
@media (max-width: 767px) {
    .btn-sm {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    .mobile-menu-toggler {
        min-width: 44px;
        min-height: 44px;
    }
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 95, 96, 0.15);
}

/* --- Header & Menu Styles --- */
header {
    display: none;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}
.header-visible { display: block; }

header .container {
    max-width: 1400px;
}

header .navbar {
    padding: 0.75rem 0;
}

.logo-img { height: 80px; width: auto; }
.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    transition: all 0.2s ease;
}
.navbar-brand:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Desktop logo sizing - larger and more prominent */
.navbar-brand-logo {
    height: 77px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Brand text next to logo */
.brand-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
    display: none; /* Hidden on mobile by default */
}

/* Tablet and Desktop - show brand text and larger logo */
@media (min-width: 768px) {
    header .navbar {
        padding: 1rem 0;
    }
    .brand-text {
        display: inline-block;
    }
    .navbar-brand-logo {
        height: 110px;
    }
}

/* Large Desktop - even more prominent */
@media (min-width: 1200px) {
    .navbar-brand-logo {
        height: 110px;
    }
    .brand-text {
        font-size: 1.5rem;
    }
}

/* Clean Sign In Button for Landing Page */
.btn-signin-desktop {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.2s ease;
}
.btn-signin-desktop:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 95, 96, 0.3);
}

/* Mobile logo */
@media (max-width: 576px) {
    .navbar-brand-logo {
        height: 77px;
    }
    header .navbar {
        padding: 0.5rem 0;
    }
}

.navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #005F60;
    background: rgba(0, 95, 96, 0.08);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-item.active .nav-link {
    color: #005F60;
    background: rgba(0, 95, 96, 0.1);
    font-weight: 600;
}

/* Sign in button styling */
#signInLink-desktop {
    list-style: none;
}

#signInLink-desktop a.nav-link {
    background: #ffffff !important;
    color: #005F60 !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 2px solid #005F60;
}

#signInLink-desktop a.nav-link:hover {
    background: #005F60 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 95, 96, 0.3);
}

/* --- CARD-BASED MENU STYLES --- */
#card-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(10, 25, 47, 0.98);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1050; display: flex; flex-direction: column;
    padding: 1rem; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#card-menu-overlay.active { opacity: 1; pointer-events: auto; }

.card-menu-header {
    display: flex; justify-content: space-between; align-items: center;
    color: #fff; padding: 1rem; flex-shrink: 0;
}

.card-menu-content {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 0 1rem 1rem 1rem;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}
.card-menu-header h2 { color: #fff; }

#curator-menu-items, #guest-menu-items, #universal-menu-items, #curator-nav-menu-items {
    display: flex; flex-direction: column; gap: 0.5rem;
}
.card-menu-item {
    display: flex; align-items: center; padding: 1rem;
    border-radius: 8px; transition: background-color 0.2s ease-in-out; color: #fff;
    position: relative; /* Allow absolute positioning of badges */
}
.card-menu-item:hover { background-color: rgba(255,255,255,0.1); color: #fff; }
.card-menu-item i { font-size: 1.5rem; color: var(--accent-color); width: 40px; text-align: center; }
.card-menu-text { margin-left: 1rem; }
.card-menu-title { color: #fff; margin: 0; font-size: 1.1rem; font-weight: 500; }
.card-menu-subtitle { color: rgba(255,255,255,0.85); font-size: 0.95rem; margin: 0; }
.card-menu-desc { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0.25rem 0 0 0; }
.card-menu-grid {
    display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1rem;
    overflow-y: auto; flex-grow: 1; align-content: start;
}
.menu-card {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 1.5rem; text-align: center;
    color: #fff; text-decoration: none; transition: all 0.2s ease-in-out; position: relative; display: block;
}
.menu-card:hover, .menu-card:focus {
    transform: translateY(-5px);
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.menu-card i { font-size: 2rem; color: var(--accent-color); margin-bottom: 1rem; }
.menu-card h4 { color: #fff; margin-bottom: 0.5rem; }
.menu-card p { color: rgba(255,255,255,0.8); font-size: 0.95rem; margin-bottom: 0; }
.notification-badge {
    position: absolute; top: 10px; right: 10px; background-color: #dc3545;
    color: white; width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold;
}
@media (min-width: 768px) { .card-menu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .card-menu-grid { grid-template-columns: repeat(3, 1fr); } }
/* --- END: CARD-BASED MENU STYLES --- */

/* Fullscreen Mobile Menu Styling */
.modal-fullscreen .modal-header { border-bottom: 1px solid #dee2e6; background-color: var(--light-gray); }
.modal-fullscreen .modal-body { background-color: var(--light-gray); }
.modal-fullscreen .nav-link { color: var(--secondary-color); }

/* --- Homepage Styles --- */
.hero-section {
    position: relative; padding: 6rem 2rem;
    background-image: url('/images/hero-bg.jpg');
    background-size: cover; background-position: center; background-attachment: fixed;
    color: #fff;
}
.hero-section::before {
    content: ''; position: absolute; inset: 0;
    background-color: rgba(0,0,0,0.5); z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.hero-section .display-4 { color: #fff; font-weight: bold; text-shadow: 1px 1px 3px rgba(0,0,0,0.4); }
.hero-section .display-4 span { display: block; } /* keep headline on separate lines */

/* Added: hero logo sizing class (used when logo is the hero) */
.home-hero-logo {
    max-width: 480px; width: 70vw; height: auto;
    display: block; margin: 2rem auto 1rem;
}

.hero-subtitle {
    font-size: 1.5rem; max-width: 600px; margin: 0.5rem auto 0 auto;
    color: rgba(255,255,255,0.9);
}

.icon-square { width: 3rem; height: 3rem; border-radius: .75rem; display: inline-flex; align-items: center; justify-content: center; }

.recent-memorial-card { overflow: hidden; transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; }
.recent-memorial-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.recent-memorial-img-container { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.recent-memorial-img { width: 100%; height: 100%; object-fit: cover; }

#homepage-map-container { width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; }
.map-wrapper-homepage { position: relative; }
.gps-button { position: absolute; top: 10px; left: 10px; z-index: 10; border-radius: 50%; }

/* --- Memorial Page Styles --- */
.memorial-page-header { padding: 2rem 0; background-color: #fff; border-bottom: 1px solid var(--border-color); }
.memorial-header-name { font-size: 2.5rem; font-weight: 700; color: #343A40; line-height: 1.2; }

#display-main-media img {
    max-width: 400px; max-height: 400px; width: 100%; object-fit: cover;
    border-radius: 15px; border: 6px solid #fff; box-shadow: var(--shadow-md);
}

.scrolly-section { display: grid; gap: 1.5rem; }
.card-title i { color: var(--accent-color); }

.map-container-wrapper {
    position: relative; height: 300px; border-radius: .375rem; overflow: hidden; cursor: pointer;
}
.map-container-wrapper .map-crosshair {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 2.5rem; z-index: 10; pointer-events: none; text-shadow: 0 0 4px white;
}

.photo-gallery-item { cursor: zoom-in; overflow: hidden; border-radius: 8px; border: 1px solid #eee; }
.photo-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease-in-out; }
.photo-gallery-item:hover img { transform: scale(1.03); }

.image-zoom-modal { background-color: rgba(0,0,0,0.92); }
.image-zoom-modal .modal-content { background-color: transparent; border: none; box-shadow: none; }
.image-zoom-modal .modal-body { touch-action: pan-x pan-y; padding: 0; }
.image-zoom-modal .modal-dialog { max-width: 95vw; margin: 1rem auto; }
.image-zoom-modal #zoomed-image { max-width: 100%; max-height: 85vh; object-fit: contain; }
.image-zoom-modal .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: 0.7; }
.image-zoom-modal .btn-close:hover { opacity: 1; }
.modal-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
    border: none; font-size: 1.2rem; padding: 0.75rem 0.5rem;
    border-radius: 4px; z-index: 1060; cursor: pointer;
    opacity: 0; transition: opacity 0.2s ease;
}
.image-zoom-modal:hover .modal-nav-btn { opacity: 1; }
.modal-nav-btn:hover { background-color: rgba(255,255,255,0.2); color: white; }
.modal-nav-btn.prev { left: 8px; }
.modal-nav-btn.next { right: 8px; }
.gallery-swipe-hint {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.7); font-size: 0.85rem; display: none;
    animation: fadeInOut 3s ease-in-out;
}
.gallery-swipe-hint i { margin: 0 8px; }
@keyframes fadeInOut { 0%, 100% { opacity: 0; } 20%, 80% { opacity: 1; } }
@media (max-width: 768px) {
    .modal-nav-btn { display: none; }
    .gallery-swipe-hint { display: block; }
}
.modal-actions { position: absolute; top: 1rem; right: 4rem; z-index: 1060; }

/* --- Family Tree Styles --- */
#tree-container svg { display: block; margin: auto; }
.tree-node text { text-anchor: middle; font-size: 14px; font-family: 'Roboto', sans-serif; }

/* --- Memorial Form Wizard Styles --- */
#memorialForm .wizard-step { display: none; animation: fadeIn 0.5s ease-in-out; }
#memorialForm .wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.wizard-progress {
    display: flex;
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.wizard-progress-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
}
.wizard-progress-step .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid var(--border-color);
    margin: 0 auto 0.5rem auto;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: bold;
}
.wizard-progress-step.active {
    background-color: #fff;
    color: #000;
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
}
.wizard-progress-step.active .step-number {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
}
.wizard-progress-step.completed .step-number {
    border-color: var(--primary-color);
    background-color: #fff;
    color: var(--primary-color);
}
.wizard-progress-step.completed {
    background-color: #e9ecef;
    color: #495057;
}
.wizard-navigation { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }

/* --- Original Memorial Form Styles --- */
#memorialForm h4 { border-bottom: 1px solid #eee; padding-bottom: 0.5rem; margin-bottom: 1.5rem; }

.media-preview-item { position: relative; margin-bottom: 0.5rem; }
.media-preview-item img { width: 100%; height: 100px; object-fit: cover; }
.remove-media-btn {
    position: absolute; top: 5px; right: 15px; border-radius: 50%;
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
}
.drag-handle { cursor: grab; color: #ccc; font-size: 1.2rem; }

/* --- CURATOR DASHBOARD V2 STYLES --- */
.dashboard-theme-wrapper {
    background-color: #0a192f; color: #e6f1ff; min-height: 100vh;
    position: relative; overflow: hidden;
}
.dashboard-theme-wrapper::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(0,95,96,0.2), transparent 80%);
    z-index: 0; opacity: 0; transition: opacity 0.5s;
    pointer-events: none;
}
.dashboard-theme-wrapper.spotlight-active::before { opacity: 1; }
@keyframes gentle-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 0.5; }
}
@media (max-width: 767px) {
    .dashboard-theme-wrapper::before {
        background: radial-gradient(circle at 50% 20%, rgba(0,95,96,0.2), transparent 80%);
        animation: gentle-pulse 15s infinite ease-in-out;
    }
    .dashboard-header .btn { width: 100%; }
}
.dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; position: relative; z-index: 1; }
.dashboard-title { font-family: 'Playfair Display', serif; color: #fff; font-style: italic; }
.dashboard-header .lead { color: rgba(255,255,255,0.9) !important; }

.stat-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; position: relative; z-index: 1; }
.stat-card {
    background-color: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 1rem; text-align: center;
}
.stat-card.action-needed { border-left: 4px solid var(--accent-color); }
.stat-card-content h3 { color: #fff; font-size: 2rem; margin: 0; }
.stat-card-content p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.85); }

.dashboard-content-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; position: relative; z-index: 1; }
@media (min-width: 992px) { .dashboard-content-grid { grid-template-columns: 2fr 1fr; } }

.dashboard-section-title {
    color: #fff; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.5rem;
}

/* Memorial List Controls */
.memorial-list-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 10;
}
@media (min-width: 576px) {
    .memorial-list-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
.memorial-list-controls .search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}
.memorial-list-controls .search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
}
.memorial-list-controls .search-box input {
    padding-left: 38px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}
.memorial-list-controls .search-box input::placeholder {
    color: rgba(255,255,255,0.5);
}
.memorial-list-controls .search-box input:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0,95,96,0.25);
    color: #fff;
}
.memorial-list-controls .sort-box select {
    background: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    color: #1a3a3a;
    min-width: 180px;
    cursor: pointer;
}
.memorial-list-controls .sort-box select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0,95,96,0.25);
    outline: none;
}

.memorial-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 576px) {
    .memorial-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .memorial-list { grid-template-columns: repeat(4, 1fr); }
}
.memorial-list-item {
    background-color: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 1rem; transition: background-color 0.2s ease, transform 0.2s ease; text-align: center;
}
.memorial-list-item:hover { background-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.memorial-list-item-info h5 { color: #fff; margin: 0; font-family: 'Roboto', sans-serif; font-size: 1rem; line-height: 1.3; }
.memorial-list-item-info p { color: rgba(255,255,255,0.7); margin: 0.25rem 0 0; font-size: 0.8rem; }
.memorial-list-item-actions { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; gap: 0.5rem; }
.memorial-list-item-actions .btn { flex-grow: 1; font-size: 0.75rem; padding: 0.4rem 0.5rem; }

.pending-card {
    background-color: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 1rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
}
.pending-card-icon i { font-size: 1.5rem; color: var(--accent-color); }
.pending-card-body h6 { color: #fff; margin: 0; }
.pending-card-body p { color: rgba(255,255,255,0.9); margin: 0; font-size: 0.9rem; }
.pending-card-body .pending-description { font-style: italic; margin-top: 0.25rem; }

.empty-state-container { background-color: transparent; border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); }
.empty-state-container .text-muted { color: rgba(255,255,255,0.85) !important; }
.empty-state-container i { color: var(--accent-color); margin-bottom: 1rem; }
/* --- END: CURATOR DASHBOARD V2 STYLES --- */

/* --- SCOUT MODE V2 "HUD" STYLES --- */
body.scout-mode-active { background-color: #000; }
body.scout-mode-active .scout-header,
body.scout-mode-active .scout-footer {
    background-color: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1); color: #e6f1ff;
}
body.scout-mode-active .scout-header h5,
body.scout-mode-active .scout-footer p,
body.scout-mode-active .directions-steps .step { color: #e6f1ff; }
body.scout-mode-active .directions-steps .step span {
    background-color: rgba(255,255,255,0.2); color: #fff;
}
body.scout-mode-active .directions-steps .step.active { font-weight: bold; color: #fff; }
body.scout-mode-active .directions-steps .step.active span {
    background-color: var(--accent-color); color: #0a192f;
}

/* --- ADDED: Memorial Tier Emphasis --- */
#memorial-tier-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  color: #113242;
  margin-bottom: .25rem;
}
/* Tier card styles removed - now defined in memorial-form.css only */

/* --- Hover States for Interactive Elements --- */
a:not(.btn):hover {
  text-decoration: underline;
  opacity: 0.85;
}

.memorial-list-item {
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.memorial-list-item:hover {
  background-color: rgba(255,255,255,0.12) !important;
  transform: translateY(-2px);
}

.card:not(.no-hover):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* --- Toast Notifications --- */
.toast-container { z-index: 1100; }

/* --- SAVE CONFIRMATION OVERLAY --- */
#save-confirmation-overlay {
    position: fixed; inset: 0; background-color: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#save-confirmation-overlay.visible { opacity: 1; }
#save-confirmation-overlay .content {
    background-color: white; padding: 2rem 3rem; border-radius: 10px;
    text-align: center; font-size: 1.2rem; font-weight: 500; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
#save-confirmation-overlay .content i {
    color: #198754; font-size: 2rem; display: block; margin-bottom: 1rem;
}

/* --- Timeline Styles --- */
.timeline { list-style: none; padding: 1rem; margin: 0; }
.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.timeline-item::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 28px;
    width: 2px;
    height: calc(100% + 0.5rem);
    background: #e9ecef;
}
.timeline-item:last-child::after { display: none; }
.timeline-bullet {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--light-gray);
    z-index: 1;
}
/* Historical events - gray globe icon, normal text */
.timeline-item.timeline-item-historical .timeline-bullet { background: #6c757d; }
.timeline-item.timeline-item-historical .timeline-item-year { color: #212529; }
.timeline-item.timeline-item-historical p { margin: 0; color: #212529; }

/* Personal milestones - gold star icon, teal year */
.timeline-item.timeline-item-personal .timeline-bullet {
    background: linear-gradient(135deg, #d4a855 0%, #b8942e 100%);
}
.timeline-item.timeline-item-personal .timeline-item-year { color: var(--primary-color); }
.timeline-item.timeline-item-personal p { font-weight: 600; margin: 0; color: #212529; }

.timeline-item.timeline-item-major .timeline-bullet { background: var(--secondary-color); }
.timeline-content { flex: 1; padding-top: 3px; }
.timeline-item-year { font-weight: bold; color: var(--primary-color); font-size: 1.1rem; margin-bottom: 0.25rem; }

/* --- Responsive Styles --- */
@media (min-width: 992px) {
    .map-container-wrapper { height: 600px; }
    .hero-section { padding-top: 8rem; padding-bottom: 8rem; }
}
@media (max-width: 991px) {
    header.header-visible { position: sticky; top: 0; z-index: 1020; }
}
@media (max-width: 767px) {
    .hero-section { padding: 4rem 1rem; background-attachment: scroll; }
    .hero-section h1, .hero-section .display-4 { font-size: 1.8rem; }
    .hero-section .display-4 span { display: block; white-space: normal; }
    .home-hero-logo { max-width: 300px; margin-top: 1rem; }
    .memorial-header-name { font-size: 2rem; }
}

/* --- Pricing Page Styles --- */
.border-primary { border-color: var(--primary-color) !important; }
.pricing-header-featured { background-color: #e6f0f0; }

/* --- Welcome Page Styles --- */
.welcome-container {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    padding: 2rem; background-image: url('/images/hero-bg.jpg'); background-size: cover; background-position: center; position: relative;
}
.welcome-container::before { content: ''; position: absolute; inset: 0; background-color: rgba(0,0,0,0.5); }
.welcome-card {
    position: relative; max-width: 500px; background-color: rgba(255,255,255,0.95);
    border-radius: 15px; padding: 2rem; text-align: center; box-shadow: var(--shadow-md);
}
.welcome-logo { height: 80px; width: auto; margin-bottom: 1.5rem; }

/* --- START: CORRECTED CODE --- */
/* Robust scroll-locking for active menu */
body.menu-active { overflow: hidden; }

/* Custom styles for the mobile menu button to avoid Bootstrap JS conflicts */
.mobile-menu-toggler {
    padding: 0.25rem 0.75rem; font-size: 1.25rem; line-height: 1;
    background-color: transparent; border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.25rem; transition: box-shadow 0.15s ease-in-out;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.mobile-menu-toggler:active {
    background-color: rgba(0,0,0,0.05);
}
.mobile-menu-toggler:focus { text-decoration: none; outline: 0; box-shadow: 0 0 0 0.25rem; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}
/* Hide the mobile menu toggler on large screens */
@media (min-width: 992px) { .mobile-menu-toggler { display: none; } }

/* --- Added for Pricing Card Button Alignment --- */
.card .card-body {
    display: flex;
    flex-direction: column;
}
.card .card-body .btn {
    margin-top: auto;
}

/* --- Mobile Optimization Breakpoints --- */
@media (max-width: 767px) {
  /* Order Tag Page Mobile */
  .order-tag-page .row.g-5 {
    flex-direction: column-reverse;
  }

  .order-tag-page .col-md-5,
  .order-tag-page .col-lg-4 {
    order: -1;
    position: sticky;
    top: 80px;
    z-index: 100;
  }

  .order-tag-page #checkout-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-radius: 0;
    padding: 1.25rem;
    margin: 0;
  }

  .order-tag-page .trust-badges {
    font-size: 0.9rem;
  }

  /* Homepage Hero Text - 3 lines on mobile */
  .home-hero h1 {
    font-size: 1.65rem !important;
    line-height: 1.4;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero h1 br {
    display: none;
  }
}

/* --- OUTDOOR/MOBILE OPTIMIZATIONS --- */
/* High contrast mode for bright sunlight readability */
@media (max-width: 767px) {
    /* Increase base font size for outdoor readability */
    body {
        font-size: 16px;
    }

    /* Make all text more readable */
    .text-muted {
        color: #5a6268 !important; /* Darker than default for better contrast */
    }

    /* Larger, bolder headings */
    h1, .display-4 {
        font-weight: 700;
        font-style: normal; /* Remove italic for better outdoor readability */
    }

    /* Memorial page - ensure readability */
    .memorial-header-name {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.3;
    }

    /* Larger tap targets for cemetery use (gloves, cold hands) */
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .btn-lg {
        min-height: 56px;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    /* Card menu items - larger touch targets */
    .card-menu-item {
        padding: 1.25rem;
        min-height: 60px;
    }

    .card-menu-title {
        font-size: 1.15rem;
        font-weight: 600;
    }

    /* Scout mode specific - larger elements */
    .scout-cta .btn {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        min-height: 56px;
    }
}

/* Extra high contrast for very bright conditions (optional class) */
.high-contrast-mode {
    --primary-color: #004445;
    --secondary-color: #1a1a1a;
}

.high-contrast-mode .text-muted {
    color: #3d4852 !important;
}

.high-contrast-mode body {
    background-color: #fff;
}

/* ============================================
   MOBILE-FIRST HOMEPAGE REDESIGN
   ============================================ */

/* Hero Section - Mobile First */
.home-hero-mobile {
    background: linear-gradient(135deg, var(--bg-cream) 0%, #f0ede8 50%, var(--bg-warm) 100%);
    padding: 2rem 1.25rem 2.5rem;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Subtle decorative element */
.home-hero-mobile::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 95, 96, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #005F60;
    color: #ffffff;
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 95, 96, 0.25);
    letter-spacing: 0.2px;
}

.hero-badge i {
    color: #ff6b6b;
    font-size: 0.9rem;
}

.hero-headline {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-style: normal;
    letter-spacing: -0.5px;
}

.hero-highlight {
    color: var(--primary);
    display: block;
}

.hero-subtext {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-cta-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn-hero-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 95, 96, 0.3);
}

.btn-hero-primary:hover {
    background: var(--primary-color-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 95, 96, 0.4);
}

.btn-hero-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

.hero-trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #666;
}

.trust-item i {
    color: #27ae60;
    font-size: 0.9rem;
}

/* Hero Dual Path Cards */
.hero-dual-paths {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 600px) {
    .hero-dual-paths {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

.hero-path-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.hero-path-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
    color: var(--text-primary);
}

.hero-path-card .path-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.hero-path-card .path-icon.memorial {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.hero-path-card .path-icon.legacy {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8942e 100%);
    color: white;
}

.hero-path-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.hero-path-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.hero-path-card .path-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-path-card:hover .path-cta {
    gap: 0.75rem;
}

.hero-path-card:nth-child(2) .path-cta {
    color: var(--accent-gold);
}

/* Scout Highlight Section */
.scout-highlight-section {
    padding: var(--space-3xl) var(--space-lg);
    background: linear-gradient(135deg, #0a1628 0%, #132238 50%, #1a3050 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.scout-highlight-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 209, 197, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.scout-highlight-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.scout-highlight-section .container {
    position: relative;
    z-index: 1;
}

.scout-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(79, 209, 197, 0.15);
    color: #4fd1c5;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 209, 197, 0.25);
}

.scout-highlight-badge i {
    font-size: 0.85rem;
}

.scout-highlight-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.scout-highlight-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.scout-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.scout-feature {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.scout-feature:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(79, 209, 197, 0.3);
    transform: translateY(-3px);
}

.scout-feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #4fd1c5 0%, #38b2ac 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(79, 209, 197, 0.25);
}

.scout-feature-icon.wanted {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    box-shadow: 0 8px 20px rgba(246, 173, 85, 0.25);
}

.scout-feature-icon.points {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.scout-feature h4 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.scout-feature p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.scout-highlight-cta {
    margin-top: 0.5rem;
}

.btn-scout-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #4fd1c5 0%, #38b2ac 100%);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(79, 209, 197, 0.35);
}

.btn-scout-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(79, 209, 197, 0.45);
    color: #fff;
}

.btn-scout-primary i {
    transition: transform 0.3s ease;
}

.btn-scout-primary:hover i {
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .scout-highlight-section {
        padding: 4rem 2rem;
    }

    .scout-highlight-title {
        font-size: 2.25rem;
    }

    .scout-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 2.5rem;
    }
}

/* Steps Section */
.steps-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-cream);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.steps-timeline {
    position: relative;
    padding-left: 2rem;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent-gold));
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    margin-left: -1rem;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Featured Section */
.featured-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

/* Search Section */
.search-section {
    padding: var(--space-xl) 0;
    background: var(--bg-cream);
}

/* Prominent Search Section */
.search-section-prominent {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.search-header {
    margin-bottom: var(--space-lg);
}

.search-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.5rem 0;
}

.search-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin: 0;
}

.search-section-prominent .search-wrapper {
    max-width: 550px;
    margin: 0 auto;
}

.search-section-prominent .search-input {
    padding: 1.1rem 3rem 1.1rem 3rem;
    font-size: 1.05rem;
    border: none;
    box-shadow: var(--shadow-lg);
}

.search-section-prominent .search-input:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), var(--shadow-lg);
}

@media (max-width: 768px) {
    .search-section-prominent {
        padding: var(--space-xl) 0;
    }

    .search-title {
        font-size: 1.5rem;
    }
}

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 2.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 50px;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 95, 96, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-cream);
}

.search-result-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-warm);
    flex-shrink: 0;
}

.search-result-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-dates {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.search-loading {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Recent Memorials Section */
.recent-memorials-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
    position: relative;
}

.recent-memorials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-light) 50%, transparent 100%);
}

.recent-memorials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .recent-memorials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.recent-memorial-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.recent-memorial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 95, 96, 0.12);
    border-color: rgba(0, 95, 96, 0.1);
    text-decoration: none;
    color: inherit;
}

.recent-memorial-photo {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    background: var(--bg-cream);
    overflow: hidden;
}

.recent-memorial-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-memorial-photo.no-photo {
    background: linear-gradient(135deg, #f8f6f3 0%, #ebe7e0 100%);
}

.memorial-placeholder-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    opacity: 0.4;
}

.memorial-placeholder-logo img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.recent-memorial-info {
    padding: var(--space-md);
    text-align: center;
}

.recent-memorial-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-memorial-dates {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Map Section */
.map-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-cream) 100%);
}

.map-container-home {
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--bg-white);
}

/* Final CTA Section */
.final-cta-section {
    padding: var(--space-3xl) var(--space-lg);
    background: linear-gradient(135deg, var(--primary) 0%, #003d3e 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.3px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

.btn-cta-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-white);
    color: var(--primary);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cta-light:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.final-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #fff;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

@media (min-width: 576px) {
    .final-cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Desktop Adjustments */
@media (min-width: 768px) {
    .home-hero-mobile {
        padding: 4rem 2rem;
    }

    .hero-headline {
        font-size: 2.75rem;
    }

    .hero-cta-stack {
        flex-direction: row;
        justify-content: center;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 1rem 2rem;
    }

    .value-cards-section .container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .value-card {
        margin-bottom: 0;
    }

    .steps-timeline {
        display: flex;
        justify-content: center;
        gap: 3rem;
        padding-left: 0;
    }

    .steps-timeline::before {
        display: none;
    }

    .step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 200px;
    }

    .step-number {
        margin-left: 0;
        margin-bottom: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .map-container-home {
        height: 450px;
    }

    .section-title {
        font-size: 2rem;
    }

    .final-cta-section {
        padding: 4rem 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

/* ============================================
   SHARED PAGE STYLES
   ============================================ */

.page-wrapper {
    background: var(--bg-cream);
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
}

.page-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-sm);
}

.page-hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero badge on dark page-hero backgrounds */
.page-hero .hero-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================
   HOW IT WORKS PAGE
   ============================================ */

.hiw-steps-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-cream);
}

.hiw-step {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.hiw-step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hiw-step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.hiw-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.hiw-step-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.hiw-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg) 0;
}

.hiw-checklist li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.hiw-checklist li i {
    color: #27ae60;
    font-size: 0.85rem;
}

.hiw-step-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-warm) 100%);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.hiw-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
}

.hiw-icon-box.accent {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm));
}

.hiw-step-visual span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hiw-cta-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Features Section */
.hiw-features-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-warm);
}

.hiw-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.hiw-feature-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.hiw-feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin: 0 auto var(--space-md);
}

.hiw-feature-icon.accent {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm));
}

.hiw-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.hiw-feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   PRICING PAGE
   ============================================ */

.pricing-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-cream);
}

.pricing-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.pricing-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card-header {
    text-align: center;
    margin-bottom: var(--space-md);
    padding-top: var(--space-xs);
}

.pricing-card-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.pricing-tier-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pricing-card-price {
    text-align: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.pricing-card-price .price {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-card-price .period {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-includes {
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg) 0;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.pricing-features li i {
    color: #27ae60;
    margin-top: 0.15rem;
}

.pricing-btn {
    width: 100%;
}

/* QR Upsell */
.qr-upsell-section {
    padding: var(--space-2xl) 0 var(--space-3xl);
    background: var(--bg-warm);
}

.qr-upsell-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.qr-upsell-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    margin: 0 auto var(--space-md);
}

.qr-upsell-content {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.qr-upsell-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.qr-upsell-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.qr-upsell-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.qr-upsell-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}

.qr-upsell-features li i {
    color: #27ae60;
}

.qr-upsell-price {
    text-align: center;
}

.qr-upsell-price .price {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.qr-upsell-price .period {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

/* ============================================
   GET STARTED PAGE - Simplified
   ============================================ */

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* .hero-badge is defined earlier in mobile-first homepage section */

/* Features Grid */
.features-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-cream);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Steps Container */
.steps-container {
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    position: relative;
}

.step:last-child {
    margin-bottom: 0;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 44px;
    bottom: -24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent-gold));
}

.step .step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.step .step-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.step .step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* QR Tag Section */
.qr-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-warm);
}

.qr-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .qr-card {
        flex-direction: row;
    }
}

.qr-card-content {
    flex: 1;
    padding: var(--space-xl);
}

.qr-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.qr-card-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
}

.qr-card-content > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 var(--space-md) 0;
}

.qr-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg) 0;
}

.qr-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.qr-features li i {
    color: var(--primary);
}

.qr-price {
    margin-bottom: var(--space-md);
}

.qr-price .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.qr-price .price-note {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.qr-card-visual {
    flex: 0 0 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

@media (max-width: 767px) {
    .qr-card-visual {
        padding: var(--space-lg);
    }
}

.qr-mockup {
    text-align: center;
    color: #fff;
}

.qr-mockup i {
    font-size: 4rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.qr-mockup span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Trust Section */
.trust-section {
    padding: var(--space-xl) 0;
    background: var(--bg-cream);
    border-top: 1px solid var(--border-light);
}

.trust-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg) var(--space-xl);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.trust-item i {
    color: var(--primary);
    font-size: 1rem;
}

/* ============================================
   SCOUT PAGE
   ============================================ */

.scout-info-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-cream);
}

.scout-info-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.scout-info-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.scout-info-icon.accent {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm));
}

.scout-info-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
}

.scout-info-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

.scout-benefits-section {
    padding: var(--space-2xl) 0 var(--space-3xl);
    background: var(--bg-warm);
}

.scout-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.scout-benefit {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.scout-benefit i {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
    display: block;
}

.scout-benefit span {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================
   QR TAG INFO PAGE STYLES
   ============================================ */

.qr-info-section {
    padding: 2rem 0;
}

.qr-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.qr-feature-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.qr-feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.qr-feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.qr-feature-icon.accent {
    background: var(--accent-color);
}

.qr-feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.qr-feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted-dark);
    margin: 0;
    line-height: 1.5;
}

.qr-price-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.qr-price-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.qr-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.qr-price-details {
    color: var(--text-muted-light);
    font-size: 0.9rem;
}

.memorial-select-section {
    padding: 2rem 0 3rem;
    background: var(--light-gray);
}

.memorial-select-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.memorial-select-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.memorial-select-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: inherit;
    text-decoration: none;
}

.memorial-select-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-gray);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memorial-select-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memorial-select-photo i {
    font-size: 1.5rem;
    color: #ccc;
}

.memorial-select-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.memorial-select-info h4 {
    font-size: 1rem;
    margin: 0;
    color: var(--secondary-color);
}

/* ============================================
   DESKTOP ADJUSTMENTS FOR PAGES
   ============================================ */

@media (min-width: 768px) {
    .page-hero {
        padding: 4rem 2rem;
    }

    .page-hero-title {
        font-size: 2.5rem;
    }

    .hiw-steps-section {
        padding: 3rem 0;
    }

    .hiw-step {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .hiw-step-visual {
        margin-bottom: 0;
    }

    .hiw-cta-btn {
        width: auto;
    }

    .hiw-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-section .container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        align-items: start;
    }

    .pricing-card {
        margin-bottom: 0;
    }

    .pricing-card.featured {
        transform: scale(1.05);
    }

    .qr-upsell-card {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 2rem;
        align-items: center;
        padding: 2rem;
    }

    .qr-upsell-icon {
        margin: 0;
    }

    .qr-upsell-content {
        text-align: left;
        margin-bottom: 0;
    }

    .qr-upsell-features {
        justify-content: flex-start;
    }

    .scout-info-section {
        padding: 3rem 0;
    }

    .scout-benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .qr-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .memorial-select-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scout-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .scout-badges-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .leaderboard-item {
        grid-template-columns: 60px 60px 1fr auto;
    }
}

/* ============================================
   SCOUT GAMIFICATION STYLES
   ============================================ */

.scout-stats-section {
    padding: 0 0 2rem;
    margin-top: -1rem;
}

.scout-stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.scout-level-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.scout-level-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scout-level-badge i {
    font-size: 1.75rem;
    color: white;
}

.scout-level-info h3 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem;
    color: var(--primary-color);
}

.scout-level-info p {
    margin: 0;
    color: var(--text-muted-dark);
    font-size: 0.9rem;
}

.scout-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.scout-stat {
    text-align: center;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.scout-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.scout-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scout-progress-section {
    margin-bottom: 1rem;
}

.scout-progress-bar {
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.scout-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.scout-progress-text {
    font-size: 0.85rem;
    color: var(--text-muted-dark);
    margin: 0;
    text-align: center;
}

.scout-leaderboard-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Scout Badges Card */
.scout-badges-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.scout-badges-card h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--primary-color);
}

.scout-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.scout-badge {
    position: relative;
    text-align: center;
    padding: 0.5rem;
}

.scout-badge.locked {
    opacity: 0.4;
}

.scout-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    box-shadow: 0 2px 8px rgba(0,95,96,0.3);
}

.scout-badge.locked .scout-badge-icon {
    background: #ccc;
    box-shadow: none;
}

.scout-badge-icon i {
    font-size: 1.25rem;
    color: white;
}

.scout-badge-name {
    font-size: 0.7rem;
    color: var(--secondary-color);
    display: block;
    line-height: 1.2;
}

.scout-badge-lock {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.6rem;
    color: #999;
}

/* ============================================
   LEADERBOARD STYLES
   ============================================ */

.leaderboard-user-section {
    padding: 0 0 1rem;
    margin-top: -1rem;
}

.leaderboard-user-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.leaderboard-user-rank {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.leaderboard-user-info {
    flex: 1;
}

.leaderboard-user-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: white;
}

.leaderboard-user-info p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.leaderboard-section {
    padding: var(--space-md) 0 var(--space-2xl);
    background: var(--bg-cream);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.leaderboard-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: grid;
    grid-template-columns: 50px 50px 1fr;
    gap: var(--space-sm);
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #c0c0c0;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
    border: 2px solid #cd7f32;
}

.leaderboard-rank {
    text-align: center;
}

.leaderboard-rank i {
    font-size: 1.5rem;
}

.leaderboard-item.rank-1 .leaderboard-rank i {
    color: #ffc107;
}

.leaderboard-item.rank-2 .leaderboard-rank i {
    color: #c0c0c0;
}

.leaderboard-item.rank-3 .leaderboard-rank i {
    color: #cd7f32;
}

.leaderboard-rank span {
    font-weight: 700;
    color: var(--text-muted-dark);
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-avatar i {
    font-size: 1.25rem;
    color: white;
}

.leaderboard-info {
    min-width: 0;
}

.leaderboard-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-level {
    font-size: 0.8rem;
    font-weight: 500;
}

.leaderboard-stats {
    text-align: right;
}

.leaderboard-points {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.leaderboard-details {
    font-size: 0.75rem;
    color: var(--text-muted-dark);
}

.leaderboard-cta-section {
    padding: var(--space-md) 0 var(--space-2xl);
}

/* ============================================
   AUTH PAGES (Login/Signup)
   ============================================ */

.auth-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-cream);
}

.auth-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

.auth-divider {
    text-align: center;
    margin: var(--space-lg) 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    background: var(--bg-white);
    padding: 0 var(--space-md);
    position: relative;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-hr {
    border-color: var(--border-light);
    margin: var(--space-xl) 0;
}

.auth-helper-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
}

.auth-privacy-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

.auth-privacy-text a {
    color: var(--primary);
    text-decoration: none;
}

.auth-privacy-text a:hover {
    text-decoration: underline;
}

.auth-benefits {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
}

.auth-benefit-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.auth-benefit-item i {
    color: #27ae60;
    font-size: 0.9rem;
}

.auth-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}

.auth-link span {
    color: var(--primary);
    font-weight: 600;
}

.auth-link:hover {
    color: var(--primary);
}

/* Form Control Improvements */
.form-control {
    border-color: var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 95, 96, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================
   ORDER TAG PAGE
   ============================================ */

.order-tag-page {
    background: var(--bg-cream);
    padding: var(--space-2xl) 0 var(--space-3xl);
}

.order-features-section {
    margin-bottom: var(--space-2xl);
}

.order-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .order-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.order-feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.order-feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto var(--space-md);
}

.order-feature-icon.accent {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm));
}

.order-feature-card h5 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.order-feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.order-details-section {
    margin-bottom: var(--space-2xl);
}

.order-section-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.order-section-title i {
    color: var(--primary);
}

.order-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-checklist li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.order-checklist li i {
    color: #27ae60;
    font-size: 0.85rem;
}

.order-guarantee-card {
    background: linear-gradient(135deg, rgba(0, 95, 96, 0.05) 0%, rgba(0, 95, 96, 0.1) 100%);
    border: 1px solid rgba(0, 95, 96, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.order-guarantee-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.order-guarantee-content h5 {
    color: var(--primary);
    font-weight: 700;
    margin: 0 0 var(--space-xs) 0;
}

.order-guarantee-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.order-shipping-info h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.order-shipping-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.order-secure-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: var(--space-sm) 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.order-summary-card {
    background: var(--bg-white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.order-summary-header {
    background: var(--primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
}

.order-summary-header h5 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
}

.order-summary-body {
    padding: var(--space-lg);
}

.order-summary-item h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin: 0 0 var(--space-xs) 0;
}

.order-memorial-name {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 var(--space-xs) 0;
}

.order-item-details {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

.order-summary-body hr {
    border-color: var(--border-light);
    margin: var(--space-md) 0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
}

.order-summary-row.order-total {
    margin-bottom: 0;
}

.order-summary-row.order-total strong {
    color: var(--primary);
}

.order-free-shipping {
    color: #27ae60;
    font-weight: 600;
}

.order-trust-badges {
    margin-top: var(--space-lg);
    text-align: center;
}

.order-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.order-trust-item i {
    color: #27ae60;
}

.order-faq-section {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-2xl);
    margin-top: var(--space-lg);
}

.order-faq-title {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

.order-faq-item h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.order-faq-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* ===== PARTNER/AFFILIATE PAGE STYLES ===== */

/* Partner Benefits Section */
.partner-benefits-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-warm);
}

.partner-benefits-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .partner-benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.partner-benefit-card {
    background: var(--bg-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.partner-benefit-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto var(--space-md);
}

.partner-benefit-icon.accent {
    background: var(--accent-light);
    color: var(--accent-color);
}

.partner-benefit-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.partner-benefit-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Partner Signup Section */
.partner-signup-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-cream);
}

.partner-signup-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
}

.partner-signup-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.partner-signup-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.partner-signup-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* Partner Success Message */
.partner-success-message {
    text-align: center;
    padding: var(--space-xl);
}

.partner-success-message .success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: var(--space-lg);
}

.partner-success-message h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.referral-code-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-cream);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    display: inline-block;
    font-family: monospace;
    letter-spacing: 2px;
}

.referral-link-box {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
}

.referral-link-box .form-control {
    font-family: monospace;
    font-size: 0.85rem;
}

/* Partner Why Section */
.partner-why-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.partner-why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

@media (min-width: 768px) {
    .partner-why-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.partner-why-item {
    text-align: center;
    padding: var(--space-lg);
}

.partner-why-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.partner-why-item h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.partner-why-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

/* Partner FAQ Section */
.partner-faq-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-warm);
}

.partner-faq-item {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.partner-faq-item h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.partner-faq-item p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ===== PARTNER DASHBOARD STYLES ===== */

.partner-dashboard-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-cream);
    min-height: 70vh;
}

.partner-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .partner-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.partner-stat-card {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.partner-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.partner-stat-value.success {
    color: var(--success);
}

.partner-stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: var(--space-xs);
}

.partner-referral-box {
    background: var(--bg-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-xl);
}

.partner-referral-box h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: var(--space-md);
}

.partner-materials-box {
    background: var(--bg-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-xl);
}

.partner-materials-box h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: var(--space-sm);
}

.materials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.materials-grid .btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
}

.materials-grid .btn i {
    font-size: 1.2rem;
}

@media (max-width: 576px) {
    .materials-grid {
        flex-direction: column;
    }
    .materials-grid .btn {
        width: 100%;
        justify-content: center;
    }
}

.partner-referrals-table {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.partner-referrals-table h4 {
    font-family: 'Playfair Display', serif;
    padding: var(--space-lg);
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.partner-referrals-table table {
    width: 100%;
    margin: 0;
}

.partner-referrals-table th {
    background: var(--bg-warm);
    padding: var(--space-md);
    font-weight: 600;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.partner-referrals-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.partner-referrals-table .badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.partner-referrals-table .badge-success {
    background: var(--success-light);
    color: var(--success);
}

.partner-referrals-table .badge-pending {
    background: var(--warning-light);
    color: var(--warning);
}

/* ===== ORDER SUCCESS PAGE STYLES ===== */

.success-hero {
    background: linear-gradient(135deg, var(--success) 0%, #218838 100%);
}

.success-icon-large {
    font-size: 5rem;
    color: #fff;
    margin-bottom: var(--space-lg);
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.order-success-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-cream);
}

.success-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.success-card-header {
    background: var(--bg-warm);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.success-card-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.success-card-header h3 i {
    color: var(--primary);
}

.success-card-body {
    padding: var(--space-lg);
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
}

.success-detail-row .detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.success-detail-row .detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.success-detail-row.total {
    padding-top: var(--space-md);
}

.success-detail-row.total .detail-value {
    font-size: 1.25rem;
    color: var(--success);
}

/* Shipping Timeline */
.shipping-timeline {
    margin-top: var(--space-lg);
}

.order-timeline .timeline-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    opacity: 0.5;
}

.order-timeline .timeline-item.active {
    opacity: 1;
}

.order-timeline .timeline-item.active .timeline-icon {
    background: var(--success);
    color: #fff;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-warm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.timeline-content strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.timeline-content span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Next Steps */
.next-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.next-step-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-cream);
    border-radius: var(--radius-md);
}

.next-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.next-step-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.next-step-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Success Actions */
.success-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (min-width: 576px) {
    .success-actions {
        flex-direction: row;
    }
    .success-actions .btn {
        flex: 1;
    }
}

.success-support {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.success-support a {
    color: var(--primary);
}

/* ===== WHOLESALE PAGE STYLES ===== */

.wholesale-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.wholesale-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-cream);
}

.wholesale-pricing-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .wholesale-pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wholesale-pricing-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: var(--transition-base);
}

.wholesale-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.wholesale-pricing-card.featured {
    border: 2px solid var(--primary);
}

.wholesale-pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
}

.wholesale-tier-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.wholesale-quantity {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.wholesale-quantity span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.wholesale-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: var(--space-md) 0;
}

.wholesale-price span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.wholesale-savings {
    background: var(--success-light);
    color: var(--success);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: inline-block;
}

.wholesale-features {
    text-align: left;
    margin: var(--space-lg) 0;
}

.wholesale-features li {
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wholesale-features li i {
    color: var(--success);
    margin-right: var(--space-sm);
}

/* Wholesale Application Form */
.wholesale-form-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
}

.wholesale-form-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.wholesale-form-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.wholesale-form-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   MEMORIAL PAGE - TABBED INTERFACE
   ============================================ */

/* Memorial Tabs Container */
.memorial-tabs-container {
    background: var(--bg-cream);
    padding: 0 0 2rem;
    min-height: 400px;
}

/* Tab Navigation */
.memorial-nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    border: none;
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.memorial-nav-tabs::-webkit-scrollbar {
    display: none;
}

.memorial-nav-tabs .nav-item {
    flex-shrink: 0;
}

.memorial-nav-tabs .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
    position: relative;
    white-space: nowrap;
}

.memorial-nav-tabs .nav-link i {
    font-size: 1.25rem;
}

.memorial-nav-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(0, 95, 96, 0.05);
}

.memorial-nav-tabs .nav-link.active {
    color: var(--primary);
    background: rgba(0, 95, 96, 0.1);
    box-shadow: none;
}

.memorial-nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Tab Badge */
.tab-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc3545;
    color: white;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Tab Content */
.memorial-tab-content {
    background: var(--bg-white);
    border-radius: 0 0 16px 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.memorial-tab-content > .tab-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Memorial Content Cards */
.memorial-content-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
}

.memorial-content-card .content-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-cream);
}

.memorial-content-card .content-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.memorial-content-card .content-card-header h5 i {
    color: var(--primary);
}

.memorial-content-card .content-card-body {
    padding: 1.25rem;
}

/* Bio card specific styling */
#bio-card .card-body,
#bio-card.memorial-content-card {
    background: var(--bg-white);
}

#bio-card .card-body {
    padding: 1.5rem;
}

#bio-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

#bio-card .card-title i {
    color: var(--primary);
}

/* Timeline card in tabs */
#timeline-card .card-body {
    padding: 1.5rem;
}

/* Gallery in tabs */
#gallery-card .card-body {
    padding: 1.25rem;
}

#gallery-card .row {
    margin: -0.25rem;
}

#gallery-card .col-4,
#gallery-card .col-md-3 {
    padding: 0.25rem;
}

/* Family cards in tabs */
#family-card .card-body {
    padding: 1.25rem;
}

/* Map cards in tabs */
#map-card .card-body {
    padding: 1.25rem;
}

/* Mobile Tab Styles */
@media (max-width: 767px) {
    .memorial-nav-tabs {
        justify-content: flex-start;
        padding: 0.5rem 0.75rem;
        gap: 0.15rem;
        top: 60px;
    }

    .memorial-nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .memorial-nav-tabs .nav-link i {
        font-size: 1.1rem;
    }

    .memorial-nav-tabs .nav-link span {
        display: block;
    }

    .memorial-tab-content {
        padding: 1rem;
        border-radius: 0 0 12px 12px;
    }

    .memorial-content-card .content-card-header {
        padding: 0.875rem 1rem;
    }

    .memorial-content-card .content-card-body {
        padding: 1rem;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991px) {
    .memorial-nav-tabs .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Desktop - horizontal tabs with text */
@media (min-width: 992px) {
    .memorial-tabs-container .container {
        max-width: 900px;
    }

    .memorial-nav-tabs {
        gap: 0.5rem;
    }

    .memorial-nav-tabs .nav-link {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .memorial-nav-tabs .nav-link i {
        font-size: 1rem;
    }

    .memorial-tab-content {
        padding: 2rem;
    }
}

/* Memorial Page Header - Improved */
.memorial-page-header {
    padding: 2.5rem 0;
    background: linear-gradient(180deg, #fff 0%, var(--bg-cream) 100%);
    border-bottom: none;
}

.memorial-header-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

/* Main photo styling */
#display-main-media {
    margin-bottom: 1.5rem;
}

#display-main-media img {
    max-width: 320px;
    max-height: 320px;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
    border: 4px solid #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Engagement section improvements */
#engagement-section {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 193, 7, 0.06);
    border: 1px solid rgba(255, 193, 7, 0.15);
}

/* Scrolly Section - Desktop Grid */
@media (min-width: 992px) {
    .scrolly-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    /* Full-width cards */
    .scrolly-section #bio-card,
    .scrolly-section #timeline-card,
    .scrolly-section #tributes-card,
    .scrolly-section #voice-recordings-card,
    .scrolly-section #residences-map-card {
        grid-column: 1 / -1;
    }
}

/* Card improvements */
.scrolly-section .card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.scrolly-section .card:hover {
    transform: none; /* Disable hover transform for memorial cards */
    box-shadow: var(--shadow-sm);
}

.scrolly-section .card-body {
    padding: 1.5rem;
}

.scrolly-section .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.scrolly-section .card-title i {
    color: var(--primary);
}

/* Map cards improvements */
#residences-map-card .card-body,
#map-card .card-body {
    padding: 1.25rem;
}

#residences-map-container,
#cemetery-map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

/* Visitor CTA Section */
#visitor-cta-section {
    padding: 2.5rem 0;
}

#visitor-cta-section .card {
    border-radius: 20px;
    overflow: hidden;
}

/* Mobile Memorial Page Styles */
@media (max-width: 767px) {
    .memorial-page-header {
        padding: 1.5rem 0 2rem;
    }

    .memorial-header-name {
        font-size: 1.75rem;
        padding: 0 1rem;
    }

    #display-main-media img {
        max-width: 200px;
        max-height: 200px;
        border-width: 3px;
    }

    #display-dates {
        font-size: 1rem;
    }

    /* Stack action buttons better on mobile */
    .memorial-page-header .d-flex.gap-2 {
        flex-wrap: wrap;
        justify-content: center;
    }

    .memorial-page-header .d-flex.gap-2 .btn {
        min-width: 120px;
    }

    #engagement-section {
        margin: 0 1rem;
        padding: 1rem;
    }

    .engagement-stats {
        gap: 1.5rem !important;
    }

    /* Mobile scrolly section */
    .scrolly-section {
        padding: 0 0.75rem;
    }

    .scrolly-section .card-body {
        padding: 1.25rem;
    }

    .scrolly-section .card-title {
        font-size: 1.05rem;
    }

    /* Mobile map height */
    #residences-map-container,
    #cemetery-map-container {
        height: 280px !important;
    }

    /* Visitor CTA - mobile */
    #visitor-cta-section {
        padding: 1.5rem 0;
    }

    #visitor-cta-section .card-body {
        padding: 2rem 1.5rem !important;
    }

    #visitor-cta-section h3 {
        font-size: 1.25rem;
    }

    #visitor-cta-section .lead {
        font-size: 1rem;
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .memorial-header-name {
        font-size: 2.25rem;
    }

    #display-main-media img {
        max-width: 280px;
        max-height: 280px;
    }

    .scrolly-section {
        max-width: 720px;
        margin: 0 auto;
    }
}

/* Large desktop - wider layout */
@media (min-width: 1200px) {
    .memorial-page-header .container {
        max-width: 900px;
    }

    #display-main-media img {
        max-width: 360px;
        max-height: 360px;
    }

    .memorial-header-name {
        font-size: 2.75rem;
    }
}

/* ============================================
   MEMORIAL BOOK ORDER PAGE STYLES
   ============================================ */

.order-book-page {
    padding: 2rem 0 4rem;
}

/* 3D Book Preview */
.book-preview-section {
    margin-bottom: 2rem;
}

.book-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.book-3d-wrapper {
    perspective: 1000px;
    margin-bottom: 1rem;
}

.book-3d {
    position: relative;
    width: 280px;
    height: 380px;
    transform-style: preserve-3d;
    transform: rotateY(-15deg);
    transition: transform 0.5s ease;
}

.book-3d:hover {
    transform: rotateY(-30deg);
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    border-radius: 0 8px 8px 0;
    box-shadow:
        5px 5px 20px rgba(0, 0, 0, 0.4),
        inset -2px 0 10px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backface-visibility: hidden;
    border-left: 4px solid #c9a227;
}

.book-spine {
    position: absolute;
    left: -20px;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, #0f0f1a, #1a1a2e);
    transform: rotateY(90deg);
    transform-origin: right;
    border-radius: 4px 0 0 4px;
}

.book-cover-photo {
    width: 140px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(201, 162, 39, 0.5);
}

.book-cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-photo .cover-placeholder {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.book-cover-text {
    text-align: center;
    color: #fff;
}

.book-cover-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: #c9a227;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.book-cover-dates {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.book-preview-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Cover Template Styles */
.book-3d.template-classic .book-cover {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    border-left-color: #c9a227;
}

.book-3d.template-modern .book-cover {
    background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 50%, #e8e8e8 100%);
    border-left-color: #005F60;
}

.book-3d.template-modern .book-cover-name {
    color: #005F60;
}

.book-3d.template-modern .book-cover-dates {
    color: #666;
}

.book-3d.template-modern .book-spine {
    background: linear-gradient(90deg, #e8e8e8, #ffffff);
}

.book-3d.template-nature .book-cover {
    background: linear-gradient(145deg, #2d4a3e 0%, #1e352a 50%, #152419 100%);
    border-left-color: #8fbc8f;
}

.book-3d.template-nature .book-cover-name {
    color: #8fbc8f;
}

.book-3d.template-nature .book-spine {
    background: linear-gradient(90deg, #152419, #2d4a3e);
}

.book-3d.template-faith .book-cover {
    background: linear-gradient(145deg, #4a3c6e 0%, #352a52 50%, #241c38 100%);
    border-left-color: #d4af37;
}

.book-3d.template-faith .book-cover-name {
    color: #d4af37;
}

.book-3d.template-faith .book-spine {
    background: linear-gradient(90deg, #241c38, #4a3c6e);
}

/* Sample Pages Preview */
.sample-pages-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.sample-pages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .sample-pages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .sample-pages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.sample-page {
    text-align: center;
}

.sample-page-content {
    background: #fff;
    border-radius: 4px;
    aspect-ratio: 8.5/11;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
}

.sample-page-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Title Page Sample */
.sample-page-content.title-page {
    background: linear-gradient(145deg, #f8f6f0 0%, #fff 100%);
}

.sample-photo-placeholder {
    width: 60px;
    height: 75px;
    background: #e8e8e8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border: 2px solid #d0d0d0;
}

.sample-photo-placeholder i {
    font-size: 1.5rem;
    color: #999;
}

.sample-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.sample-dates {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.sample-subtitle {
    font-size: 0.6rem;
    color: #888;
    font-style: italic;
}

/* Bio Page Sample */
.sample-page-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.sample-text-lines {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sample-line {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    width: 100%;
}

.sample-line.short {
    width: 70%;
}

/* Gallery Page Sample */
.sample-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.sample-photo {
    aspect-ratio: 4/3;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.sample-photo i {
    font-size: 1rem;
    color: #bbb;
}

/* Timeline Page Sample */
.sample-timeline {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sample-timeline-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sample-year {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 30px;
}

.sample-timeline-item .sample-line {
    flex: 1;
    height: 4px;
}

/* Cover Template Selector */
.cover-template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.cover-template-option {
    cursor: pointer;
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.cover-template-option:hover {
    background: rgba(0, 95, 96, 0.1);
}

.cover-template-option.active {
    border-color: var(--primary);
    background: rgba(0, 95, 96, 0.1);
}

.template-preview {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.template-preview.template-classic {
    background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
    border-left: 3px solid #c9a227;
}

.template-preview.template-modern {
    background: linear-gradient(145deg, #ffffff, #e8e8e8);
    border-left: 3px solid #005F60;
}

.template-preview.template-nature {
    background: linear-gradient(145deg, #2d4a3e, #152419);
    border-left: 3px solid #8fbc8f;
}

.template-preview.template-faith {
    background: linear-gradient(145deg, #4a3c6e, #241c38);
    border-left: 3px solid #d4af37;
}

.cover-template-option span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cover-template-option.active span {
    color: var(--primary);
    font-weight: 600;
}

/* Book Sections Toggle List */
.book-sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 95, 96, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.book-section-toggle:hover {
    background: rgba(0, 95, 96, 0.1);
}

.book-section-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.book-section-toggle input[type="checkbox"]:disabled {
    opacity: 0.7;
}

.book-section-toggle .section-name {
    flex: 1;
    font-size: 0.95rem;
}

.book-section-toggle .section-name i {
    width: 20px;
    color: var(--primary);
    margin-right: 0.5rem;
}

.book-section-toggle .section-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.book-section-toggle .section-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--primary);
    color: white;
}

.book-section-toggle .section-badge.required {
    background: rgba(0, 95, 96, 0.2);
    color: var(--primary);
}

/* Upsell Banner */
.upsell-banner {
    margin-top: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(0, 95, 96, 0.1), rgba(0, 95, 96, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(0, 95, 96, 0.2);
    position: relative;
}

.upsell-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.upsell-banner h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.upsell-banner p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .book-preview-section .row {
        flex-direction: column;
    }

    .book-3d {
        width: 220px;
        height: 300px;
    }

    .book-cover-photo {
        width: 110px;
        height: 140px;
    }

    .book-cover-name {
        font-size: 1rem;
    }

    .cover-template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .book-3d {
        width: 180px;
        height: 250px;
    }

    .book-cover-photo {
        width: 90px;
        height: 115px;
    }

    .book-cover {
        padding: 1rem;
    }

    .book-cover-name {
        font-size: 0.9rem;
    }

    .book-cover-dates {
        font-size: 0.8rem;
    }
}

/* ============================================
   FAMILY NEARBY - Visitor Pinning Feature
   ============================================ */

.family-nearby-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    border: 1px solid var(--border-light);
    transition: var(--transition-base);
    height: 100%;
}

.family-nearby-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.family-nearby-card.needs-pin {
    border-color: #fbbf24;
    background: linear-gradient(to bottom, #fffbeb 0%, var(--bg-white) 100%);
}

.family-nearby-card.linked {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.family-nearby-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.family-nearby-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-warm) 0%, var(--bg-cream) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    border: 2px solid var(--border-light);
}

.family-nearby-info {
    flex: 1;
    min-width: 0;
}

.family-nearby-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-nearby-relation {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.family-nearby-dates {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.family-nearby-burial {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 2px;
}

.family-nearby-link {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 4px;
}

.family-pin-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
    margin-top: auto;
    white-space: nowrap;
}

.family-nearby-section {
    margin-bottom: var(--space-md);
}

/* Family nearby card in memorial page */
#family-nearby-card .content-card-header {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#family-nearby-card .content-card-body {
    padding: var(--space-md);
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .family-nearby-photo,
    .family-nearby-placeholder {
        width: 50px;
        height: 50px;
    }

    .family-nearby-name {
        font-size: 0.85rem;
    }

    .family-nearby-relation,
    .family-nearby-dates,
    .family-nearby-burial {
        font-size: 0.7rem;
    }

    .family-pin-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
}

/* ========================================
   LIVING LEGACY / PLAN YOUR LEGACY PAGE
======================================== */

/* Legacy Hero Section */
.legacy-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 50%, #3d5a80 100%);
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legacy-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.legacy-hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.legacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.legacy-badge i {
    color: #fbbf24;
}

.legacy-headline {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.legacy-highlight {
    color: #fbbf24;
}

.legacy-subtext {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.legacy-cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn-legacy-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a365d;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    transition: all 0.3s ease;
}

.btn-legacy-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
    color: #1a365d;
}

.btn-legacy-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-legacy-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

/* Legacy Features Section */
.legacy-features {
    padding: 4rem 1.5rem;
    background: #f8fafc;
}

.legacy-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.legacy-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.legacy-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.legacy-feature-card .feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3d5a80 0%, #1a365d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.legacy-feature-card .feature-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.legacy-feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.75rem;
}

.legacy-feature-card p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Legacy Timeline Section */
.legacy-timeline {
    padding: 4rem 1.5rem;
    background: #fff;
}

.timeline-steps {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: linear-gradient(to bottom, #3d5a80, #93c5fd);
}

.timeline-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3d5a80 0%, #1a365d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
}

.step-content {
    padding-top: 0.35rem;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.35rem;
}

.step-content p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Legacy Examples Section */
.legacy-examples {
    padding: 4rem 1.5rem;
    background: #f8fafc;
}

.examples-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.example-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #3d5a80;
}

.example-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.example-header i {
    font-size: 1.25rem;
    color: #3d5a80;
}

.example-type {
    font-weight: 600;
    color: #1a365d;
    font-size: 0.95rem;
}

.example-preview {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.example-delivery {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.example-delivery::before {
    content: '\f073';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
}

/* Legacy Security Section */
.legacy-security {
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    text-align: center;
}

.security-content {
    max-width: 600px;
    margin: 0 auto;
}

.security-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.security-icon i {
    font-size: 2rem;
    color: #93c5fd;
}

.legacy-security h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.legacy-security p {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.security-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.security-badge i {
    color: #fbbf24;
}

.security-badge span {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
}

/* Legacy Final CTA Section */
.legacy-final-cta {
    padding: 4rem 1.5rem;
    background: #fff;
    text-align: center;
}

.final-cta-content {
    max-width: 500px;
    margin: 0 auto;
}

.legacy-final-cta h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 0.75rem;
}

.legacy-final-cta > .container > .final-cta-content > p {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.btn-legacy-primary.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.15rem;
}

.cta-note {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 1rem;
}

/* Desktop Styles for Legacy Page */
@media (min-width: 768px) {
    .legacy-hero {
        padding: 6rem 2rem;
    }

    .legacy-headline {
        font-size: 3.5rem;
    }

    .legacy-subtext {
        font-size: 1.25rem;
    }

    .legacy-cta-group {
        flex-direction: row;
        justify-content: center;
    }

    .legacy-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-steps::before {
        left: 21px;
    }
}

@media (min-width: 992px) {
    .legacy-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .examples-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   MY LEGACY DASHBOARD
======================================== */

.my-legacy-page {
    min-height: 100vh;
    background: #f0f4f8;
}

.my-legacy-header {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
}

.legacy-header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0.75rem 0 0.5rem;
    font-style: italic;
}

.legacy-header-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    margin: 0;
}

.my-legacy-container {
    padding: 0 1rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Loading State */
.legacy-loading {
    text-align: center;
    padding: 4rem 1rem;
}

.legacy-loading p {
    color: #64748b;
    margin-top: 1rem;
}

/* Not Logged In State */
.not-logged-in-card {
    background: #fff;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: -2rem;
}

.not-logged-in-card > i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    display: block;
}

.not-logged-in-card h2 {
    font-size: 1.5rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.not-logged-in-card p {
    color: #64748b;
    margin-bottom: 2rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Profile Section - Hero Style */
.legacy-profile-section {
    margin-top: -2rem;
    margin-bottom: 1.5rem;
}

.profile-hero {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-photo-wrapper {
    flex-shrink: 0;
}

.profile-photo-wrapper img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

.profile-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e2e8f0;
}

.profile-photo-placeholder i {
    font-size: 2rem;
    color: #94a3b8;
}

.profile-details {
    flex: 1;
    min-width: 150px;
}

.profile-details h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 0.35rem;
}

.profile-dates {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-dates i {
    color: #94a3b8;
    font-size: 0.85rem;
}

.btn-edit-profile {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-edit-profile:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Dashboard Grid */
.legacy-dashboard-grid {
    display: grid;
    gap: 1rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon-wrap i {
    font-size: 1.25rem;
    color: #fff;
}

.story-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.messages-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.executor-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 0.5rem;
}

.card-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.card-status {
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
}

.status-badge.not-started {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.complete {
    background: #dcfce7;
    color: #166534;
}

.status-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f8fafc;
    color: #3d5a80;
    border: 2px solid #e2e8f0;
    padding: 0.7rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-card-action:hover {
    background: #3d5a80;
    border-color: #3d5a80;
    color: #fff;
}

/* Messages Preview List */
.messages-preview-list {
    margin-bottom: 0.5rem;
}

.messages-preview-list:empty {
    display: none;
}

/* Executor Status in Card */
.executor-status {
    font-size: 0.9rem;
}

.executor-status.not-set {
    color: #94a3b8;
    font-style: italic;
}

.executor-assigned {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.executor-assigned-avatar {
    width: 36px;
    height: 36px;
    background: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.executor-assigned-avatar i {
    color: #fff;
    font-size: 0.9rem;
}

.executor-assigned-info {
    flex: 1;
}

.executor-assigned-info strong {
    display: block;
    color: #166534;
    font-size: 0.9rem;
}

.executor-assigned-info span {
    font-size: 0.8rem;
    color: #15803d;
}

/* Message Items in Preview */
.message-preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    background: #fffbeb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.message-preview-item:last-child {
    margin-bottom: 0;
}

.message-preview-icon {
    width: 32px;
    height: 32px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-preview-icon i {
    color: #fff;
    font-size: 0.75rem;
}

.message-preview-info {
    flex: 1;
    min-width: 0;
}

.message-preview-info strong {
    display: block;
    font-size: 0.85rem;
    color: #92400e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-preview-info span {
    font-size: 0.75rem;
    color: #b45309;
}

/* Privacy Notice */
.legacy-privacy-notice {
    display: flex;
    gap: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.legacy-privacy-notice > i {
    color: #16a34a;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.legacy-privacy-notice strong {
    color: #166534;
    font-size: 0.9rem;
}

.legacy-privacy-notice p {
    color: #15803d;
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

/* Create CTA */
.create-cta-card {
    background: #fff;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.create-cta-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3d5a80 0%, #1a365d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.create-cta-icon i {
    font-size: 2rem;
    color: #fff;
}

.create-cta-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 1rem;
}

.create-cta-card p {
    color: #64748b;
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* Legacy Outline Button (on light background) */
.btn-legacy-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #3d5a80;
    padding: 0.75rem 1.5rem;
    border: 2px solid #3d5a80;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-legacy-outline-dark:hover {
    background: #3d5a80;
    color: #fff;
}

/* Modal Styles */
.executor-info {
    color: #64748b;
    margin-bottom: 1rem;
}

.executor-permissions {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.executor-permissions li {
    padding: 0.5rem 0;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.open-when-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.open-when-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: #fff;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.open-when-btn:hover {
    border-color: #3d5a80;
    color: #3d5a80;
}

.open-when-btn.selected {
    background: #3d5a80;
    border-color: #3d5a80;
    color: #fff;
}

/* Responsive */
@media (min-width: 640px) {
    .dashboard-card {
        flex-direction: row;
        align-items: flex-start;
    }

    .btn-card-action {
        width: auto;
        align-self: flex-start;
        margin-top: auto;
    }
}

@media (min-width: 768px) {
    .my-legacy-header {
        padding: 3rem 2rem 2.5rem;
    }

    .legacy-header-content h1 {
        font-size: 2.5rem;
    }

    .my-legacy-container {
        padding: 0 2rem 2rem;
    }

    .profile-hero {
        padding: 1.75rem 2rem;
    }

    .profile-photo-wrapper img,
    .profile-photo-placeholder {
        width: 100px;
        height: 100px;
    }

    .profile-details h2 {
        font-size: 1.75rem;
    }

    .legacy-dashboard-grid {
        gap: 1.25rem;
    }

    .dashboard-card {
        padding: 1.75rem;
    }
}

/* ========================================
   ACCEPT EXECUTOR PAGE
======================================== */

.accept-executor-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.accept-executor-page .container {
    max-width: 500px;
    width: 100%;
}

.executor-state {
    display: flex;
    justify-content: center;
}

.executor-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
}

.executor-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3d5a80 0%, #1a365d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.executor-icon i {
    font-size: 2rem;
    color: #fff;
}

.executor-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.executor-icon.error {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.executor-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 1rem;
}

.executor-card p {
    color: #64748b;
    margin-bottom: 1rem;
}

.invite-message {
    font-size: 1.1rem;
    color: #475569;
}

.invite-message strong {
    color: #1a365d;
}

.executor-responsibilities {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.executor-responsibilities h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.75rem;
}

.executor-responsibilities ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.executor-responsibilities li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: #475569;
}

.executor-responsibilities li i {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.invite-note {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

.executor-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (min-width: 400px) {
    .executor-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* ========================================
   EXECUTOR DASHBOARD
======================================== */

.executor-dashboard-page {
    min-height: 100vh;
    background: #f8fafc;
}

.executor-dashboard-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

.dashboard-header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 1rem 0 0.5rem;
}

.dashboard-header-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin: 0;
}

.executor-dashboard-container {
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.executor-empty-card {
    background: #fff;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.executor-empty-card > i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.executor-empty-card h2 {
    font-size: 1.5rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.executor-empty-card p {
    color: #64748b;
    margin-bottom: 1rem;
}

.executor-info-banner {
    display: flex;
    gap: 1rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.executor-info-banner > i {
    color: #059669;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.executor-info-banner strong {
    color: #065f46;
    font-size: 0.9rem;
}

.executor-info-banner p {
    color: #047857;
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

.legacies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legacy-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legacy-card.active {
    border-left: 4px solid #059669;
}

.legacy-card.activated {
    border-left: 4px solid #94a3b8;
    opacity: 0.8;
}

.legacy-card-photo {
    flex-shrink: 0;
}

.legacy-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.legacy-photo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legacy-photo-placeholder i {
    font-size: 1.75rem;
    color: #94a3b8;
}

.legacy-card-info {
    flex: 1;
}

.legacy-card-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 0.25rem;
}

.legacy-birth {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #ecfdf5;
    color: #059669;
}

.status-badge.activated {
    background: #f1f5f9;
    color: #64748b;
}

.activated-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0.5rem 0 0;
}

.legacy-card-actions {
    display: flex;
    align-items: center;
}

/* Activation Modal */
.activation-warning {
    background: #fef3c7;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.activation-warning i {
    color: #d97706;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activation-warning p {
    margin: 0;
    color: #92400e;
}

.activation-message {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.75rem;
}

.activation-effects {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.activation-effects li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    color: #475569;
    font-size: 0.9rem;
}

/* Desktop Styles */
@media (min-width: 576px) {
    .legacy-card {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .executor-dashboard-header {
        padding: 4rem 2rem 3rem;
    }

    .dashboard-header-content h1 {
        font-size: 2.5rem;
    }

    .executor-dashboard-container {
        padding: 2rem;
    }
}

/* ============================================
   GRAVESITE LOCATION EDITOR
============================================ */
.gravesite-status-card {
    background: var(--bg-warm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.gravesite-map-editor {
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
}

.gravesite-map-instructions {
    padding: 12px 16px;
    background: #e7f3ff;
    border-bottom: 1px solid #b6d4fe;
    color: #0a58ca;
    font-size: 0.9rem;
}

.gravesite-inline-map-container {
    position: relative;
    width: 100%;
    height: 350px;
}

.gravesite-inline-map {
    width: 100%;
    height: 100%;
}

.gravesite-center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    font-size: 40px;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.gravesite-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.gravesite-map-controls .btn {
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gravesite-map-controls .btn:hover {
    background: #f0f0f0;
}

.gravesite-map-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.gravesite-map-actions {
    display: flex;
    gap: 8px;
}

.gravesite-map-actions .btn {
    min-width: 100px;
}

/* ============================================
   MEMORIAL MAP COUNT TEXT
============================================ */
.memorial-count-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ============================================
   CEMETERY MAP POPUP STYLES
============================================ */
.cemetery-popup {
    min-width: 240px;
    max-width: 300px;
}

.cemetery-popup-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.5rem;
}

.cemetery-popup-header strong {
    font-size: 1rem;
    color: var(--primary);
}

.cemetery-popup-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cemetery-popup-list {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cemetery-popup-item {
    display: block;
    padding: 0.5rem 0.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.15s ease;
}

.cemetery-popup-item:last-child {
    border-bottom: none;
}

.cemetery-popup-item:hover {
    background-color: var(--bg-warm);
    color: var(--primary);
}

/* Scrollbar styling for cemetery popup */
.cemetery-popup-list::-webkit-scrollbar {
    width: 6px;
}

.cemetery-popup-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cemetery-popup-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cemetery-popup-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Override Mapbox popup styles for cemetery markers */
.mapboxgl-popup-content {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* Ensure popup stays on screen */
.mapboxgl-popup {
    max-width: 320px !important;
}

.mapboxgl-popup-anchor-bottom,
.mapboxgl-popup-anchor-bottom-left,
.mapboxgl-popup-anchor-bottom-right {
    max-height: calc(100vh - 100px);
}

.mapboxgl-popup-anchor-top,
.mapboxgl-popup-anchor-top-left,
.mapboxgl-popup-anchor-top-right {
    max-height: calc(100vh - 100px);
}

/* Adjust cemetery popup list height based on viewport */
@media (max-height: 600px) {
    .cemetery-popup-list {
        max-height: 150px;
    }
}

@media (max-height: 500px) {
    .cemetery-popup-list {
        max-height: 120px;
    }
}