/* Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Inter:opsz,wght@14..32,100..900&display=swap');

/* --------
   Variables (from variables.css)
   -------- */
:root {
    /* Typography */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease-out;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

[data-theme='light'] {
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --color-surface-hover: #f0f0f0;
    --color-surface-translucent: rgba(255, 255, 255, 0.85);
    --color-text-primary: #000000;
    --color-text-secondary: #555555;
    --color-accent: #B40000;
    --color-accent-hover: #900000;
    --color-accent-text: #ffffff;
    --color-border: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] {
    /* Deep Black Theme from Reference */
    --color-bg: #000000;
    --color-surface: #0a0a0a;
    --color-surface-hover: #141414;
    --color-surface-translucent: rgba(0, 0, 0, 0.8);
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-accent: #ffffff;
    --color-accent-text: #000000;
    /* White accent for minimal contrast in deep dark */
    --color-accent-hover: #e0e0e0;
    --color-border: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* --------
   Global Styles (from global.css)
   -------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-en);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Global Content Spacing for Fixed Nav */
main {
    /* padding-top: 7rem !important; */
    /* Increased from 5rem to avoid nav overlap */
}

/* Home page hero usually handles its own spacing */
.home-page main {
    padding-top: 0 !important;
}

[lang='ar'] body {
    font-family: var(--font-ar);
    direction: rtl;
}

[lang='en'] body {
    direction: ltr;
}

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

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* Glassmorphism Utility */
.glass {
    background: var(--color-surface-translucent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Utility Classes */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.min-h-screen {
    min-height: 100vh;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.text-center {
    text-align: center;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

.hidden {
    display: none !important;
}

/* Modal Utilities (Tailwind-like) */
.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.bg-black {
    background-color: #000000;
}

.bg-opacity-95 {
    background-color: rgba(0, 0, 0, 0.95);
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.max-w-6xl {
    max-width: 72rem;
}

.overflow-y-auto {
    overflow-y: auto;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.p-2 {
    padding: 0.5rem;
}

.p-6 {
    padding: 1.5rem;
}

.top-4 {
    top: 1rem;
}

.right-4 {
    right: 1rem;
}

[lang='ar'] .right-4 {
    right: auto;
    left: 1rem;
}

.text-white {
    color: white;
}

.hover\:text-red-500:hover {
    color: #ef4444;
}

.text-red-500 {
    color: #ef4444;
}

.transition-colors {
    transition: color 0.2s ease;
}

/* Footer Spacing - Ensure space between content and footer */
main {
    margin-bottom: 4rem;
}


@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }
}

/* --------
   Navbar Styles (from navbar.css)
   -------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: all var(--transition-normal);
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: var(--color-surface-translucent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

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

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .nav-logo-img {
        height: 64px;
    }
}

.nav-hero-mode:not(.scrolled) .navbar-logo,
.nav-hero-mode:not(.scrolled) .nav-link,
.nav-hero-mode:not(.scrolled) .icon-btn {
    color: #ffffff;
}

/* Ensure text becomes dark in light mode when scrolled */
.navbar.scrolled .navbar-logo,
.navbar.scrolled .nav-link,
.navbar.scrolled .icon-btn {
    color: var(--color-text-primary);
}

.navbar-logo:hover {
    opacity: 0.8;
}

.nav-links-desktop {
    display: none;
}

.nav-links-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-divider {
    height: 1.5rem;
    width: 1px;
    background-color: var(--color-border);
}

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

.icon-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    /* color: #ffffff; */
    color: var(--color-text-primary);
    transition: background-color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--color-border);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    /* color: #ffffff; */
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 110;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

[lang="en"] .nav-dropdown-content {
    right: auto;
    left: 0;
}

.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-dropdown-content a:hover {
    background: var(--color-border);
    color: var(--color-accent);
}

/* Dropdown in hero mode (white text) */
.nav-hero-mode:not(.scrolled) .nav-dropdown-content {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-hero-mode:not(.scrolled) .nav-dropdown-content a {
    color: #ffffff;
}

.nav-hero-mode:not(.scrolled) .nav-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--color-text-primary);
    padding: 0.5rem;
}

.mobile-menu-container {
    overflow: hidden;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.mobile-menu-container.open {
    max-height: 500px;
    /* Arbitrary large height */
    opacity: 1;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

.mobile-nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.mobile-nav-link.active {
    color: var(--color-accent);
}

.mobile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    font-weight: 500;
}

@media (min-width: 768px) {
    .nav-links-desktop {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

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

    .mobile-menu-btn {
        display: none;
    }
}

@media (min-width: 1280px) {
    .nav-links-desktop {
        gap: 2rem;
    }

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

/* --------
   Hero Styles (from hero.css - inferred/recreated)
   -------- */
.hero-section {
    position: relative;
    height: 85vh;
    /* Mobile: Reduced to 85vh to clearly show content below fold */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-section {
        height: 100vh;
        /* Desktop: Full screen */
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    /* Increased from 800px to prevent title wrapping */
    padding: 0 1rem;
    color: white;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-kicker {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    display: inline-block;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 6rem;
        /* Match React destkop size */
    }

    .hero-subtitle {
        font-size: 1.5rem;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-kicker {
        font-size: 1.25rem;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    opacity: 0.8;
    z-index: 10;
}

.scroll-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}




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

.hero-actions .btn-primary {
    background-color: white;
    color: black;
}

.hero-actions .btn-primary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-accent-text);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    color: var(--color-accent-text);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background-color: white;
    color: black;
    transform: translateY(-2px);
}

@media (max-width: 768px) {


    .hero-title {
        font-size: 2.5rem;
    }

    .main-content {
        display: flex;
        flex-direction: column;
    }

    /* Reorder for mobile: Stats first, then Links, then others */
    .stats-section {
        order: 1;
    }

    .links-section {
        order: 2;
        padding-top: 2rem !important;
        /* Adjust spacing since it's now higher up */
        padding-bottom: 2rem !important;
    }

    .vision-section {
        order: 3;
    }

    .departments-section {
        order: 4;
    }

    .jerusalem-section {
        order: 5;
    }

    /* Improve Typography for Mobile */
    p {
        font-size: 1.05rem;
        /* Slightly larger reading text */
        line-height: 1.7;
    }

    .section-title {
        margin-bottom: 2rem !important;
        /* Increase spacing */
    }
}

/* --------
   Home Styles (from home.css)
   -------- */
.stats-section {
    padding: 4rem 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: center;
}

.dept-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dept-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.quick-link-card {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border);
    min-width: 140px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.quick-link-card:hover {
    background: var(--color-surface-hover) !important;
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-lg);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-en);
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
}

.featured-section {
    padding: 4rem 0;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.section-subtitle {
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.jerusalem-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.jerusalem-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.jerusalem-value {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-family: var(--font-en);
}

.reports-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-border);
    text-align: center;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
}

.reports-empty-state:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-number {
        font-size: 3rem;
    }
}

/* --------
   Footer Styles (from footer.css)
   -------- */
.footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.brand-column h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--color-text-primary), var(--color-text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-column p {
    color: var(--color-text-secondary);
    width: 100%;
    max-width: 100%;
    text-align: justify;
    text-align-last: start;
    font-size: 0.85rem;
    line-height: 1.6;
    /* Clamp to 4 lines on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#main-stats {
    scroll-margin-top: 100px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column a {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
    width: 100%;
    text-align: right;
}

.footer-column a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* Mobile footer - brand on top full width, 3 columns below */
@media (max-width: 767px) {
    .footer-top {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .brand-column {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .brand-column h3 {
        text-align: center;
        font-size: 1.25rem;
    }

    .brand-column p {
        text-align: center;
        text-align-last: center;
        max-width: 100%;
    }

    .footer-column h4 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .footer-column a {
        font-size: 0.8rem;
        text-align: center;
    }

    .footer-column ul {
        align-items: center;
    }
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 2rem;
    }

    .brand-column p {
        /* Show full text on desktop */
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
        line-clamp: unset;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* --------
   Tiles Styles (from tiles.css)
   -------- */
.tiles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    display: flex;
    justify-content: center;
    background-color: var(--color-bg);
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.tile-row {
    position: relative;
    border-left: 1px solid var(--color-border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.tile {
    position: relative;
    border-top: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    background-color: transparent;
    flex-shrink: 0;
}

.tile-sm {
    width: 2rem;
    height: 2rem;
}

.tile-md {
    width: 3rem;
    height: 3rem;
}

.tile-lg {
    width: 4rem;
    height: 4rem;
}

@media (min-width: 768px) {
    .tile-md {
        width: 4rem;
        height: 4rem;
    }

    .tile-lg {
        width: 6rem;
        height: 6rem;
    }
}

/* FadeIn Animation Helper */
.fade-in-section {
    opacity: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------
   Martyrs Styles (from martyrs.css)
   -------- */
.martyrs-page {
    padding: 4rem 0 8rem 0;
    /* More space at bottom */
}

.filters-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

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

.martyr-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.martyr-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.martyr-image-placeholder {
    width: 100%;
    height: 180px;
    background: var(--color-surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

.martyr-info {
    padding: 1.25rem;
}

.martyr-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.martyr-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 0.25rem;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* Add colon via CSS if layout requires sticky colon, or just gap */
.meta-label::after {
    content: ":";
    margin-inline-start: 2px;
}

.meta-value {
    font-weight: 500;
    color: var(--color-text-primary);
    text-align: end;
}

@media (min-width: 768px) {
    .filters-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .search-input {
        max-width: 400px;
    }
}

.martyr-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    width: fit-content;
}

.filter-pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--color-accent);
    color: var(--color-surface);
    /* Ensures contrast: Black on White (Dark), White on Red (Light) */
    border-color: var(--color-accent);
}

/* Background Image Zoom Animation */
@keyframes zoomInfo {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

.animate-zoom {
    animation: zoomInfo 5s ease-out forwards;
}

/* Hero Scale Animation Helper */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* --------
   Stats Grid & Cards
   -------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Text color utilities */
.text-accent {
    color: var(--color-accent);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-red-500 {
    color: #ef4444;
}

/* Department Card Link Styling */
.dept-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform var(--transition-fast);
}

.dept-card-link:hover .dept-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

/* --------
   Premium Stats Grid (Dashboard Style)
   -------- */
.stats-grid-premium {
    display: grid;
    /* Wider minimum width to prevent squishing */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card-premium {
    background: rgba(18, 18, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Left border accent for dashboard look */
    border-right: 4px solid var(--color-accent);
    /* RTL: Right side is 'start' visual, but border-right is physically right */
    /* Let's use border-inline-start if supported, or just stick to a side. */
    /* Since it's RTL, border-right is the 'leading' edge usually? No, border-right is right. */
    /* Examples usually show accent on the 'start' side. For RTL that's Right. */
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* RTL Support for Border */
html[dir="rtl"] .stat-card-premium {
    border-right: 4px solid var(--color-accent);
    border-left: none;
}

html[dir="ltr"] .stat-card-premium {
    border-left: 4px solid var(--color-accent);
    border-right: none;
}

.stat-card-premium:hover {
    transform: translateY(-2px);
    background: rgba(25, 25, 35, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Icon Container - Flex Item */
.stat-card-premium .stat-icon-bg {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-accent);
    opacity: 1;
    /* Fully visible now */
    flex-shrink: 0;
}

.stat-card-premium .stat-icon-bg svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5px;
}

/* Variant Application to Icon Bg and Border */
.stat-card-premium.accent-red {
    border: 1px solid #ef4444 !important;
    /* Uniform border around entire card */
}

/* Simplify border override */
.stat-card-premium.accent-red .stat-icon-bg {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-card-premium.accent-red .stat-premium-value {
    color: #ef4444;
}

.stat-card-premium.accent-blue {
    border: 1px solid #3b82f6 !important;
}

.stat-card-premium.accent-blue .stat-icon-bg {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-card-premium.accent-blue .stat-premium-value {
    color: #3b82f6;
}

.stat-card-premium.accent-purple {
    border: 1px solid #a855f7 !important;
}

.stat-card-premium.accent-purple .stat-icon-bg {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.stat-card-premium.accent-purple .stat-premium-value {
    color: #a855f7;
}

.stat-card-premium.accent-green {
    border: 1px solid #22c55e !important;
}

.stat-card-premium.accent-green .stat-icon-bg {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-card-premium.accent-green .stat-premium-value {
    color: #22c55e;
}

.stat-card-premium.accent-amber {
    border: 1px solid #f59e0b !important;
}

.stat-card-premium.accent-amber .stat-icon-bg {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-card-premium.accent-amber .stat-premium-value {
    color: #f59e0b;
}

/* Content Layout */
.stat-card-premium-content {
    flex: 1;
    text-align: start;
    /* Align to start (Right in RTL) */
    min-width: 0;
    /* Prevent flex overflow */
}

.stat-premium-value {
    font-size: 1.75rem;
    /* Slightly smaller for better fit */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: #ffffff;
    /* Force white for default value */
    font-family: var(--font-heading, sans-serif);
    white-space: nowrap;
    /* Keep value on one line */
    overflow: visible;
}

.stat-premium-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    /* Clearer label color */
    line-height: 1.3;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .stats-grid-premium {
        grid-template-columns: 1fr;
        /* Full width on mobile */
        gap: 1rem;
    }

    .stat-card-premium {
        padding: 1.25rem;
    }

    .stat-premium-value {
        font-size: 1.5rem;
    }
}

/* --------
   Round 3 UI Refinements (Comprehensive)
   -------- */

/* 1. Home Page: Button Alignment */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-actions .btn-secondary {
    margin: 0;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* 2. Martyrs: Premium Stat Card Improvements */
.stat-card-premium {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(var(--color-accent), 0.2);
}

/* Light Mode: Stat Card Background & Text */
[data-theme="light"] .stat-card-premium {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .stat-premium-value {
    color: var(--color-text-primary) !important;
}

[data-theme="light"] .stat-premium-label {
    color: var(--color-text-secondary) !important;
}

[data-theme="light"] .stat-card-premium.accent-red {
    border-color: #ef4444 !important;
}

/* 3. Filters: Connected Pills Fix */
.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    border-radius: 9999px;
    margin-inline: 0.25rem;
    border: 1px solid var(--color-border);
}

.filter-pill.active {
    border-color: var(--color-accent);
}

/* 4. Jerusalem: Light Mode Grid Border */
[data-theme="light"] .jerusalem-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm);
}

/* 5. Archive: Light Mode Search Input */
[data-theme="light"] input[placeholder="ابحث..."] {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--color-text-primary) !important;
}

/* 6. About Us: Light Mode Block Background */
[data-theme="light"] .about-section .glass,
[data-theme="light"] .vision-card.glass {
    background: rgba(0, 0, 0, 0.04);
}

/* 7. Contact Page: Dark Theme Layout Fixes */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

[data-theme="dark"] .form-select option {
    background-color: #1a1a1a;
    color: white;
}

/* 8. Media Page: Button Visibility (Light Mode) */
[data-theme="light"] .btn-secondary {
    background: white !important;
    border: 1px solid var(--color-border) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="light"] .btn-secondary:hover {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
    background: var(--color-surface-hover) !important;
}

/* 9. Economic Report: Download Button Light Mode Text */
/* 9. Economic Report: Download Button Light Mode Text */
[data-theme="light"] .btn-primary {
    color: white !important;
}

/* Round 3 Refinements - Part 2 */

/* 10. Partner Logos (About Us) */
.partner-card {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast);
}

.partner-card:hover {
    transform: translateY(-2px);
}

[data-theme="light"] .partner-card.glass {
    background: white;
    /* Ensure contrast in light mode */
    border-color: rgba(0, 0, 0, 0.1);
}

/* 11. Mobile Menu Improvements */
.mobile-menu-container.open {
    max-height: 100vh;
    /* Allow full height */
    overflow-y: auto;
    /* Enable scrolling */
    padding-bottom: 2rem;
    background: var(--color-bg);
    /* Ensure solid background */
}

/* 12. Hero Buttons Consistency */
.hero-actions .btn-primary,
.hero-actions .btn-secondary {
    height: 3.5rem;
    /* Increased height */
    border-radius: 9999px;
    /* Full pill shape */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    /* Increased padding */
}

/* Fix Primary Button Visibility in Light Mode */
[data-theme="light"] .hero-actions .btn-primary {
    background-color: var(--color-accent) !important;
    color: white !important;
}

/* Round 3.2 - Filter Refactoring */
.filter-groups-wrapper {
    display: flex;
    flex-direction: column;
    /* Stack by default (Mobile) */
    gap: 1rem;
    align-items: flex-start;
    width: 100%;
}

@media (min-width: 768px) {
    .filter-groups-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        align-items: center;
    }
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-left: 0.5rem;
}

/* Round 3.3 - High Quality Selects */
.select-wrapper {
    position: relative;
    min-width: 140px;
    /* Ensure decent width */
}

.premium-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem 0.5rem 2rem;
    /* Left padding for chevron (RTL handled?) */
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* RTL Adj */
[dir="rtl"] .premium-select {
    padding: 0.5rem 1rem 0.5rem 2rem;
    /* Icon on left */
}

/* Need to ensure icon is positioned correctly */
.select-icon {
    position: absolute;
    left: 0.75rem;
    /* Left because RTL? In RTL, content starts Right. Icon usually at End (Left). */
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    pointer-events: none;
    color: var(--color-text-primary);
}

.premium-select:hover {
    border-color: var(--color-accent);
    background-color: var(--color-surface-hover);
}

.premium-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(var(--color-accent), 0.2);
}

/* Light Mode Specifics */
[data-theme="light"] .premium-select {
    background-color: white;
}

[data-theme="dark"] .premium-select {
    background-color: rgba(255, 255, 255, 0.05);
}

.premium-select option {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
}

.filter-divider {
    width: 1px;
    height: 1.5rem;
    background-color: var(--color-border);
    display: none;
    /* Hidden on mobile by default */
}

@media (min-width: 768px) {
    .filter-divider {
        display: block;
        /* Show divider on desktop */
    }
}

/* Round 3.4 - Mobile Menu Accordions (Polished) */
.mobile-accordion-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.25rem;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    font-family: inherit;
    color: var(--color-text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: start;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.accordion-trigger:hover,
.accordion-trigger:active {
    background: rgba(255, 255, 255, 0.03);
}

.accordion-trigger.active {
    color: var(--color-accent);
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.1);
    margin-left: 0.5rem;
    /* Indent content */
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    /* Border left indicator */
    border-right: 2px solid var(--color-accent);
    /* RTL: Right side indicator */
}

/* Sub-link styles */
.mobile-sub-link {
    display: block;
    padding: 0.85rem 1.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
}

.mobile-sub-link:last-child {
    border-bottom: none;
}

.mobile-sub-link:hover {
    color: var(--color-accent);
    padding-right: 2rem;
    /* Slide effect RTL */
    background: rgba(255, 255, 255, 0.03);
}

.accordion-trigger svg {
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.accordion-trigger.active svg {
    transform: rotate(180deg);
    opacity: 1;
}

/* Utility: Modal Widths */
.max-w-4xl {
    max-width: 56rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-h-80vh {
    max-height: 80vh;
}