/* ==========================================================================
   1. BASE & GENERIC STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. REUSABLE COMPONENTS (Buttons, Forms, etc.)
   ========================================================================== */
.btn {
    background: #5a8a6f;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #4a7359;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f7fafc;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #5a8a6f;
    box-shadow: 0 0 0 3px rgba(90, 138, 111, 0.1);
    background: white;
}

.language-selector select {
    appearance: none;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* ==========================================================================
   3. LAYOUT (Navbar, Footer)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #5a8a6f;
    font-weight: 600;
    font-size: 1.2rem;
}

.logo-img {
    width: 60px;
    height: 60px;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s;
    margin: 0 1.25rem;
}

.nav-links a:hover {
    color: #5a8a6f;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

footer {
    text-align: center;
    color: #4a5568;
    font-size: 0.9rem;
    padding: 2rem;
    background: #faf6f1;
}

footer a {
    color: #5a8a6f;
    text-decoration: none;
}

/* ==========================================================================
   4. PAGE-SPECIFIC STYLES
   ========================================================================== */

/* --- Hero Section (Homepage, Contact, etc.) --- */
.hero {
    text-align: center;
    padding: 4rem 20px;
    background: linear-gradient(135deg, #5a8a6f 0%, #d97757 100%);
    color: white;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; font-weight: 700; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; max-width: 800px; margin-left: auto; margin-right: auto;}

.hero .btn-get-started { background: #139638; color: #ffffff; }


/* --- Features & Offerings Page --- */
.features, .offerings, .steps-section {
    padding: 4rem 0;
    background: #faf6f1;
}
.features h2, .offerings h2, .steps-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; color: #2d3748; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { text-align: center; padding: 2rem; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); background: white; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: #5a8a6f; }

.offerings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.offering-card { background: #faf6f1; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.offering-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.12); }
.offering-card h3 { font-size: 2rem; margin-bottom: 1rem; color: #5a8a6f; font-weight: 700; }
.offering-card .price { font-size: 2.5rem; font-weight: 700; color: #2d3748; margin-bottom: 1.5rem; }
.offering-card ul { list-style: none; padding: 0; margin-bottom: 2rem; text-align: left; }
.offering-card ul li { font-size: 1.1rem; color: #4a5568; margin-bottom: 0.8rem; position: relative; padding-left: 28px; }
.offering-card ul li::before { content: '✓'; color: #48bb78; position: absolute; left: 0; font-weight: bold; }

.steps-section { background-color: #f8fafc; }
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
.step-card { background: #fff; padding: 2rem; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.step-number { display: inline-block; width: 40px; height: 40px; line-height: 40px; border-radius: 50%; background-color: #5a8a6f; color: white; font-weight: bold; margin-bottom: 1rem; }

        /* Style for the Modal */
        .modal {
            display: none; /* Hidden by default */
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.6);
            justify-content: center;
            align-items: center;
        }

        .modal.active {
            display: flex; /* Show when the 'active' class is added */
        }

.modal-content {
            background-color: #faf6f1;
            margin: auto;
            padding: 30px;
            border: 1px solid #888;
            width: 90%;
            max-width: 500px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .modal-content h2 {
            margin-top: 0;
        }

        .modal-buttons {
            margin-top: 20px;
            display: flex;
            justify-content: center;
            gap: 15px;
        }
/* --- Contact Page --- */
.contact-section { padding: 4rem 0; background: #faf6f1; }
.contact-form-container { max-width: 600px; margin: 0 auto; background: #faf6f1; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); padding: 2.5rem; text-align: left; }
.phone-input-group { display: flex; gap: 0.5rem; }
.phone-input-group .form-select { width: 120px; flex-shrink: 0; }
.phone-input-group .form-input { flex-grow: 1; }

/* --- Login Modal --- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; backdrop-filter: blur(4px); }
.modal.active { display: flex; justify-content: center; align-items: center; }
.modal-content { background: #faf6f1; border-radius: 16px; padding: 2rem; width: 90%; max-width: 400px; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.modal-title { font-size: 1.5rem; font-weight: 600; color: #1a202c; margin: 0; }
.close-btn { background: none; border: none; font-size: 1.5rem; color: #a0aec0; cursor: pointer; }
.login-btn { width: 100%; padding: 0.875rem; font-size: 1rem; margin-bottom: 1.5rem; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.signup-text { text-align: center; color: #4a5568; font-size: 0.9rem; }
.signup-link { color: #5a8a6f; text-decoration: none; font-weight: 500; }
.error-message { background: #fed7d7; color: #c53030; padding: 0.75rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; display: none; }

/* --- Signup Page --- */
body.signup-page { background: linear-gradient(135deg, #5a8a6f 0%, #d97757 100%); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; }
.signup-container { background: #faf6f1; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 500px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); margin-bottom: 2rem; }
.signup-header { text-align: center; margin-bottom: 2rem; }
.signup-title { font-size: 2rem; font-weight: 700; color: #1a202c; margin-bottom: 0.5rem; }
.signup-subtitle { color: #4a5568; font-size: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.form-help { font-size: 0.8rem; color: #718096; margin-top: 0.25rem; }
.signup-btn { width: 100%; padding: 0.875rem; font-size: 1rem; margin-bottom: 1.5rem; }
.signup-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-text { text-align: center; color: #4a5568; font-size: 0.9rem; }
.login-link { color: #5a8a6f; text-decoration: none; font-weight: 500; }
.field-error { border-color: #e53e3e !important; box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important; }
.field-error-text { color: #e53e3e; font-size: 0.8rem; margin-top: 0.25rem; }
.checkbox-label { display: flex; align-items: center; font-weight: normal; font-size: 0.9rem; color: #2d3748; }
.checkbox-label input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-right: 0.75rem; flex-shrink: 0; }
.success-message { background: #c6f6d5; color: #2f855a; padding: 0.75rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; display: none; }

/* --- Departing Page --- */
body.departing-page { background: linear-gradient(135deg, #5a8a6f 0%, #d97757 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.departing-page .container { background: #faf6f1; border-radius: 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); overflow: hidden; width: 100%; max-width: 700px; padding: 0; }
.departing-page .header { background: linear-gradient(135deg, #5a8a6f 0%, #d97757 100%); color: white; padding: 40px 30px; text-align: center; position: relative; }
.departing-page .header h1 { font-size: 2.2rem; }
.departing-page .header .language-selector-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.departing-page .header .language-selector-container select {
    -webkit-appearance: none; /* Safari/Chrome */
    -moz-appearance: none; /* Firefox */
    appearance: none; /* Modern browsers */
    
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 32px 8px 12px; /* space for arrow */
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px 16px;
}

.departing-page .header .language-selector-container select option {
    background: #a5a5a5;
    color: white;
}

.departing-page .form-container { padding: 40px 30px; }
.departing-page .form-row { gap: 20px; }
.departing-page .required { color: #ef4444; }
.departing-page .submit-btn { width: 100%; background: linear-gradient(135deg, #5a8a6f 0%, #d97757 100%); padding: 16px 24px; font-size: 1.1rem; margin-top: 20px; }
.departing-page .submit-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(90, 138, 111, 0.3); }
.departing-page .back-link { display: inline-block; color: #5a8a6f; text-decoration: none; font-weight: 600; margin-bottom: 20px; }
.departing-page .file-upload-wrapper { position: relative; display: flex; align-items: center; width: 100%; height: 52px; padding: 0 16px; border: 2px solid #e5e7eb; border-radius: 12px; background: #fafafa; overflow: hidden; }
.departing-page .file-upload-input { opacity: 0; position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: pointer; z-index: 10; }
.departing-page .file-upload-button { flex-shrink: 0; background: #5a8a6f; color: white; padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.departing-page .file-upload-filename { margin-left: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   5. ADMIN DASHBOARD STYLES
   ========================================================================== */
body.admin-page { font-family: 'Inter', sans-serif; }
.admin-page .btn-primary {  max-width: 100%; background-color: #4f46e5; color: white; }
.admin-page .btn-primary:hover { background-color: #4338ca; }
.admin-page .btn-secondary { background-color: #e5e7eb; color: #374151; }
.admin-page .btn-secondary:hover { background-color: #d1d5db; }
.admin-page .table-input { display: block; width: 100%; border-radius: 0.375rem; border: 1px solid #d1d5db; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); padding: .5rem .75rem; }
.admin-page .table-cell-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ==========================================================================
   6. USER DASHBOARD & MEMORIAL STYLES
   ========================================================================== */

/* --- Memorial Page (Existing Styles) --- */
body.memorial-page { background: #faf6f1; }
.memorial-page .container { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #faf6f1; padding: 0; }
.memorial-page .header { text-align: center; padding: 20px; background: none; }
.memorial-page .header h1 { color: #5a8a6f; font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.memorial-page .header p { color: #666; font-size: 16px; }
.memorial-page .language-selector { position: absolute; top: 20px; right: 20px; z-index: 100; }
.memorial-page .language-selector select { background: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.memorial-page .profile-banner {
    height: 160px;
    position: relative;
    color: white;
    /* ✅ BACKGROUND IMAGE STYLES ADDED HERE */
    background-color: #5a8a6f;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
/* ✅ ADDED OVERLAY FOR TEXT READABILITY */
.profile-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.25);
}
.memorial-page .profile-photo { width: 120px; height: 120px; border-radius: 50%; border: 4px solid #f8f9fa; position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%); background: #f0f0f0; overflow: hidden; }
.memorial-page .profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.memorial-page .profile-info { text-align: center; margin-top: 70px; padding: 0 20px; }
.memorial-page .profile-name { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.memorial-page .profile-dates { color: #666; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.memorial-page .profile-dates svg { width: 18px; height: 18px; color: #5a8a6f; }
.memorial-page .pin-section { background: #faf6f1; border-radius: 16px; margin: 24px 16px; padding: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); text-align: center; }
.memorial-page .pin-title { font-size: 18px; font-weight: 600; color: #4a5568; margin-bottom: 16px; }
.memorial-page .pin-input { width: 200px; padding: 12px 16px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 24px; text-align: center; letter-spacing: 8px; margin-bottom: 16px; background: #f8fafc; }
.memorial-page .action-button { background: #5a8a6f; color: white; border: none; border-radius: 24px; padding: 12px 24px; font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px auto; cursor: pointer; width: 80%; max-width: 300px; }
.memorial-page .action-button svg { width: 20px; height: 20px; }
.memorial-page .content-card { background: #faf6f1; border-radius: 16px; margin: 0 16px 24px; padding: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.memorial-page .message-header { text-align: center; padding: 20px; background: #faf6f1; margin: 0 16px; border-radius: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); margin-bottom: 20px; }
.memorial-page .message-profile-photo { width: 80px; height: 80px; border-radius: 50%; border: 3px solid #5a8a6f; margin: 0 auto 16px; overflow: hidden; background: #f0f0f0; }
.memorial-page .message-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.memorial-page .message-profile-name { font-size: 20px; font-weight: 600; color: #4a5568; margin-bottom: 4px; }
.memorial-page .message-profile-subtitle { color: #718096; font-size: 14px; }
.memorial-page .file-upload { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s ease; background: #f8fafc; }
.memorial-page .file-upload:hover { border-color: #5a8a6f; background: #edf2f7; }
.memorial-page .file-upload input { display: none; }
.memorial-page .image-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; margin-top: 16px; }
.memorial-page .image-preview { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f1f5f9; }
.memorial-page .image-preview img { width: 100%; height: 100%; object-fit: cover; }
.memorial-page .image-preview .remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, 0.7); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 12px; }
.memorial-page .btn-secondary {  max-width: 100%; background: #139638; color: #ffffff; }
.memorial-page .btn-tertiary { max-width: 100%; background: #e2f0e6; color: #4a5568; }
.memorial-page .button-group-vertical { display: flex; flex-direction: column; gap: 10px; max-width: 300px; margin: 0 auto; }
.memorial-page .button-group-vertical .btn { width: 100%; }

/* --- Definitieve CSS voor Video Modal --- */

/* --- Definitieve & Robuuste CSS voor Video Modal --- */

body.video-modal-open {
    overflow: hidden;
}

#video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    background-color: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-modal .video-container {
    position: relative; /* !! Essentieel: dit maakt het de 'anker' voor de absolute elementen */
    width: 100%;
    max-width: 450px;
    aspect-ratio: 9 / 16;
    background-color: #1a1a1a;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 100%;
}

#video-modal video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Timer: Absoluut gepositioneerd BOVENAAN */
#video-modal #timer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%); /* Precies in het midden centreren */
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    z-index: 10;
}

/* Knoppenbalk: Absoluut gepositioneerd ONDERAAN */
#video-modal .video-controls-overlay {
    position: absolute;
    bottom: 30px; /* Afstand vanaf de onderkant */
    left: 0;
    width: 100%;
    padding: 0 25px; /* Ruimte aan de zijkanten */
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

/* Stijlen voor de knoppen zelf (blijven grotendeels hetzelfde) */
#video-modal #cancel-video-btn,
#video-modal #done-video-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px;
}

#video-modal #done-video-btn {
    font-weight: bold;
}

#video-modal .record-button-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
}

#video-modal #record-btn {
    width: 68px;
    height: 68px;
    background-color: #ff3b5c;
    border-radius: 50%;
    border: 4px solid white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 15px rgba(255, 59, 92, 0.5);
}

#video-modal #record-btn.recording {
    transform: scale(0.8);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    50% { box-shadow: 0 0 20px rgba(255, 59, 92, 1); }
}

#video-modal #preview-video-btn {
    display: none;
    padding: 15px 25px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

#video-modal .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    pointer-events: none;
}

#video-modal .progress-ring__circle {
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-width: 4;
    fill: transparent;
    r: 36;
    cx: 40;
    cy: 40;
    stroke-dasharray: 226 226;
    stroke-dashoffset: 226;
}

#video-modal .progress-ring.recording .progress-ring__circle {
    transition: stroke-dashoffset 13s linear;
    stroke-dashoffset: 0;
}

/* Override your default button styles ONLY within the video modal */
.video-modal .btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: rgba(255, 255, 255, 0.9);
}

.video-modal .btn.btn-primary {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* --- Permission Denied Popup Modal --- */
.permission-modal {
    position: fixed;
    z-index: 2000; /* Ensure it's on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.permission-modal-content {
    background-color: #faf6f1;
    margin: 15px;
    padding: 25px;
    border-radius: 16px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.permission-modal-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px auto;
    background-color: #fde2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.permission-modal-icon svg {
    color: #c82333;
    width: 28px;
    height: 28px;
}

.permission-modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
    color: #333;
}

.permission-modal-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

/* --- Dashboard Page --- */
.dashboard-page .container { max-width: 100%; margin: 0 auto; min-height: 100vh; background: white; padding: 0; }
.dashboard-page .header { text-align: center; padding: 20px; background: linear-gradient(135deg, #5a8a6f 0%, #d97757 100%); color: white; position: relative; }
.dashboard-page .header h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.dashboard-page .header p { font-size: 16px; opacity: 0.9; }
.dashboard-page .header .language-selector { position: absolute; top: 20px; left: 20px; }
.dashboard-page .header .language-selector select {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 500;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.dashboard-page .header .language-selector select option {
    background: #2d3748;
    color: white;
}
.dashboard-page .header .logout-btn { position: absolute; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.2); color: white; font-weight: 500; border-radius: 8px; padding: 8px 16px; border: 1px solid rgba(255, 255, 255, 0.3); }
.dashboard-page .profile-banner {
    height: 160px;
    position: relative;
    color: white;
    /* ✅ BACKGROUND IMAGE STYLES ADDED HERE */
    background-color: #5a8a6f;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
/* ✅ ADDED OVERLAY FOR TEXT READABILITY */
.profile-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.25);
}
.dashboard-page .profile-photo { width: 140px; height: 140px; border-radius: 50%; border: 2px solid white; position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%); background: #f0f0f0; overflow: hidden; }
.dashboard-page .profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-page .profile-info { text-align: center; margin-top: 70px; padding: 0 20px 20px; }
.dashboard-page .profile-name { font-size: 24px; font-weight: 600; color: #2d3748; }
.dashboard-page .profile-dates { color: #666; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.dashboard-page .profile-dates svg { width: 18px; height: 18px; color: #5a8a6f; }
.dashboard-page .religious-message { background: #f8fafc; border-radius: 12px; padding: 16px; margin: 0 20px 20px; min-height: 60px; display: flex; align-items: center; justify-content: center; border-left: 4px solid #5a8a6f; }
.dashboard-page .tabs { display: flex; background: #f8fafc; border-radius: 12px; margin: 0 20px 20px; padding: 4px; }
.dashboard-page .tab { flex: 1; padding: 12px 8px; text-align: center; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dashboard-page .tab.active { background: white; color: #5a8a6f; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.dashboard-page .tab svg { width: 14px; height: 14px; }
.dashboard-page .tab-content { padding: 20px; min-height: 300px; }
.dashboard-page .tab-panel { display: none; }
.dashboard-page .tab-panel.active { display: block; }
.dashboard-page .stats-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 20px; }
.dashboard-page .stat-card { background: #faf6f1; border-radius: 12px; padding: 16px; text-align: center; }
.dashboard-page .message-item, .dashboard-page .visitor-item { background: #f8fafc; border-radius: 12px; padding: 16px; margin-bottom: 12px; border-left: 4px solid #5a8a6f; }
.dashboard-page .media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dashboard-page .media-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f1f5f9; position: relative; cursor: pointer; }
.dashboard-page .media-item img, .dashboard-page .media-item video { width: 100%; height: 100%; object-fit: cover; }
.dashboard-page .loading, .dashboard-page .error, .memorial-page .loading, .memorial-page .error { text-align: center; padding: 40px 20px; }
.dashboard-page .spinner, .memorial-page .spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top: 4px solid #5a8a6f; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ==========================================================================
   7. RESPONSIVE & RTL STYLES
   ========================================================================== */
body.rtl { direction: rtl; }
body.rtl .dashboard-page .header .logout-btn { right: auto; left: 20px; }
body.rtl .dashboard-page .header .language-selector { left: auto; right: 20px; }

@media (max-width: 768px) {
    /* 1. De hoofdcontainer */
    .navbar { 
        flex-direction: column; 
        gap: 1rem; 
        padding: 1rem; 
        /* Zorg dat de navbar niet te hoog wordt of over de content valt, 
           tenzij je een uitklapmenu (hamburger) gebruikt. */
    }

    /* 2. De navigatie links container */
    .nav-links { 
        order: 3; /* Zoals je wilde: onderaan */
        display: flex;
        flex-direction: column; /* Zet de links ONDER elkaar ipv naast elkaar */
        width: 100%; /* Gebruik de volledige breedte */
        gap: 0; /* We gebruiken padding op de links zelf voor ruimte */
        align-items: center; /* Centreer de tekst */
    }

    /* 3. De individuele links styling voor mobiel */
    .nav-links a {
        width: 100%; /* Maak de link beeldbreed */
        text-align: center; /* Tekst in het midden */
        padding: 15px 0; /* Maak het raakvlak groter voor vingers (touch-friendly) */
        border-bottom: 1px solid #eee; /* Optioneel: lijntje tussen items voor duidelijkheid */
        display: block; /* Zorg dat padding werkt */
    }

    /* Verwijder het lijntje bij de laatste link */
    .nav-links a:last-child {
        border-bottom: none;
    }

    /* 4. De rechterkant (Taal selector & Login) */
    .nav-right { 
        flex-direction: column; /* Zet selector en knop onder elkaar */
        width: 100%;
        align-items: center;
        gap: 15px;
        order: 2; /* Zet deze eventueel boven de links, of pas aan naar wens */
    }

    /* Zorg dat de selector en knop ook breed genoeg zijn om aan te tikken */
    .nav-right select, 
    .nav-right .btn {
        width: 100%;
        max-width: 300px; /* Voorkom dat ze lelijk breed worden op tablets */
        text-align: center;
    }

    /* Overige aanpassingen die je al had */
    .hero h1 { font-size: 2rem; }
    .dashboard-page .container { max-width: 100%; padding: 0 15px; } /* Padding toegevoegd zodat tekst niet tegen rand plakt */
    .dashboard-page .media-grid { grid-template-columns: 1fr; } /* 1 kolom is vaak beter op smalle mobiel */
    .departing-page .form-row { grid-template-columns: 1fr; gap: 20px; }
}
@media (min-width: 640px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .steps-grid { grid-template-columns: repeat(5, 1fr); }
}