/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   TYPOGRAPHY — Heritage Serif for Headings
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    letter-spacing: -0.02em;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d20 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #3a6f3e 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.4);
    transform: translateY(-3px);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Pulse animation on first appearance */
@keyframes backToTopPulse {
    0% { box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(44, 85, 48, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3); }
}

.back-to-top.pulse {
    animation: backToTopPulse 1s ease-in-out;
}

/* Dark mode */
html[data-theme="dark"] .back-to-top {
    background: linear-gradient(135deg, #2d5a32 0%, #1a3d20 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .back-to-top:hover {
    background: linear-gradient(135deg, #3a7040 0%, #2d5a32 100%);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

:root {
    --primary-color: #2c5530;
    --secondary-color: #d4af37;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;

    /* Button design tokens */
    --btn-gradient-start: #2f4f30;
    --btn-gradient-end: #3f7042;
    --btn-gradient-hover-start: #3a5f38;
    --btn-gradient-hover-end: #4b8250;
    --btn-text-color: #f8faf5;
    --btn-border-color: rgba(255, 255, 255, 0.14);
    --btn-shadow-soft: 0 12px 25px rgba(44, 85, 48, 0.25);
    --btn-shadow-strong: 0 18px 35px rgba(44, 85, 48, 0.35);
    --btn-secondary-gradient-start: #f4d68a;
    --btn-secondary-gradient-end: #d4af37;
    --btn-secondary-text: #1f1504;
    --btn-outline-border: rgba(44, 85, 48, 0.45);
    
    /* Baluch Flag Colors */
    --baluch-blue: #0066CC;
    --baluch-red: #DC143C;
    --baluch-green: #228B22;
    --baluch-white: #FFFFFF;
}

.btn:hover {
    background: linear-gradient(135deg, var(--btn-gradient-hover-start), var(--btn-gradient-hover-end));
    box-shadow: var(--btn-shadow-strong);
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.35);
    outline-offset: 3px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Dark theme overrides */
html[data-theme="dark"] {
    color-scheme: dark;
    --light-color: #020617;
    --dark-color: #f9fafb;
    --text-color: #e5e7eb;
    --border-color: #1f2937;
    --shadow: 0 24px 65px rgba(0, 0, 0, 0.9);
    --btn-gradient-start: #1d3b26;
    --btn-gradient-end: #3a6f47;
    --btn-gradient-hover-start: #2c5233;
    --btn-gradient-hover-end: #4f8c5b;
    --btn-text-color: #f0fdf4;
    --btn-border-color: rgba(134, 239, 172, 0.35);
    --btn-shadow-soft: 0 18px 40px rgba(2, 6, 23, 0.7);
    --btn-shadow-strong: 0 24px 55px rgba(2, 6, 23, 0.85);
    --btn-secondary-gradient-start: rgba(31, 41, 55, 0.95);
    --btn-secondary-gradient-end: rgba(15, 23, 42, 0.95);
    --btn-secondary-text: #f8fafc;
    --btn-outline-border: rgba(148, 210, 189, 0.45);
}

html[data-theme="dark"] body {
    background-color: var(--light-color);
    color: var(--text-color);
}

/* Dark mode surfaces: sections */
html[data-theme="dark"] .gallery-section,
html[data-theme="dark"] .add-martyr-section,
html[data-theme="dark"] .about-section,
html[data-theme="dark"] .contact-section,
html[data-theme="dark"] .confirmation-page,
html[data-theme="dark"] .impact-section,
html[data-theme="dark"] .purpose-section,
html[data-theme="dark"] .featured-martyrs {
    background: #020617;
}

/* Cards / panels */
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .impact-card,
html[data-theme="dark"] .showcase-card,
html[data-theme="dark"] .martyr-form,
html[data-theme="dark"] .success-message,
html[data-theme="dark"] .confirmation-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .contact-section .martyr-form,
html[data-theme="dark"] .anniversaries .slider-container,
html[data-theme="dark"] .gallery-grid .martyr-card,
html[data-theme="dark"] .recent-martyrs .martyr-card {
    background: #020617;
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.9);
}

/* Text adjustments inside dark surfaces */
html[data-theme="dark"] .page-header h2,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .feature-card h3,
html[data-theme="dark"] .feature-card p,
html[data-theme="dark"] .martyr-info h3,
html[data-theme="dark"] .martyr-info p,
html[data-theme="dark"] .impact-description,
html[data-theme="dark"] .section-description,
html[data-theme="dark"] .purpose-feature-content h4,
html[data-theme="dark"] .purpose-feature-content p,
html[data-theme="dark"] .showcase-title,
html[data-theme="dark"] .showcase-text,
html[data-theme="dark"] .contact-section h3,
html[data-theme="dark"] .contact-section p,
html[data-theme="dark"] .confirmation-card h1,
html[data-theme="dark"] .confirmation-card h2,
html[data-theme="dark"] .confirmation-card p {
    color: var(--text-color);
}

/* Form controls in dark mode */
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .form-group select {
    background: #020617;
    border-color: #334155;
    color: var(--text-color);
}

html[data-theme="dark"] .form-group input::placeholder,
html[data-theme="dark"] .form-group textarea::placeholder {
    color: #64748b;
}

/* Header/footer remain branded but text is light already; just deepen footer */
html[data-theme="dark"] .site-footer {
    box-shadow: 0 -18px 45px rgba(0, 0, 0, 0.7);
}

/* ============================================
   COMPREHENSIVE DARK MODE STYLES - ALL PAGES
   ============================================ */

/* Section backgrounds with gradients */
html[data-theme="dark"] .anniversaries {
    background: linear-gradient(165deg, #0a1628 0%, #0c1e33 25%, #0a1420 50%, #1a1404 75%, #1c1805 100%);
}

html[data-theme="dark"] .anniversaries::before {
    background: radial-gradient(circle at 20% 50%, rgba(44,85,48,0.15) 0%, transparent 50%),
               radial-gradient(circle at 80% 80%, rgba(212,175,55,0.12) 0%, transparent 50%);
}

html[data-theme="dark"] .purpose-section::before {
    background: radial-gradient(circle at center, rgba(44,85,48,0.08) 0%, transparent 70%);
}

html[data-theme="dark"] .impact-section::before {
    background: radial-gradient(circle at 30% 20%, rgba(44,85,48,0.08) 0%, transparent 50%),
               radial-gradient(circle at 70% 80%, rgba(212,175,55,0.08) 0%, transparent 50%);
}

/* Anniversary slider dark mode */
html[data-theme="dark"] .anniversary-card .martyr-info {
    background: linear-gradient(135deg, #0f1419 0%, #0a0f15 100%);
}

html[data-theme="dark"] .anniversary-card .martyr-image {
    background: linear-gradient(135deg, #1a2028 0%, #151b22 100%);
}

html[data-theme="dark"] .anniversary-card .martyr-info h3,
html[data-theme="dark"] .anniversary-card .martyr-dates,
html[data-theme="dark"] .anniversary-card .martyr-location,
html[data-theme="dark"] .anniversary-card .martyr-bio {
    color: var(--text-color);
}

html[data-theme="dark"] .anniversary-card .anniversary-date {
    background: linear-gradient(135deg, #2a2410 0%, #3a3016 100%);
    border-color: rgba(212,175,55,0.3);
    box-shadow: 0 2px 8px rgba(212,175,55,0.1);
}

/* Slider controls */
html[data-theme="dark"] .slider-btn {
    background: rgba(15,23,42,0.95);
    border-color: rgba(148,163,184,0.4);
    color: var(--text-color);
}

html[data-theme="dark"] .slider-btn:hover {
    background: rgba(30,41,59,0.98);
    border-color: var(--primary-color);
}

html[data-theme="dark"] .dot {
    background: rgba(148,163,184,0.3);
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .dot.active {
    background: var(--primary-color);
    border-color: rgba(44,85,48,0.4);
}

/* Impact cards dark mode */
html[data-theme="dark"] .impact-card {
    background: linear-gradient(135deg, #0f1419 0%, #0a0f15 100%);
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .impact-card::before {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

html[data-theme="dark"] .impact-label {
    color: #86efac;
}

/* Purpose feature cards */
html[data-theme="dark"] .purpose-feature {
    background: rgba(15,23,42,0.6);
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .purpose-feature:hover {
    background: rgba(15,23,42,0.85);
    border-color: rgba(44,85,48,0.3);
}

html[data-theme="dark"] .purpose-feature-icon {
    background-color: rgba(44,85,48,0.15);
}

/* Showcase cards */
html[data-theme="dark"] .showcase-card {
    background: linear-gradient(135deg, #0f1419 0%, #0a0f15 100%);
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .showcase-card:hover {
    border-color: rgba(44,85,48,0.3);
}

/* Featured martyrs cards */
html[data-theme="dark"] .featured-martyrs .martyr-card {
    background: linear-gradient(145deg, #0f172a 0%, #0b1120 100%);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 
                0 25px 55px rgba(2, 6, 23, 0.75);
}

html[data-theme="dark"] .featured-martyrs .martyr-card:hover {
    box-shadow: inset 0 0 0 1px rgba(148, 210, 189, 0.2), 
                0 35px 70px rgba(2, 6, 23, 0.85);
}

html[data-theme="dark"] .featured-martyrs .placeholder {
    background: linear-gradient(135deg, #0f1419, #0c1116);
    border-color: rgba(148,163,184,0.3);
}

/* Gallery page dark mode */
html[data-theme="dark"] .gallery-grid .martyr-card {
    background: linear-gradient(145deg, #0f172a 0%, #0a1220 100%);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 
                0 25px 55px rgba(2, 6, 23, 0.75);
}

html[data-theme="dark"] .gallery-grid .martyr-card:hover {
    box-shadow: inset 0 0 0 1px rgba(148, 210, 189, 0.2), 
                0 35px 70px rgba(2, 6, 23, 0.85);
}

html[data-theme="dark"] .martyr-image {
    background: linear-gradient(135deg, #1a2028, #151b22);
}

html[data-theme="dark"] .martyr-detail-list,
html[data-theme="dark"] .martyr-detail-row,
html[data-theme="dark"] .martyr-detail-label,
html[data-theme="dark"] .martyr-detail-value {
    color: #e2e8f0;
}

html[data-theme="dark"] .martyr-detail-label {
    color: #94a3b8;
}



html[data-theme="dark"] .martyr-share-icon {
    background: transparent;
    border: none;
    color: #94a3b8;
    box-shadow: none;
}

html[data-theme="dark"] .martyr-share-icon:hover,
html[data-theme="dark"] .martyr-share-icon:focus-visible {
    color: #86efac;
    background: rgba(134, 239, 172, 0.1);
    transform: translateY(-2px);
}

/* Filter bar */
html[data-theme="dark"] .filter-bar {
    background: #0f1419;
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .search-input {
    background: #020617;
    border-color: #334155;
    color: var(--text-color);
}

html[data-theme="dark"] .search-input::placeholder {
    color: #64748b;
}

/* Modal dark mode */
html[data-theme="dark"] .modal-content {
    background: #0f1419;
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer {
    background: transparent;
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .close-modal {
    color: var(--text-color);
}

/* About page */
html[data-theme="dark"] .about-hero {
    background: linear-gradient(135deg, #020617 0%, #0a1420 100%);
}

html[data-theme="dark"] .team-card,
html[data-theme="dark"] .timeline-item {
    background: #0f1419;
    border-color: rgba(148,163,184,0.2);
}

/* Contact page */
html[data-theme="dark"] .contact-info-card {
    background: #0f1419;
    border-color: rgba(148,163,184,0.2);
}

/* Add martyr form */
html[data-theme="dark"] .form-section {
    background: #0f1419;
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] .file-upload-area {
    background: #020617;
    border-color: #334155;
}

html[data-theme="dark"] .file-upload-area:hover {
    border-color: var(--primary-color);
}

/* Buttons in dark mode */
html[data-theme="dark"] .btn-outline {
    background: rgba(15, 23, 42, 0.55);
    border-color: var(--btn-outline-border);
    color: #c1f5cf;
}

html[data-theme="dark"] .btn-outline:hover {
    background: rgba(44, 85, 48, 0.25);
    border-color: rgba(134, 239, 172, 0.55);
}

html[data-theme="dark"] .btn-secondary {
    border-color: rgba(134, 239, 172, 0.25);
    box-shadow: var(--btn-shadow-soft);
}

/* Admin panels */
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .pending-card,
html[data-theme="dark"] .stats-card {
    background: #0f1419;
    border-color: rgba(148,163,184,0.2);
}

/* Tables */
html[data-theme="dark"] table {
    border-color: rgba(148,163,184,0.2);
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-color: rgba(148,163,184,0.2);
    color: var(--text-color);
}

html[data-theme="dark"] tr:hover {
    background: rgba(44,85,48,0.1);
}

/* Search highlight in dark mode */
html[data-theme="dark"] .search-highlight,
html[data-theme="dark"] mark.search-highlight {
    background-color: #3a3016;
    color: #fef3c7;
}

/* Phase 1.2 — Smooth scroll for anchor navigation */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Phase 1.4 — Accessible focus indicator */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--text-color);
    background-color: var(--light-color);
    /* Phase 1.1 — Smooth page fade-in */
    animation: pageFadeIn 0.4s ease-out;
    /* Smooth dark mode transition */
    transition: background-color 0.35s ease, color 0.35s ease;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Phase 1.3 — Branded text selection */
::selection {
    background: rgba(44, 85, 48, 0.18);
    color: #1a3d20;
}

html[data-theme="dark"] ::selection {
    background: rgba(134, 239, 172, 0.22);
    color: #f0fdf4;
}

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

/* Search highlight for gallery results */
.search-highlight,
mark.search-highlight {
    background-color: #fff3cd;
    color: inherit;
    padding: 0 0.05em;
    border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1 {
    font-size: clamp(2.4rem, 3vw + 1.2rem, 3rem);
    font-weight: 800;
    letter-spacing: 0.03em;
}

h2 {
    font-size: clamp(2rem, 2.5vw + 0.8rem, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

h4 {
    font-size: 1.15rem;
    font-weight: 600;
}

h5, h6 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Header Styles */
.site-header {
    /* Baluch flag inspired gradient background */
    background: linear-gradient(135deg, 
        var(--baluch-blue) 0%, 
        var(--baluch-blue) 33%, 
        var(--baluch-red) 33%, 
        var(--baluch-red) 66%, 
        var(--baluch-green) 66%, 
        var(--baluch-green) 100%);
    color: white;
    box-shadow: var(--shadow);
    /* Phase 2.1 — Fixed sticky header (removed conflicting position:relative) */
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    /* Remove overflow hidden on mobile to allow dropdown */
}

/* Phase 2.1b — Scrolled state: compact header with enhanced shadow */
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.site-header.scrolled .navbar {
    padding: 0.5rem 0;
}

.site-header.scrolled .nav-brand h1 {
    font-size: 1.25rem;
}

/* Allow dropdown on mobile */
@media (max-width: 1024px) {
    .nav-brand h1 {
        font-size: 1.35rem;
    }
    .nav-menu {
        gap: 1.2rem;
    }
    .nav-menu a {
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .site-header {
        overflow: visible;
    }
}

/* Header logo: subtle star representing Baluch flag */
.site-header::before {
    content: '★';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.7rem;
    color: var(--baluch-white);
    opacity: 0.35;
    z-index: 1;
    pointer-events: none;
}

.navbar {
    padding: 1rem 0;
    position: relative;
    z-index: 2;
}

/* Mobile navbar container positioning */
@media (max-width: 768px) {
    .navbar .container {
        position: relative;
    }
    
    .anniversary-card .martyr-dates,
    .anniversary-card .martyr-location,
    .anniversary-date {
        font-size: 1rem;
    }

    .anniversary-card .martyr-info p {
        margin-bottom: 0.65rem;
    }
    .navbar {
        position: relative;
        overflow: visible;
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: var(--baluch-white);
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    align-items: center;
}

.theme-toggle {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.08);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(15, 23, 42, 0.75);
}

html[data-theme="dark"] .theme-toggle:hover {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.65);
}

.nav-menu a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    border: 1px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--baluch-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: var(--transition);
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color)); /* Fallback if video fails */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

/* Hero: full-viewport on mobile */
@media (max-width: 768px) {
    .hero {
        height: 85vh;
        min-height: 420px;
    }
    .hero-overlay {
        background: rgba(0, 0, 0, 0.38);
    }
    .hero-content {
        padding: 1.5rem;
    }
    .hero-buttons .btn {
        padding: 0.85rem 2rem;
        font-size: 1.02rem;
        min-height: 48px;
    }
}

/* Animated hero subtitle badge */
.hero-subtitle {
    display: inline-block;
    animation: subtitleSlideUp 0.6s 0.2s ease-out both;
}

@keyframes subtitleSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background hero video for Baluchistan flag */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
}

/* 3D Floating Particles Canvas */
.hero-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Play button shown when autoplay is blocked */
.hero-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 2rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}

.hero-video-play.visible {
    display: flex;
}

.hero-content h2 {
    font-size: clamp(2.4rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: white;
    letter-spacing: 0.03em;
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.75rem;
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--btn-text-color);
    background: linear-gradient(135deg, var(--btn-gradient-start), var(--btn-gradient-end));
    border: 1px solid var(--btn-border-color);
    box-shadow: var(--btn-shadow-soft);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    position: relative;
    isolation: isolate;
}

/* Button press feedback */
.btn:active {
    transform: scale(0.96);
}

/* Voice assistant button inside martyr details modal */
.martyr-voice-btn {
    min-width: 240px;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .martyr-voice-btn {
        width: 100%;
        padding: 0.8rem 1.4rem;
        font-size: 1rem;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--btn-gradient-start), var(--btn-gradient-end));
    color: var(--btn-text-color);
    border-color: var(--btn-border-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--btn-gradient-hover-start), var(--btn-gradient-hover-end));
    box-shadow: var(--btn-shadow-strong);
}

.btn-ghost {
    background: rgba(44, 85, 48, 0.06);
    color: var(--primary-color);
    border-color: transparent;
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(44, 85, 48, 0.25);
    transform: translateY(-2px);
}

html[data-theme="dark"] .btn-ghost {
    background: rgba(148, 210, 189, 0.1);
    color: #94d2bd;
}

html[data-theme="dark"] .btn-ghost:hover {
    background: rgba(148, 210, 189, 0.9);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(148, 210, 189, 0.25);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--btn-secondary-gradient-start), var(--btn-secondary-gradient-end));
    color: var(--btn-secondary-text);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.55rem 1.35rem;
    font-size: 0.88rem;
    line-height: 1.1;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

/* Tighter mobile section spacing */
@media (max-width: 768px) {
    section {
        padding: 2.5rem 0;
    }
    body {
        font-size: 17px;
    }
}

.about-section {
    background: white;
}

.about-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Features Section */
.features {
    background: var(--light-color);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Martyrs Grid */
.recent-martyrs {
    background: white;
}

.recent-martyrs h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

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

/* Featured Martyrs cards - matching gallery design */
.martyr-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 
                0 8px 30px rgba(15, 23, 42, 0.04), 
                0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.martyr-card:hover {
    transform: translateY(-8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 
                0 12px 40px rgba(15, 23, 42, 0.06), 
                0 32px 80px rgba(15, 23, 42, 0.12);
}

.martyr-card.placeholder {
    padding: 2rem;
    text-align: center;
    background: var(--light-color);
    border: 2px dashed rgba(44, 85, 48, 0.2);
}

.martyr-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.martyr-photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #dfe7e9, #cfd9df);
}

.martyr-photo-wrapper img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.martyr-card:hover .martyr-photo-wrapper img {
    transform: scale(1.04);
}

.martyr-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
    font-size: 2.5rem;
    color: #9ca3af;
}

.martyr-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.02));
    mix-blend-mode: multiply;
    pointer-events: none;
}

.martyr-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #dfe7e9, #cfd9df);
    object-fit: cover;
    display: block;
}

.martyr-info {
    padding: 1.25rem 1.4rem 1.3rem;
}

.martyr-name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.martyr-symbol {
    font-size: 1.05rem;
    color: var(--secondary-color);
}

.martyr-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--primary-color);
}

.martyr-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.martyr-info p {
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.martyr-detail-list {
    margin: 0.35rem 0 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.martyr-detail-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.martyr-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #1f2937;
    min-width: 82px;
}

.martyr-detail-value {
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.martyr-meta {
    margin: 0.15rem 0;
    font-size: 0.9rem;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.martyr-meta-icon {
    font-size: 0.95rem;
    opacity: 0.85;
}

.martyr-organization {
    margin-top: 0.3rem;
    font-size: 0.88rem;
    color: #666666;
}

.martyr-card-button {
    margin-top: 0.95rem;
    align-self: flex-start;
    font-size: 0.9rem;
    gap: 0.4rem;
}

.martyr-card-button::after {
    content: '↗';
    font-size: 0.9rem;
}

.martyr-card-button:hover {
    box-shadow: var(--btn-shadow-strong);
}

/* CTA Section */
.cta {
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Form Styles */
.add-martyr-section {
    background: white;
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.martyr-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* File Upload Styles */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    background: var(--light-color);
}

.file-upload-text {
    color: #666;
}

.photo-preview {
    margin-top: 1rem;
    max-width: 300px;
}

.photo-preview img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

/* Image compression feedback */
.compression-info {
    font-size: 12px;
    color: #28a745;
    margin: 5px 0;
    text-align: center;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

.compression-progress {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

.photos-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photos-preview-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Add Martyr page – upload UI polish */
.file-upload-display {
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-upload-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-wrapper:hover .file-upload-display {
    border-color: rgba(44, 85, 48, 0.45);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.08);
}

html[data-theme="dark"] .file-upload-display {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .file-upload-text {
    color: #cbd5e1;
}

/* Add Martyr page – mobile layout refinements */
@media (max-width: 768px) {
    .add-martyr-section {
        padding: 1.4rem 0;
    }

    .add-martyr-section .page-header {
        margin-bottom: 1.75rem;
    }

    .add-martyr-section .page-header h2 {
        font-size: 1.85rem;
        line-height: 1.25;
    }

    .add-martyr-section .page-header p {
        font-size: 1rem;
        line-height: 1.55;
        margin-top: 0.5rem;
    }

    .add-martyr-section .martyr-form {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .add-martyr-section .form-section {
        margin-bottom: 1.6rem;
        padding-bottom: 1.6rem;
    }

    .add-martyr-section .form-section h3 {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }

    .add-martyr-section .form-group {
        margin-bottom: 1.1rem;
    }

    .add-martyr-section .form-group label {
        font-size: 0.95rem;
    }

    .add-martyr-section .form-group input,
    .add-martyr-section .form-group textarea,
    .add-martyr-section .form-group select {
        padding: 0.85rem 0.95rem;
        border-radius: 10px;
    }

    .add-martyr-section .file-upload-display {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 12px;
    }

    .add-martyr-section .file-upload-text {
        white-space: normal;
        font-size: 0.95rem;
        color: #475569;
    }

    .add-martyr-section .file-upload-display .btn {
        width: 100%;
        justify-content: center;
    }

    .add-martyr-section .photo-preview {
        max-width: 100%;
    }

    .add-martyr-section .photo-preview img {
        max-height: 320px;
        object-fit: cover;
    }

    .add-martyr-section .photos-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .add-martyr-section .photos-preview-grid img {
        height: 120px;
        border-radius: 10px;
    }

    .add-martyr-section .date-helper {
        font-size: 0.85rem;
    }

    .add-martyr-section .form-actions {
        margin-top: 1.25rem;
    }
}

@media (max-width: 480px) {
    .add-martyr-section .page-header h2 {
        font-size: 1.6rem;
    }

    .add-martyr-section .martyr-form {
        padding: 1rem;
        border-radius: 12px;
    }

    .add-martyr-section .photos-preview-grid {
        grid-template-columns: 1fr;
    }

    .add-martyr-section .photos-preview-grid img {
        height: 180px;
    }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 3rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.success-message h3 {
    color: #155724;
    margin-bottom: 1rem;
}

/* Gallery Page */
.gallery-section {
    padding: 2rem 0;
}

.filter-bar {
    background: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Search Controls */
.search-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input-group input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

#clearSearch {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#clearSearch:hover {
    background: #f0f0f0;
    color: #666;
}

/* Advanced Search Panel */
.advanced-search-panel {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.search-field input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 85, 48, 0.1);
}

.search-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Search Results Info */
.search-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f4e8;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.search-results-info span {
    font-weight: 600;
    color: var(--primary-color);
}

.clear-filters-btn {
    font-size: 0.85rem;
    padding: 0.45rem 1.1rem;
    gap: 0.35rem;
}

/* Highlighted search results */
.highlight {
    background-color: #fff3cd;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}

.filter-bar input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* ============================================
   SEARCH & DISCOVERY - Professional Redesign
   ============================================ */

/* Discovery Bar Container */
.discovery-bar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

/* Primary Search Row */
.discovery-search {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper .search-svg-icon {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
}

.search-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 2.75rem 0 2.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1f2937;
    background: #fafafa;
    transition: all 0.2s ease;
}

.search-wrapper input::placeholder {
    color: #9ca3af;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.08);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
}

.search-clear svg {
    width: 14px;
    height: 14px;
}

.search-clear:hover {
    background: #e5e7eb;
    color: #374151;
}

.search-wrapper input:not(:placeholder-shown) + .search-clear {
    display: flex;
}

/* Discover Button */
.discover-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    height: 48px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.discover-btn svg {
    width: 18px;
    height: 18px;
}

.discover-btn:hover {
    background: #1f4023;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.25);
}

.discover-btn:active {
    transform: translateY(0);
}

/* Filter Toolbar */
.discovery-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.filter-tabs {
    display: flex;
    gap: 0.25rem;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 10px;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.filter-tab svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.filter-tab:hover {
    color: #374151;
    background: rgba(255,255,255,0.6);
}

.filter-tab.active,
.filter-tab.dropdown-open {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-tab.dropdown-open svg {
    transform: rotate(180deg);
}

/* Filter Tab Dropdowns */
.filter-tab-dropdown {
    position: relative;
    display: flex;
}

.filter-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 1000;
    overflow: hidden;
}

.filter-dropdown-menu.show {
    display: block;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.dropdown-scroll::-webkit-scrollbar {
    width: 6px;
}

.dropdown-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.dropdown-scroll button {
    display: block;
    width: 100%;
    padding: 0.7rem 0.875rem;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-scroll button:hover {
    background: #f0f5f1;
    color: var(--primary-color);
}

.dropdown-scroll button:active {
    background: #e8f4e8;
}

.dropdown-scroll button.active {
    background: rgba(44, 85, 48, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Advanced Toggle */
.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.advanced-toggle svg {
    width: 16px;
    height: 16px;
}

.advanced-toggle:hover {
    border-color: #d1d5db;
    color: #374151;
    background: #fafafa;
}

.advanced-toggle.active {
    background: rgba(44, 85, 48, 0.06);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Alphabet Bar */
.alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.alphabet-bar .letter-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s ease;
}

.alphabet-bar .letter-btn:hover:not(.disabled) {
    background: #f1f5f9;
    color: #334155;
}

.alphabet-bar .letter-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.alphabet-bar .letter-btn.disabled {
    color: #cbd5e1;
    cursor: default;
}

.alphabet-bar .letter-btn.clear-btn {
    width: auto;
    padding: 0 0.75rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.alphabet-bar .letter-btn.clear-btn:hover {
    color: #64748b;
    background: #f1f5f9;
}

/* Advanced Panel */
.advanced-panel {
    display: none;
    margin-top: 1rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.advanced-panel.show {
    display: block;
    animation: panelSlide 0.2s ease;
}

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

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

.advanced-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.advanced-field input {
    width: 100%;
    height: 42px;
    padding: 0 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    transition: all 0.15s ease;
}

.advanced-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.06);
}

.advanced-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-reset {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-reset:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn-apply {
    padding: 0.6rem 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-apply:hover {
    background: #1f4023;
}

/* Results Bar */
.results-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(44, 85, 48, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(44, 85, 48, 0.08);
}

.results-bar.show {
    display: flex;
}

.results-text {
    font-size: 0.9rem;
    color: #4b5563;
}

.results-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.results-filter-tag {
    margin-left: 0.5rem;
    color: #6b7280;
}

.results-clear {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(44, 85, 48, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.15s ease;
}

.results-clear:hover {
    background: rgba(44, 85, 48, 0.06);
    border-color: var(--primary-color);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
}

.autocomplete-dropdown.show {
    display: block;
    animation: dropdownFade 0.15s ease;
}

/* Autocomplete Items */
.autocomplete-section {
    padding: 0.5rem;
}

.autocomplete-section:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-section-title {
    padding: 0.5rem 0.75rem 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #f5f5f5;
}

.autocomplete-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #9ca3af;
}

.autocomplete-item-icon img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.autocomplete-item-text {
    flex: 1;
    min-width: 0;
}

.autocomplete-item-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.9rem;
}

.autocomplete-item-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 1px;
}

.autocomplete-item-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Mobile Responsive - Discovery Bar */
@media (max-width: 768px) {
    .discovery-bar {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .discovery-search {
        flex-direction: column;
        gap: 0.625rem;
    }
    
    .search-wrapper input {
        height: 44px;
    }
    
    .discover-btn {
        width: 100%;
        height: 44px;
        justify-content: center;
    }
    
    .discovery-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-tabs {
        overflow-x: auto;
        padding: 4px;
        margin: 0 -0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-tab {
        flex-shrink: 0;
        padding: 0.45rem 0.875rem;
    }
    
    .advanced-toggle {
        align-self: flex-start;
    }
    
    .alphabet-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        margin: 0 -0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .alphabet-bar::-webkit-scrollbar {
        display: none;
    }
    
    .alphabet-bar .letter-btn {
        flex-shrink: 0;
        width: 30px;
        height: 30px;
    }
    
    .advanced-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-dropdown-menu {
        position: fixed;
        left: 1rem !important;
        right: 1rem !important;
        top: auto !important;
        bottom: 0;
        max-height: 60vh;
        border-radius: 20px 20px 0 0;
        transform: none !important;
        animation: mobileDropdownSlide 0.25s ease !important;
    }
    
    .filter-dropdown-menu.show::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
    }
    
    .dropdown-scroll {
        max-height: calc(60vh - 20px);
        padding: 0.75rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    }
    
    .dropdown-scroll button {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
}

@keyframes mobileDropdownSlide {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 480px) {
    .filter-tab {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .alphabet-bar .letter-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* Dark Mode - Discovery Bar */
html[data-theme="dark"] .discovery-bar {
    background: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
}

html[data-theme="dark"] .search-wrapper input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .search-wrapper input::placeholder {
    color: #64748b;
}

html[data-theme="dark"] .search-wrapper input:focus {
    border-color: #22c55e;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

html[data-theme="dark"] .search-clear {
    background: #334155;
    color: #94a3b8;
}

html[data-theme="dark"] .search-clear:hover {
    background: #475569;
    color: #e2e8f0;
}

html[data-theme="dark"] .discover-btn {
    background: #166534;
}

html[data-theme="dark"] .discover-btn:hover {
    background: #15803d;
}

html[data-theme="dark"] .discovery-filters {
    border-top-color: #1e293b;
}

html[data-theme="dark"] .filter-tabs {
    background: #1e293b;
}

html[data-theme="dark"] .filter-tab {
    color: #94a3b8;
}

html[data-theme="dark"] .filter-tab:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .filter-tab.active,
html[data-theme="dark"] .filter-tab.dropdown-open {
    background: #0f172a;
    color: #22c55e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .filter-dropdown-menu {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}

html[data-theme="dark"] .dropdown-scroll button {
    color: #cbd5e1;
}

html[data-theme="dark"] .dropdown-scroll button:hover {
    background: #334155;
}

html[data-theme="dark"] .dropdown-scroll button.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

html[data-theme="dark"] .advanced-toggle {
    border-color: #334155;
    color: #94a3b8;
}

html[data-theme="dark"] .advanced-toggle:hover {
    border-color: #475569;
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .advanced-toggle.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

html[data-theme="dark"] .alphabet-bar {
    border-top-color: #1e293b;
}

html[data-theme="dark"] .alphabet-bar .letter-btn {
    color: #64748b;
}

html[data-theme="dark"] .alphabet-bar .letter-btn:hover:not(.disabled) {
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .alphabet-bar .letter-btn.active {
    background: #166534;
    color: #fff;
}

html[data-theme="dark"] .alphabet-bar .letter-btn.disabled {
    color: #334155;
}

html[data-theme="dark"] .advanced-panel {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .advanced-field label {
    color: #94a3b8;
}

html[data-theme="dark"] .advanced-field input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .advanced-field input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

html[data-theme="dark"] .advanced-actions {
    border-top-color: #334155;
}

html[data-theme="dark"] .btn-reset {
    border-color: #475569;
    color: #94a3b8;
}

html[data-theme="dark"] .btn-reset:hover {
    background: #334155;
    border-color: #64748b;
    color: #e2e8f0;
}

html[data-theme="dark"] .btn-apply {
    background: #166534;
}

html[data-theme="dark"] .btn-apply:hover {
    background: #15803d;
}

html[data-theme="dark"] .results-bar {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.15);
}

html[data-theme="dark"] .results-text {
    color: #cbd5e1;
}

html[data-theme="dark"] .results-text strong {
    color: #22c55e;
}

html[data-theme="dark"] .results-clear {
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

html[data-theme="dark"] .results-clear:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

html[data-theme="dark"] .autocomplete-dropdown {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}

html[data-theme="dark"] .autocomplete-section:not(:last-child) {
    border-bottom-color: #334155;
}

html[data-theme="dark"] .autocomplete-section-title {
    color: #64748b;
}

html[data-theme="dark"] .autocomplete-item:hover,
html[data-theme="dark"] .autocomplete-item.highlighted {
    background: #334155;
}

html[data-theme="dark"] .autocomplete-item-icon {
    background: #334155;
}

html[data-theme="dark"] .autocomplete-item-name {
    color: #f3f4f6;
}

html[data-theme="dark"] .autocomplete-item-type {
    background: #374151;
    color: #d1d5db;
}

html[data-theme="dark"] .btn-discover {
    background: linear-gradient(135deg, #166534, #15803d) !important;
}

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

/* Modern martyr cards within gallery */
.gallery-grid .martyr-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 
                0 8px 30px rgba(15, 23, 42, 0.04), 
                0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    content-visibility: auto;
    contain-intrinsic-size: auto 380px;
    cursor: pointer;
}

/* Phase 3.3 — Premium gradient top border accent on gallery cards */
.gallery-grid .martyr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-grid .martyr-card:hover {
    transform: translateY(-8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 
                0 12px 40px rgba(15, 23, 42, 0.06), 
                0 32px 80px rgba(15, 23, 42, 0.12);
}

.gallery-grid .martyr-card:hover::before {
    opacity: 1;
}

/* Card touch feedback */
.gallery-grid .martyr-card:active {
    transform: scale(0.98);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

/* Gallery: 2-column grid on tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    .gallery-grid .martyr-photo-wrapper img,
    .gallery-grid .martyr-photo-placeholder {
        height: 180px;
    }
    .gallery-grid .martyr-info {
        padding: 1rem 1.1rem 1.1rem;
    }
    .gallery-grid .martyr-name {
        font-size: 0.95rem;
    }
}

/* Card entrance animation */
.gallery-grid .martyr-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeUp 0.5s ease-out forwards;
}

.gallery-grid .martyr-card:nth-child(1) { animation-delay: 0s; }
.gallery-grid .martyr-card:nth-child(2) { animation-delay: 0.05s; }
.gallery-grid .martyr-card:nth-child(3) { animation-delay: 0.1s; }
.gallery-grid .martyr-card:nth-child(4) { animation-delay: 0.15s; }
.gallery-grid .martyr-card:nth-child(5) { animation-delay: 0.2s; }
.gallery-grid .martyr-card:nth-child(6) { animation-delay: 0.25s; }

@keyframes cardFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-grid .martyr-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-grid .martyr-photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #dfe7e9, #cfd9df);
}

.gallery-grid .martyr-photo-wrapper img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-grid .martyr-card:hover .martyr-photo-wrapper img {
    transform: scale(1.04);
}

.gallery-grid .martyr-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
    font-size: 2.5rem;
    color: #9ca3af;
}

.gallery-grid .martyr-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.02));
    mix-blend-mode: multiply;
    pointer-events: none;
}

.gallery-grid .martyr-info {
    padding: 1.25rem 1.4rem 1.3rem;
}

.gallery-grid .martyr-name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.gallery-grid .martyr-symbol {
    font-size: 1.05rem;
    color: var(--secondary-color);
}

.gallery-grid .martyr-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--primary-color);
}

.gallery-grid .martyr-meta {
    margin: 0.15rem 0;
    font-size: 0.9rem;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-grid .martyr-meta-icon {
    font-size: 0.95rem;
    opacity: 0.85;
}

.gallery-grid .martyr-organization {
    margin-top: 0.3rem;
    font-size: 0.88rem;
    color: #666666;
}

.gallery-grid .martyr-card-button {
    margin-top: 0.95rem;
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(44, 85, 48, 0.35);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-grid .martyr-card-button::after {
    content: '↗';
    font-size: 0.9rem;
}

.gallery-grid .martyr-card-button:hover {
    background: #f0f5f1;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.12);
    border-color: rgba(44, 85, 48, 0.6);
    transform: translateY(-1px);
}

.martyr-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 0.9rem;
}

.martyr-share-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4b5563;
    font-weight: 700;
}

.martyr-share-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.martyr-share-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.martyr-share-icon:hover,
.martyr-share-icon:focus-visible {
    color: var(--primary-color);
    background: rgba(44, 85, 48, 0.08);
    transform: translateY(-2px);
}

.martyr-share-icon:focus-visible {
    outline: 3px solid rgba(44, 85, 48, 0.25);
    outline-offset: 3px;
}

.martyr-share-row-modal {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
}

.martyr-share-row-modal .martyr-share-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

@media (max-width: 600px) {
    .gallery-grid .martyr-photo-wrapper img,
    .gallery-grid .martyr-photo-placeholder {
        height: 200px;
    }
    .gallery-grid .martyr-info {
        padding: 1.1rem 1.2rem 1.2rem;
    }
}

/* Footer Styles */
.site-footer {
    /* Baluch flag inspired footer background */
    background: linear-gradient(135deg, 
        var(--baluch-green) 0%, 
        var(--baluch-green) 33%, 
        var(--baluch-red) 33%, 
        var(--baluch-red) 66%, 
        var(--baluch-blue) 66%, 
        var(--baluch-blue) 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

/* Phase 2.2 — Footer mobile tap target and spacing */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }
    .footer-section a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.25rem 0;
    }
}

/* Add subtle star pattern to footer */
.site-footer::before {
    content: '★ ★ ★';
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 1.2rem;
    color: var(--baluch-white);
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

.site-footer .container {
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--baluch-white);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--baluch-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--baluch-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    transform: translateX(3px);
}

.footer-section p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--baluch-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.footer-bottom p {
    margin: 0.5rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Anniversary Slider Styles */
.anniversaries {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.anniversaries::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.1) 50%, transparent 70%);
    animation: shimmer 6s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.anniversaries h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.slider-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: white;
    z-index: 1;
}

.slider {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
    display: none;
}

.slide.active {
    display: block;
}

.anniversary-card {
    margin: 0;
    height: auto;
    background: white;
    display: flex;
    align-items: center;
    padding: 2.5rem;
    min-height: 300px;
}

.anniversary-card .martyr-image {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.anniversary-card:hover .martyr-image {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.anniversary-card .martyr-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.anniversary-card .martyr-info {
    flex: 1;
    padding: 0;
}

.anniversary-card .martyr-info h3 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.anniversary-card .martyr-dates {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.anniversary-card .martyr-location {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.anniversary-card .martyr-location::before {
    content: '📍';
    margin-right: 0.5rem;
    font-size: 1rem;
}

.anniversary-date {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 25px;
    display: inline-block;
    border: 2px solid var(--secondary-color);
}

.martyr-bio {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.anniversary-card .btn-small {
    background: linear-gradient(135deg, var(--primary-color), #4a7c59);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
}

.anniversary-card .btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 85, 48, 0.4);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44, 85, 48, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.slider-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

.slider-dots {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dot:hover {
    background: #999;
    transform: scale(1.2);
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 4px 10px rgba(44, 85, 48, 0.3);
}

.no-anniversaries {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Confirmation Page Styles */
.confirmation-page {
    padding: 4rem 0;
    background: var(--light-color);
    min-height: 60vh;
}

.confirmation-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 3rem;
    text-align: center;
}

.confirmation-icon {
    margin-bottom: 2rem;
}

.checkmark {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.checkmark svg {
    stroke: white;
    stroke-width: 3;
    width: 40px;
    height: 40px;
}

.confirmation-content h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.confirmation-content h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.verification-info {
    text-align: left;
    margin: 2rem 0;
    background: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
}

.verification-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.verification-info ul {
    list-style: none;
    padding: 0;
}

.verification-info li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.timeline-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    color: #856404;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--btn-outline-border);
    color: var(--btn-gradient-start);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(44, 85, 48, 0.08);
    color: var(--btn-gradient-start);
    box-shadow: 0 10px 22px rgba(44, 85, 48, 0.2);
}

.contact-info {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.submission-id {
    font-family: monospace;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
}

.reference-number {
    font-weight: bold;
    color: var(--primary-color);
}

.submitted-martyr-info {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.status-pending {
    color: #856404;
    background: #fff3cd;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.info-card {
    max-width: 800px;
    margin: 2rem auto 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* =============================================
   About Page – Extracted Inline Styles
   ============================================= */

/* Outer content wrapper */
.about-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Introduction card */
.about-intro {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
}

html[data-theme="dark"] .about-intro {
    background: #0f172a;
}

.about-intro h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

html[data-theme="dark"] .about-intro-text {
    color: #94a3b8;
}

/* Reusable mission/why/services/contribute section wrapper */
.about-mission {
    margin-bottom: 3rem;
}

/* Section title with accent underline */
.about-section-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Body paragraphs */
.about-body-text {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-body-text-last {
    line-height: 1.8;
}

/* "Why This Memorial" 2-col grid */
.about-why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* White cards inside the grid */
.about-why-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .about-why-card {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.about-why-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-why-card p {
    line-height: 1.6;
}

/* Quote / italic callout */
.about-quote {
    line-height: 1.8;
    text-align: center;
    font-style: italic;
    color: #666;
}

html[data-theme="dark"] .about-quote {
    color: #94a3b8;
}

/* Services auto-fit grid */
.about-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Individual service cards */
.about-service-card {
    background: #e8f4f8;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

html[data-theme="dark"] .about-service-card {
    background: #0f172a;
    border-left-color: var(--accent-color);
}

.about-service-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-service-card p {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Join Our Mission – intro paragraph */
.about-join-text {
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: center;
}

/* Contribute wrapper (white card with shadow) */
.about-contribute-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .about-contribute-wrapper {
    background: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.about-contribute-wrapper h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Contribute 4-col auto grid */
.about-contribute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Each contribute item */
.about-contribute-item {
    text-align: center;
    padding: 1rem;
}

.about-contribute-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-contribute-item p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Round gold icon circles */
.about-contribute-icon {
    background: var(--accent-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Our Sacred Promise / Commitment section */
.about-promise {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
}

html[data-theme="dark"] .about-promise {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.about-promise h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-promise-text {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Flex row for value icons */
.about-promise-values {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Each value (Respect / Accuracy / Dignity) */
.about-promise-value {
    text-align: center;
}

.about-promise-value-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-promise-value strong {
    color: var(--primary-color);
}

/* =============================================
   About Page – Responsive Overrides
   ============================================= */

@media (max-width: 768px) {
    .about-why-grid {
        display: block;
    }

    .about-why-card {
        margin-bottom: 1rem;
    }

    .about-promise-values {
        flex-direction: column;
        gap: 1rem;
    }

    .about-intro,
    .about-contribute-wrapper {
        padding: 1.5rem;
    }

    .about-promise {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .about-intro,
    .about-contribute-wrapper {
        padding: 1rem;
    }
}

/* =============================================
   Contact Page – Extracted Inline Styles
   ============================================= */

.contact-info-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-details {
    margin: 2rem 0;
}

/* Error States */
.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Helper text shown under date fields on the add-martyr form */
.date-helper {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #555;
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Responsive Design - Mobile Menu */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
    
    /* Hide desktop nav menu */
    .nav-menu {
        display: none !important;
    }
    
    /* Mobile dropdown drawer with premium glassmorphism */
    .nav-menu.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.88) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        padding: 1.25rem 1rem !important;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15) !important;
        border-radius: 0 0 20px 20px !important;
        border: 1px solid rgba(148, 163, 184, 0.2) !important;
        border-top: none !important;
        z-index: 9999 !important;
        min-height: auto !important;
        max-width: 100vw !important;
        margin: 0 !important;
        transform: translateY(0) !important;
        box-sizing: border-box !important;
    }

    /* Phase 4.1 — Backdrop overlay behind mobile nav menu */
    .nav-menu.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: -1;
        animation: backdropFadeIn 0.25s ease;
    }

    @keyframes backdropFadeIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    html[data-theme="dark"] .nav-menu.active {
        background: rgba(15, 23, 42, 0.88) !important;
        border-color: rgba(148, 163, 184, 0.15) !important;
        box-shadow: 0 10px 40px rgba(2, 6, 23, 0.5) !important;
    }

    /* Elegant Baluch flag ribbon at top of drawer */
    .nav-menu.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, 
            var(--baluch-blue) 0%, 
            var(--baluch-blue) 33%, 
            var(--baluch-red) 33%, 
            var(--baluch-red) 66%, 
            var(--baluch-green) 66%, 
            var(--baluch-green) 100%) !important;
        z-index: 10;
        border-radius: 0;
    }
    
    /* Staggered link animations */
    .nav-menu.active li {
        width: 100%;
        margin: 0;
        opacity: 0;
        animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .nav-menu.active li:nth-child(1) { animation-delay: 0.04s; }
    .nav-menu.active li:nth-child(2) { animation-delay: 0.08s; }
    .nav-menu.active li:nth-child(3) { animation-delay: 0.12s; }
    .nav-menu.active li:nth-child(4) { animation-delay: 0.16s; }
    .nav-menu.active li:nth-child(5) { animation-delay: 0.20s; }
    .nav-menu.active li:nth-child(6) { animation-delay: 0.24s; }
    .nav-menu.active li:nth-child(7) { animation-delay: 0.28s; }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-menu.active a {
        display: block !important;
        width: 100% !important;
        padding: 0.75rem 1.25rem !important;
        margin: 0.25rem 0 !important;
        border-radius: 10px !important;
        transition: all 0.2s ease !important;
        text-align: center !important;
        border: 1px solid rgba(15, 23, 42, 0.06) !important;
        color: var(--text-color, #1e293b) !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        background: rgba(15, 23, 42, 0.03) !important;
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        box-sizing: border-box !important;
        text-shadow: none !important;
    }

    html[data-theme="dark"] .nav-menu.active a {
        background: rgba(255, 255, 255, 0.04) !important;
        border-color: rgba(255, 255, 255, 0.06) !important;
        color: #f1f5f9 !important;
    }
    
    .nav-menu.active a:hover,
    .nav-menu.active a.active {
        background: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
        transform: translateY(-1px) !important;
    }

    html[data-theme="dark"] .nav-menu.active a:hover,
    html[data-theme="dark"] .nav-menu.active a.active {
        background: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }
    
    /* Adjust star position for mobile */
    .site-header::before {
        display: none; /* Hide star on very small screens to save space */
    }
    
    .nav-brand h1 {
        font-size: 1.2rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
    
    /* Slider responsive */
    .slider .martyr-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .slider .martyr-image {
        width: 150px;
        height: 150px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .slider-container {
        margin: 0 1rem;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Confirmation page responsive */
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions .btn {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Search responsive */
    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-actions {
        justify-content: stretch;
        flex-direction: column;
    }
    
    .search-actions .btn-small {
        width: 100%;
    }
    
    .search-results-info {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        text-align: center;
    }
    
    /* Anniversary slider responsive */
    .slider-container {
        margin: 0 auto;
        padding: 0;
        max-width: 500px;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    
    .anniversary-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1.25rem 1.75rem;
        min-height: auto;
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }
    
    .anniversary-card .martyr-image {
        width: min(75vw, 260px);
        max-width: 260px;
        aspect-ratio: 4 / 5;
        margin: 0 auto 1.4rem auto;
        padding: 0.5rem;
        background: linear-gradient(160deg, #fefaf2, #eef9f1);
        border-radius: 18px;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
        border: 1px solid rgba(44, 85, 48, 0.1);
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .anniversary-card .martyr-image::after {
        content: '';
        position: absolute;
        inset: 0.4rem;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.55);
        pointer-events: none;
    }
    
    .anniversary-card .martyr-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 14px;
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    }
    
    .anniversary-card .martyr-info {
        padding: 0;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        text-align: left;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .anniversary-card .martyr-info h3 {
        font-size: 1.4rem;
    }

    .anniversary-card .martyr-dates,
    .anniversary-card .martyr-location,
    .anniversary-date {
        font-size: 1rem;
        margin-bottom: 0.45rem;
    }
    
    .anniversary-card .martyr-location {
        justify-content: flex-start;
    }

    .anniversary-card .martyr-bio,
    .anniversaries .martyr-bio {
        display: none !important;
    }

    .anniversary-card .btn-small {
        padding: 0.55rem 1.2rem;
        font-size: 0.95rem;
        border-radius: 999px;
        width: fit-content;
        min-width: 150px;
        margin: 0.4rem 0 0;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .nav-brand h1 {
        font-size: 1.2rem;
    }

    /* Anniversary slider - extra small screens (better spacing + tap targets) */
    .slider-container {
        margin: 0 auto;
        padding: 0;
        border-radius: 12px;
        max-width: 94vw;
    }
    
    .anniversary-card {
        padding: 1.3rem 1.05rem 1.5rem;
        border-radius: 16px;
        max-width: 420px;
    }
    
    .anniversary-card .martyr-image {
        width: min(80vw, 230px);
        max-width: 230px;
        aspect-ratio: 4 / 5;
        margin-bottom: 1.15rem;
        padding: 0.45rem;
        border-radius: 18px;
    }
    
    .anniversary-card .martyr-info {
        max-width: 320px;
        text-align: left;
    }

    .anniversary-card .martyr-info h3 {
        font-size: 1.25rem;
    }

    .anniversary-card .martyr-dates,
    .anniversary-card .martyr-location,
    .anniversary-date {
        font-size: 0.95rem;
        margin-bottom: 0.35rem;
    }
    
    .anniversary-card .martyr-location {
        justify-content: flex-start;
    }

    .anniversary-card .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 140px;
        margin: 0.35rem 0 0;
    }

    .anniversary-card .martyr-info h3 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .anniversary-card .martyr-dates {
        font-size: 1rem;
    }

    .anniversary-card .martyr-location {
        justify-content: center;
    }

    .anniversary-date {
        font-size: 1.05rem;
        padding: 0.45rem 0.85rem;
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .martyr-bio {
        display: none !important;
    }

    .anniversary-card .btn-small {
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Easier tap targets for slider controls */
    .slider-btn {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .dot {
        width: 14px;
        height: 14px;
        margin: 0 10px;
    }
}


    
    /* Add globe icon for mobile */
    .nav-menu.active #google_translate_element::before {
        content: '🌐 ';
        color: white;
        font-size: 1.1rem;
        margin-right: 0.5rem;
        display: inline-block;
        vertical-align: middle;
    }
    
    /* Fix mobile interaction issues */
    .nav-menu.active .goog-te-combo:focus,
    .nav-menu.active #google_translate_element select:focus {
        border-color: var(--secondary-color) !important;
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
    }
    
    /* Mobile touch optimization */
    .nav-menu.active .goog-te-combo,
    .nav-menu.active #google_translate_element select {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }
    
    /* Ensure proper stacking for mobile dropdown */
    .nav-menu.active {
        z-index: 9999 !important;
    }
}

/* Extra mobile optimization for very small screens */
@media (max-width: 480px) {
    #google_translate_element select,
    .goog-te-combo {
        font-size: 0.9rem !important;
        padding: 0.7rem 0.8rem !important;
        min-height: 48px !important;
    }
    
    .nav-menu.active #google_translate_element {
        padding: 0.5rem 1rem !important;
    }
}

/* Professional Martyr Details Modal Styles */
.martyr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease-out;
    backdrop-filter: blur(5px);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}
/* Martyr Modal Custom Header */
.martyr-modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #f9fafb;
    gap: 1rem;
    position: relative;
    flex-wrap: wrap; /* Bulletproof wrap */
}

.martyr-modal-header-title {
    flex: 1;
    min-width: 150px;
}

.martyr-modal-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.martyr-voice-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 99px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.close-martyr-modal {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.75);
    color: #f9fafb;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-martyr-modal:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

@media (max-width: 768px) {
    .martyr-modal-header {
        padding: 1.1rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }
    
    .martyr-modal-header-title {
        padding-right: 2.5rem; /* Leave room for absolute close button */
        width: 100%;
    }
    
    .martyr-modal-header-title h2 {
        font-size: 1.25rem !important; /* Prevent huge text from wrapping */
        line-height: 1.3;
    }
    
    .martyr-modal-header-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }
    
    .martyr-voice-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .martyr-print-btn-header {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    .close-martyr-modal {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.martyr-detail-layout {
    display: flex;
    gap: 0;
    min-height: 500px;
}

.martyr-detail-image {
    flex: 0 0 350px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e9ecef;
    position: relative;
    padding: 12px;
    /* Allow image to be properly contained */
}

.martyr-detail-photo {
    width: calc(100% - 24px);
    height: auto;
    max-height: calc(100% - 24px);
    object-fit: contain;
    object-position: center center;
    display: block;
    border-radius: 4px;
    transition: all 0.3s ease;
    /* Professional photo frame effect */
    border: 8px solid white;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    margin: 12px;
    /* Ensure minimum reasonable size */
    min-height: 300px;
    /* Center the image properly */
    align-self: center;
    justify-self: center;
}

.martyr-detail-image:hover .martyr-detail-photo {
    transform: scale(1.05);
}

.martyr-detail-placeholder {
    text-align: center;
    color: #6c757d;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    margin: 2rem;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    background: linear-gradient(135deg, #dee2e6, #adb5bd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.martyr-detail-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #868e96;
}

.martyr-detail-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.martyr-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.martyr-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.martyr-dates {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-birth, .date-death {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.date-separator {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.martyr-detail-content {
    flex: 1;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
}

.detail-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.detail-value {
    flex: 1;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
}

.biography-section,
.family-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.biography-section h3,
.family-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.biography-text,
.family-text {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.6;
    color: var(--text-color);
    font-size: 1rem;
}

.martyr-detail-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.submission-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.submission-date {
    font-style: italic;
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
        scale: 0.9;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
        scale: 1;
    }
}

.martyr-modal.modal-show {
    animation: modalFadeIn 0.3s ease-out;
}

.martyr-modal.modal-show .modal-container {
    animation: modalSlideIn 0.3s ease-out;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-container {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 88vh !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: translate(0, 0) !important;
        border-radius: 24px 24px 0 0 !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35) !important;
        animation: bottomSheetSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Grab bar / Drag Handle for iOS-like sheet */
    .modal-container::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 5px;
        background: rgba(148, 163, 184, 0.35);
        border-radius: 3px;
        z-index: 100;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem !important; /* spacing adjustment */
    }

    .modal-body {
        max-height: calc(88vh - 80px) !important;
    }
    
    .martyr-detail-layout {
        flex-direction: column;
        min-height: auto;
    }
    
    .martyr-detail-image {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 12px;
        background: transparent;
    }
    
    .martyr-detail-photo {
        min-height: 220px;
        max-height: 350px;
        width: min(80vw, 260px) !important;
        margin: 0 auto !important;
        border: 6px solid white;
        object-fit: contain;
    }
    
    .martyr-detail-placeholder {
        margin: 1.5rem;
        min-height: 220px;
        padding: 2rem 1rem;
    }
    
    .martyr-detail-info {
        padding: 1.5rem;
    }
    
    .martyr-name {
        font-size: 1.5rem;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .detail-label {
        flex: none;
        font-size: 0.9rem;
    }
    
    .detail-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-container {
        max-height: 92vh !important;
    }
    
    .modal-body {
        max-height: calc(92vh - 76px) !important;
    }
    
    .martyr-detail-image {
        padding: 8px;
    }
    
    .martyr-detail-photo {
        min-height: 180px;
        max-height: 280px;
        width: min(85vw, 220px) !important;
    }
    
    .martyr-detail-placeholder {
        margin: 1rem;
        min-height: 180px;
        padding: 1.5rem 1rem;
    }
    
    .martyr-detail-info {
        padding: 1.25rem 1rem;
    }
    
    .martyr-name {
        font-size: 1.3rem;
    }
    
    .biography-text,
    .family-text {
        padding: 1rem;
        font-size: 0.95rem;
    }
}

@keyframes bottomSheetSlide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

html[data-theme="dark"] .modal-shell {
    background: #020617;
    box-shadow: 0 40px 90px rgba(2, 6, 23, 0.85);
}

html[data-theme="dark"] .modal-hero {
    background: linear-gradient(145deg, #020617, #0b1120);
    color: #f8fafc;
}

html[data-theme="dark"] .modal-content-grid {
    background: linear-gradient(120deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.95));
}

html[data-theme="dark"] .modal-photo-frame {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.7);
}

html[data-theme="dark"] .modal-photo-placeholder {
    color: #94a3b8;
    background: linear-gradient(145deg, #1f2937, #0f172a);
}

html[data-theme="dark"] .modal-detail-panel {
    color: #e2e8f0;
}

html[data-theme="dark"] .martyr-modal-label {
    color: #94a3b8;
}

html[data-theme="dark"] .martyr-modal-value {
    color: #f8fafc;
}

html[data-theme="dark"] .modal-section {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .modal-section h3,
html[data-theme="dark"] .modal-section-body {
    color: #e2e8f0;
}

html[data-theme="dark"] .modal-voice-btn {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 25px rgba(2, 6, 23, 0.7);
}

html[data-theme="dark"] .modal-submission {
    color: #cbd5f5;
}

/* Professional Skeleton Loader */
.skeleton-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: var(--bg-card, #ffffff);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

html[data-theme="dark"] .skeleton-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.1);
}

.skeleton-img {
    height: 200px;
    width: 100%;
}

.skeleton-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
}

.skeleton-line.title {
    height: 24px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-line.dates {
    width: 40%;
}

.skeleton-line.location {
    width: 55%;
}

.skeleton-btn {
    height: 38px;
    width: 120px;
    margin-top: 12px;
    border-radius: 6px;
}

/* Phase 3.4 — Improved skeleton shimmer (wider, smoother, slower) */
.shimmer {
    background: #f6f7f8;
    background-image: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.02) 0px,
        rgba(0, 0, 0, 0.06) 100px,
        rgba(0, 0, 0, 0.02) 200px
    );
    background-size: 800px;
    animation: shimmer 2s infinite ease-in-out;
}

html[data-theme="dark"] .shimmer {
    background: #1e293b;
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.02) 0px,
        rgba(255, 255, 255, 0.07) 100px,
        rgba(255, 255, 255, 0.02) 200px
    );
    background-size: 800px;
}

@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* Tactile Touch Feedback for Interactive Mobile Elements */
@media (max-width: 768px) {
    .btn:active,
    .filter-tab:active,
    .letter-btn:active,
    .hamburger:active,
    .theme-toggle:active,
    .close-martyr-modal:active,
    .modal-close:active,
    .slider-btn:active,
    .back-to-top:active,
    .martyr-card:active {
        transform: scale(0.96) !important;
        transition: transform 0.08s ease !important;
        will-change: transform;
    }
}

/* Premium scrollable overflow visual gradient cue for mobile horizontal scrollbars */
@media (max-width: 768px) {
    .filter-tabs,
    .alphabet-bar {
        mask-image: linear-gradient(to right, 
            transparent 0%, 
            rgba(0, 0, 0, 0.2) 2%, 
            black 6%, 
            black 94%, 
            rgba(0, 0, 0, 0.2) 98%, 
            transparent 100%) !important;
        -webkit-mask-image: linear-gradient(to right, 
            transparent 0%, 
            rgba(0, 0, 0, 0.2) 2%, 
            black 6%, 
            black 94%, 
            rgba(0, 0, 0, 0.2) 98%, 
            transparent 100%) !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* Phase 2: Narrow mobile spacing improvements */
@media (max-width: 480px) {
    .container {
        padding: 0 12px !important;
    }
    .gallery-section {
        padding: 2rem 0 !important;
    }
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .gallery-grid .martyr-card {
        border-radius: 14px !important;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
    }
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform 0.3s ease;
}

html[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 65px;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    gap: 4px;
    height: 100%;
}

html[data-theme="dark"] .bottom-nav-item {
    color: #94a3b8;
}

.bottom-nav-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Active State */
.bottom-nav-item.active {
    color: var(--primary-color);
}

html[data-theme="dark"] .bottom-nav-item.active {
    color: #a7f3d0; /* A soft mint green from the palette for dark mode */
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-2px);
}

.bottom-nav-item:active {
    transform: scale(0.92);
}

/* Show only on true mobile touch screens */
@media (max-width: 768px) and (pointer: coarse) {
    .mobile-bottom-nav {
        display: block;
    }
    
    /* Ensure content is not hidden behind the fixed nav bar */
    body {
        padding-bottom: calc(65px + env(safe-area-inset-bottom));
    }
}

