:root {
    /* Gold Theme - Light Mode */
    /* Accessibility: darkened primary for better contrast with white text */
    --md-sys-color-primary: #996515;
    /* Formerly #B8860B */
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #FFF8E1;
    --md-sys-color-on-primary-container: #4A3800;
    --md-sys-color-surface: #F5F3EF;
    /* Warm light background */
    --md-sys-color-on-surface: #1D1D1F;
    --md-sys-color-surface-variant: #FFFFFF;
    --md-sys-color-outline: #86868B;
    --md-sys-elevation-1: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
    --md-sys-elevation-2: 0 8px 24px rgba(0, 0, 0, 0.16), 0 4px 8px rgba(0, 0, 0, 0.10);
    --border-radius-lg: 18px;
    --border-radius-md: 12px;
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --gold-gradient: linear-gradient(135deg, #DAA520 0%, #B8860B 50%, #8B6914 100%);
}

[data-bs-theme="dark"] {
    /* Gold Theme - Dark Mode */
    --md-sys-color-primary: #DAA520;
    /* Light Gold */
    --md-sys-color-on-primary: #1A1400;
    --md-sys-color-primary-container: #4A3800;
    --md-sys-color-on-primary-container: #FFE082;
    --md-sys-color-surface: #121210;
    /* Warm dark background */
    --md-sys-color-on-surface: #FFFFFF;
    /* Pure White text */
    --md-sys-color-surface-variant: #1E1D1A;
    /* Warm dark cards */
    --md-sys-color-outline: #9CA3AF;
    /* Lighter outline */
    --md-sys-elevation-1: 0 4px 12px rgba(0, 0, 0, 0.5);
    --md-sys-elevation-2: 0 8px 24px rgba(0, 0, 0, 0.6);
    --navbar-bg: rgba(30, 29, 26, 0.95);
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #DAA520 50%, #B8860B 100%);
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

[data-bs-theme="dark"] .navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: var(--md-sys-color-on-surface) !important;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 52px;
    line-height: 1;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.logo-text-ar {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--md-sys-color-on-surface) !important;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    background-color: var(--md-sys-color-surface-variant);
    box-shadow: var(--md-sys-elevation-1);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--md-sys-elevation-2);
    transform: scale(1.02);
}

.card-img-top {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    object-fit: cover;
    height: 220px;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--md-sys-color-on-surface);
    letter-spacing: -0.3px;
}

.card-text {
    color: var(--md-sys-color-outline);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--md-sys-color-primary) !important;
    color: var(--md-sys-color-on-primary) !important;
    border: none !important;
    border-radius: 99px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: none;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #996515 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4) !important;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #FFD700 !important;
}

/* Bootstrap Color Overrides */
.bg-primary {
    background-color: var(--md-sys-color-primary) !important;
}

.text-primary {
    color: var(--md-sys-color-primary) !important;
}

.border-primary {
    border-color: var(--md-sys-color-primary) !important;
}

.badge.bg-primary {
    background-color: var(--md-sys-color-primary) !important;
}

.progress-bar.bg-primary {
    background-color: var(--md-sys-color-primary) !important;
}

/* Footer */
footer {
    background-color: var(--md-sys-color-surface-variant) !important;
    color: var(--md-sys-color-on-surface);
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Social Buttons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    /* Optimization: Accessible touch target */
    min-height: 48px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    color: white;
}

.social-btn.facebook {
    background: #1877F2;
}

.social-btn.facebook:hover {
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

.social-btn.whatsapp {
    background: #25D366;
}

.social-btn.whatsapp:hover {
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.social-btn.telegram {
    background: #0088cc;
}

.social-btn.telegram:hover {
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}

.social-btn.youtube {
    background: #FF0000;
}

.social-btn.youtube:hover {
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

/* RTL Fixes */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Custom Flag for Kurdish */
.fi-ku {
    background-image: url('../assets/flags/ku.svg');
    background-size: cover;
    background-position: center;
}

/* Custom Flag for Syria (New) */
.fi-sy-new {
    background-image: url('../assets/flags/sy-new.svg');
    background-size: cover;
    background-position: center;
}

/* Hero Section Styles (Moved from home.blade.php) */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: #fff;
    border: 1px solid rgba(218, 165, 32, 0.3);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(184, 134, 11, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    background: linear-gradient(to right, #DAA520, #FFD700, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(218, 165, 32, 0.3);
}

.hero-subtitle {
    color: #e0e0e0;
    font-weight: 300;
    letter-spacing: 1px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 110px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    border-color: #DAA520;
}

.countdown-item span.display-4 {
    color: #FFD700;
    display: block;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.countdown-item span.label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #aaa;
    letter-spacing: 1px;
}

/* Pulsing Animation for glowing effect */
@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(218, 165, 32, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(218, 165, 32, 0);
    }
}

.badge.bg-warning {
    background-color: #FFD700 !important;
    animation: pulse-gold 2s infinite;
    color: #000 !important;
    /* Ensure readable text on gold */
}

/* ========================================= */
/*       DARK MODE GLOBAL TEXT FIXES         */
/* ========================================= */
[data-bs-theme="dark"] body {
    color: var(--md-sys-color-on-surface) !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] .h5,
[data-bs-theme="dark"] .h6 {
    color: var(--md-sys-color-on-surface);
}

[data-bs-theme="dark"] p,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] div {
    color: inherit;
    /* inherit from body usually works, but specific override below helps */
}

/* Force ".text-dark" to be light in dark mode (Counter-intuitive but necessary for classes used as 'base text') */
[data-bs-theme="dark"] .text-dark:not(.badge):not(.btn) {
    color: var(--md-sys-color-on-surface) !important;
}

[data-bs-theme="dark"] .text-body {
    color: var(--md-sys-color-on-surface) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: #cccccc !important;
}

/* Fix for links in dark mode */
[data-bs-theme="dark"] a:not(.btn):not(.nav-link) {
    color: #FFD700;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):hover {
    color: #FFE082;
}

/* Ensure card titles are extremely bright */
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header {
    color: #FFFFFF !important;
}

/* Fix Input placeholders */
[data-bs-theme="dark"] ::placeholder {
    color: #bbbbbb !important;
    opacity: 1;
    /* Firefox */
}

/* Border adjustments for visibility */
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border {
    border-color: rgba(255, 255, 255, 0.15) !important;
}


[data-bs-theme="dark"] .bg-white {
    background-color: var(--md-sys-color-surface-variant) !important;
    color: var(--md-sys-color-on-surface) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--md-sys-color-surface) !important;
    color: var(--md-sys-color-on-surface) !important;
}

/* Dropdowns & Modals */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #252422;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-bs-theme="dark"] .modal-content {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Form Controls */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1a1a1a;
    border-color: #444;
    color: #fff;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #222;
    border-color: var(--md-sys-color-primary);
    color: #fff;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #666;
}

/* Tables */
[data-bs-theme="dark"] .table {
    color: var(--md-sys-color-on-surface);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ========================================= */
/*           CENTRALIZED STYLES              */
/* ========================================= */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');

/* --- Obituaries & Gravestones --- */
.obituary-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.gravestone {
    background-color: #e0e0e0;
    border-radius: 50% 50% 5px 5px / 20% 20% 5px 5px;
    border: 3px double #DAA520;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.8),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(218, 165, 32, 0.4);
    position: relative;
    overflow: hidden;
}

.gravestone.large {
    width: 70%;
    height: 80%;
    border-width: 5px;
    box-shadow:
        inset 5px 5px 15px rgba(255, 255, 255, 0.8),
        inset -5px -5px 15px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(218, 165, 32, 0.5),
        5px 5px 15px rgba(0, 0, 0, 0.3);
}

/* Stone Texture */
.gravestone::before,
.gravestone.large::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
}

.gravestone-name,
.gravestone-date,
.gravestone-footer,
.gravestone-header {
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8), -1px -1px 0px rgba(0, 0, 0, 0.1);
    font-family: 'Amiri', serif;
    color: #444;
}

.gravestone-arch {
    width: 80%;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 auto 5px auto;
}

.gravestone.large .gravestone-arch {
    width: 100%;
    height: 3px;
    margin-bottom: 5px;
}

/* Obituary Pagination */
.pagination .page-item .page-link {
    color: var(--md-sys-color-primary);
    border-color: transparent;
    border-radius: 50%;
    margin: 0 2px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.pagination .page-item.active .page-link {
    background-color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: white;
}

/* Obituary Dark Mode Text Fixes */
[data-bs-theme="dark"] .obituary-text {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .obituary-bio {
    color: #FFFFFF !important;
}


/* --- Weather & Prayer --- */
.fw-900 {
    font-weight: 900;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.drop-shadow {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.backdrop-blur {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.overlay-shape {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.forecast-section {
    background-color: #fff;
    color: #333;
}

.daily-card {
    background: #f8f9fa;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.daily-card:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0);
}

.icon-pulse {
    animation: pulseSlow 3s infinite ease-in-out;
}

@keyframes pulseSlow {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.95;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.prayer-row {
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.prayer-row:hover {
    transform: scale(1.02);
    background-color: #ffffff;
}

.prayer-time {
    color: var(--md-sys-color-primary);
}

/* Weather Dark Mode */
[data-bs-theme="dark"] .forecast-section {
    background-color: #1E1E1E !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .forecast-section h4 {
    user-select: none;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .daily-card .text-dark {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .forecast-section .text-muted {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .daily-card {
    background: #2C2C2C !important;
    border-color: #444 !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .daily-card:hover {
    background: #383838 !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .prayer-card {
    background-color: #1E1E1E !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .prayer-row {
    background-color: #2C2C2C !important;
    border-color: #444 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .prayer-row:hover {
    background-color: #383838 !important;
}

[data-bs-theme="dark"] .prayer-time {
    color: #FFD700 !important;
}

[data-bs-theme="dark"] .prayer-card h3 {
    color: #FFD700 !important;
}

/* --- Events --- */
.glass-card {
    background: var(--md-sys-color-surface-variant) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .glass-card {
    background: #1E1D1A !important;
    border-color: rgba(255, 255, 255, 0.05);
}

.hover-elevate {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-elevate:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.text-gradient {
    background: var(--md-sys-color-primary);
    background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* --- Stories & News --- */
.masonry-grid {
    column-count: 1;
    column-gap: 1.5rem;
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 992px) {
    .masonry-grid {
        column-count: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .author-text {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .card-preview-text,
[data-bs-theme="dark"] .news-preview-text {
    color: #eeeeee !important;
}


/* ========================================= */
/*           EVENTS & CALENDAR               */
/* ========================================= */

/* Calendar Section */
.calendar-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(218, 165, 32, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 2rem !important;
}

[data-bs-theme="dark"] .calendar-container {
    background: rgba(30, 29, 26, 0.95);
    border-color: rgba(218, 165, 32, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    border-bottom: 2px solid rgba(218, 165, 32, 0.15);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
}

.calendar-month-title {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #DAA520, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: 'Cairo', sans-serif;
}

.btn-calendar-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-calendar-nav:hover {
    background: var(--md-sys-color-primary);
    color: #fff;
    transform: scale(1.1);
}

.btn-calendar-nav.small {
    width: 32px;
    height: 32px;
    padding: 0;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: var(--md-sys-color-outline);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
    font-size: 1.1rem;
    border: 1px solid transparent;
}

.calendar-day:not(.empty):hover {
    background: rgba(218, 165, 32, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.2), rgba(184, 134, 11, 0.1));
    border: 1px solid rgba(218, 165, 32, 0.6);
    color: var(--md-sys-color-primary);
    font-weight: 800;
}

.calendar-day.selected {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
    transform: scale(1.05);
    z-index: 2;
    border: none;
}

.calendar-day.mini {
    border-radius: 12px;
    font-size: 0.9rem;
    height: auto;
}

.calendar-day.mini .day-number {
    font-weight: 600;
}

.calendar-day.mini .event-dot {
    width: 4px;
    height: 4px;
    margin-top: 2px;
}

.event-dot {
    width: 6px;
    height: 6px;
    background-color: var(--md-sys-color-primary);
    border-radius: 50%;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.daily-events-panel {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(218, 165, 32, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .daily-events-panel {
    background: rgba(30, 29, 26, 0.95);
    border-color: rgba(218, 165, 32, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* New Event Cards */
.event-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--md-sys-color-surface-variant);
    position: relative;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(218, 165, 32, 0.3);
}

.event-card-inner {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.event-date-badge {
    width: 100px;
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-align: center;
    flex-shrink: 0;
}

.event-day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.event-month {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.2rem;
    opacity: 0.9;
}

.event-year {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.event-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--md-sys-color-on-surface);
    font-family: 'Cairo', sans-serif;
}

.event-status {
    font-size: 0.75rem;
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #198754;
    border-radius: 50%;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--md-sys-color-outline);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item .material-icons-round {
    font-size: 1.1rem;
    color: var(--md-sys-color-primary);
}

.event-description {
    color: var(--md-sys-color-on-surface);
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Event Cards */
.event-card {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

[data-bs-theme="dark"] .event-card {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(218, 165, 32, 0.3);
}

.event-card-inner {
    display: flex;
    flex-direction: row;
    height: 100%;
}

[data-bs-theme="dark"] .event-card-inner {
    background: transparent;
}

.event-date-badge {
    min-width: 120px;
    background: linear-gradient(160deg, #DAA520 0%, #B8860B 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.event-date-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
}

.event-day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.event-month {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.2rem;
    opacity: 0.9;
}

.event-year {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.event-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--md-sys-color-on-surface);
    font-family: 'Cairo', sans-serif;
}

.event-status {
    font-size: 0.75rem;
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #198754;
    border-radius: 50%;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--md-sys-color-outline);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item .material-icons-round {
    font-size: 1.1rem;
    color: var(--md-sys-color-primary);
}

.event-description {
    color: var(--md-sys-color-on-surface);
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-event-details {
    margin-top: auto;
    background: rgba(218, 165, 32, 0.1);
    border: none;
    color: var(--md-sys-color-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.btn-event-details:hover {
    background: var(--md-sys-color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.3);
}

@media (max-width: 768px) {

    /* Calendar Container Mobile */
    .calendar-container {
        padding: 1rem !important;
        border-radius: 16px;
    }

    .calendar-header {
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .calendar-month-title {
        font-size: 1rem !important;
    }

    .btn-calendar-nav.small {
        width: 28px;
        height: 28px;
    }

    .btn-calendar-nav.small .material-icons-round {
        font-size: 1rem !important;
    }

    /* Calendar Grid Mobile */
    .calendar-weekdays {
        font-size: 0.65rem !important;
        margin-bottom: 0.5rem;
    }

    .calendar-days {
        gap: 3px;
    }

    .calendar-days.mini {
        gap: 2px;
    }

    .calendar-day {
        font-size: 0.8rem;
        border-radius: 8px;
        padding: 2px;
    }

    .calendar-day.mini {
        font-size: 0.75rem;
        border-radius: 6px;
        min-height: 32px;
    }

    .calendar-day.mini .day-number {
        font-size: 0.75rem;
    }

    .calendar-day.mini .event-dot {
        width: 3px;
        height: 3px;
        margin-top: 1px;
    }

    /* Daily Events Panel Mobile */
    .daily-events-panel {
        padding: 1rem !important;
        border-radius: 16px;
    }

    .daily-events-panel .panel-header {
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
    }

    .daily-events-panel .panel-header h4 {
        font-size: 1.1rem;
    }

    .daily-events-panel .panel-header p {
        font-size: 0.85rem;
    }

    /* Event Cards Mobile */
    .event-card {
        border-radius: 16px;
    }

    .event-card-inner {
        flex-direction: column;
    }

    .event-date-badge {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 1rem;
        gap: 8px;
        min-width: unset;
    }

    .event-day {
        font-size: 1.5rem;
    }

    .event-month {
        font-size: 0.9rem;
    }

    .event-year {
        font-size: 0.75rem;
    }

    .event-day,
    .event-month,
    .event-year {
        margin: 0;
        line-height: 1.2;
    }

    .event-date-badge span {
        display: inline-block;
    }

    .event-content {
        padding: 1rem;
    }

    .event-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .event-title {
        font-size: 1.1rem;
    }

    .event-status {
        margin-left: 0;
        margin-right: 0;
    }

    .event-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .event-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .btn-event-details {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Section Headers Mobile */
    .section-header .section-icon {
        font-size: 1.5rem !important;
    }

    .section-header .section-title {
        font-size: 1.2rem !important;
    }

    /* Timeline Mobile */
    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 45px;
    }

    .timeline-marker {
        width: 32px;
        height: 32px;
    }

    .timeline-marker .material-icons-round {
        font-size: 1rem;
    }

    .timeline-content {
        padding: 1rem;
        border-radius: 12px;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-date {
        font-size: 0.75rem;
    }

    .timeline-location {
        font-size: 0.8rem;
    }

    /* Events Page Title Mobile */
    .events-title {
        font-size: 1.5rem !important;
    }

    .events-title+.lead {
        font-size: 0.9rem !important;
    }

    /* Modal Mobile Styles */
    .event-modal-content .modal-header {
        padding: 1rem;
    }

    .modal-date-badge {
        width: 50px;
        height: 50px;
    }

    .modal-date-badge .day {
        font-size: 1.2rem;
    }

    .modal-date-badge .month {
        font-size: 0.65rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-event-info .info-row {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }

    .modal-description {
        font-size: 0.9rem;
    }
}

/* Event Timeline (History) */
.timeline-section {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 3px;
    background: rgba(218, 165, 32, 0.2);
    border-radius: 3px;
}

.timeline[dir="rtl"]::before {
    left: auto;
    right: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2.5rem;
}

.timeline[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 60px;
}

.timeline-marker {
    position: absolute;
    left: -1px;
    top: 0;
    width: 44px;
    height: 44px;
    background: var(--md-sys-color-surface);
    border: 3px solid var(--md-sys-color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--md-sys-color-primary);
}

.timeline[dir="rtl"] .timeline-marker {
    left: auto;
    right: -1px;
}

.timeline-content {
    background: var(--md-sys-color-surface-variant);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.timeline[dir="rtl"] .timeline-content:hover {
    transform: translateX(-10px);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--md-sys-color-on-surface);
}

.timeline-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--md-sys-color-outline);
    font-size: 0.9rem;
    margin: 0;
}

/* Modal Styling */
.modal-date-badge {
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    margin-right: 1.5rem;
    min-width: 70px;
}

.modal-date-badge .day {
    display: block;
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
}

.modal-date-badge .month {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* ========================================= */
/*       MODERN ISLAMIC OBITUARY STONE       */
/* ========================================= */

.memorial-ribbon {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 10;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.memorial-ribbon::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* --- Enhanced Memorial Stone (Muslim Style) --- */
.memorial-stone-container {
    background: radial-gradient(circle at center, #f8f8f8 0%, #e8e8e8 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .memorial-stone-container {
    background: radial-gradient(circle at center, #333 0%, #222 100%);
}

.memorial-stone {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    border: 6px double #bbb;
    border-radius: 120px 120px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05), 5px 10px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.4s ease;
}

[data-bs-theme="dark"] .memorial-stone {
    background: #2d2d2d;
    border-color: #555;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3), 5px 10px 20px rgba(0, 0, 0, 0.4);
}

.memorial-stone:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Texture effect */
.memorial-stone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

.stone-header {
    font-family: 'Amiri', serif;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.stone-name {
    font-family: 'Amiri', 'Cairo', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
    max-width: 90%;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .stone-name {
    color: #ddd;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.stone-date {
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    color: #555;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

[data-bs-theme="dark"] .stone-date {
    color: #aaa;
    background: rgba(255, 255, 255, 0.05);
}

.stone-footer {
    font-family: 'Amiri', serif;
    font-size: 0.8rem;
    color: #777;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.stone-ornament {
    width: 70%;
    height: 10px;
    border-top: 2px solid rgba(218, 165, 32, 0.4);
    border-bottom: 1px solid rgba(218, 165, 32, 0.2);
    position: relative;
    z-index: 1;
    opacity: 0.6;
}

.stone-ornament.top {
    margin-bottom: 10px;
    border-radius: 50% 50% 0 0;
}

.stone-ornament.bottom {
    margin-top: 10px;
    border-radius: 0 0 50% 50%;
    border-top: none;
    border-bottom: 2px solid rgba(218, 165, 32, 0.4);
}

/* Dark Mode Overrides for these specific sections */
[data-bs-theme="dark"] .calendar-container {
    background: rgba(30, 29, 26, 0.9);
    border-color: rgba(218, 165, 32, 0.1);
}

[data-bs-theme="dark"] .event-card-inner {
    background: #1e1d1a;
}

/* Utility Classes */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-clamp: 3;
    max-height: calc(1.2em * 3);
}

/* Ensure cards have consistent border radius in dark mode */
[data-bs-theme="dark"] .card {
    border-radius: var(--border-radius-lg);
}

/* ========================================= */
/*           TABLET / iPAD STYLES            */
/*           (768px - 1024px)                */
/* ========================================= */
@media (min-width: 768px) and (max-width: 1024px) {

    /* General Layout */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Navbar */
    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.4rem 0.7rem !important;
    }

    /* Logo */
    .logo-text {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    .logo-text-ar {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 42px;
    }

    /* Hero Section */
    .hero-section {
        padding: 2rem !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .countdown-item {
        min-width: 90px;
        padding: 1rem;
    }

    .countdown-item span.display-4 {
        font-size: 1.8rem !important;
    }

    /* Cards Grid - 2 columns on iPad */
    .row>[class*="col-lg-4"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .row>[class*="col-lg-6"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Card Styles */
    .card {
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }

    /* Events Page */
    .events-title {
        font-size: 1.8rem !important;
    }

    /* Calendar + Panel Split */
    .calendar-container {
        padding: 1.25rem !important;
    }

    .calendar-month-title {
        font-size: 1.1rem !important;
    }

    .calendar-day {
        font-size: 0.85rem;
    }

    .daily-events-panel {
        padding: 1.25rem !important;
    }

    /* Event Cards on iPad */
    .event-card-inner {
        flex-direction: column;
    }

    .event-date-badge {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        padding: 0.75rem 1rem;
        gap: 10px;
        min-width: unset;
    }

    .event-day {
        font-size: 1.8rem;
    }

    .event-content {
        padding: 1.25rem;
    }

    .event-title {
        font-size: 1.15rem;
    }

    /* Map Page */
    #village-map {
        height: 55vh !important;
        min-height: 400px !important;
    }

    .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 1rem;
    }

    /* Stories Grid */
    .masonry-grid {
        column-count: 2;
    }

    /* Radio Player */
    .radio-player-container {
        max-width: 100%;
    }

    /* Weather Page */
    .daily-card {
        padding: 1rem;
    }

    /* Photos Grid */
    .row>[class*="col-md-4"],
    .row>[class*="col-lg-3"] {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    /* Quiz Container */
    .quiz-container {
        max-width: 550px;
    }

    /* Footer */
    footer .row>[class*="col-md"] {
        margin-bottom: 1.5rem;
    }

    .social-links {
        gap: 12px;
    }

    .social-btn {
        width: 44px;
        height: 44px;
    }

    /* Typography Adjustments */
    h1,
    .h1 {
        font-size: 2rem;
    }

    h2,
    .h2 {
        font-size: 1.6rem;
    }

    h3,
    .h3 {
        font-size: 1.3rem;
    }

    .display-5 {
        font-size: 2rem !important;
    }

    .lead {
        font-size: 1rem;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }

    /* Obituaries */
    .obituary-card {
        margin-bottom: 1rem;
    }

    .gravestone {
        padding: 1rem;
    }

    .gravestone-name {
        font-size: 1rem;
    }

    /* Projects & News */
    .project-card img,
    .news-item img {
        height: 180px;
    }
}

/* ========================================= */
/*         WHATSAPP FLOATING BUTTON          */
/* ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: whatsapp-pulse 2s infinite;
    z-index: -1;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* RTL Support */
[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 25px;
}

/* ========================================= */
/*         SOCIAL SHARING BUTTONS            */
/* ========================================= */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.share-buttons .share-label {
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-right: 5px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #000;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.copy-link {
    background: var(--md-sys-color-primary);
}

/* Dark Mode */
[data-bs-theme="dark"] .share-buttons .share-label {
    color: var(--md-sys-color-on-surface);
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 22px;
        height: 22px;
    }

    [dir="rtl"] .whatsapp-float {
        right: auto;
        left: 20px;
    }

    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ========================================= */
/*            HERO SLIDER                    */
/* ========================================= */
.hero-slider {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.hero-slides {
    position: relative;
    height: 350px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-content {
    text-align: center;
    padding: 2rem;
    z-index: 2;
}

.hero-slide .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #DAA520, #FFD700, #B8860B);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slide .hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.hero-dot.active {
    background: var(--md-sys-color-primary);
    transform: scale(1.2);
}

/* Mobile Hero Slider */
@media (max-width: 576px) {
    .hero-slides {
        height: 280px;
    }

    .hero-slide .hero-title {
        font-size: 1.6rem;
    }

    .hero-slide .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-dots {
        bottom: 15px;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
    }
}

/* ========================================= */
/*            BREADCRUMB NAVIGATION          */
/* ========================================= */
.breadcrumb-nav {
    background: var(--md-sys-color-surface-variant);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
}

.breadcrumb-nav ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-nav li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb-nav li a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav li a:hover {
    color: var(--md-sys-color-on-surface);
}

.breadcrumb-nav li.active {
    color: var(--md-sys-color-on-surface-variant);
}

.breadcrumb-nav .separator {
    color: var(--md-sys-color-outline);
    margin: 0 0.25rem;
}

[dir="rtl"] .breadcrumb-nav .separator {
    transform: scaleX(-1);
}

/* ========================================= */
/*            GUESTBOOK STYLES               */
/* ========================================= */
.guestbook-form-card {
    position: sticky;
    top: 100px;
}

.guestbook-entry {
    background: var(--md-sys-color-surface);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guestbook-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.guestbook-entry-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.guestbook-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.guestbook-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.guestbook-name {
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
}

.guestbook-location {
    font-size: 0.85rem;
    color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.guestbook-date {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
}

.guestbook-message {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface);
    white-space: pre-line;
}

/* Dark Mode */
[data-bs-theme="dark"] .guestbook-entry {
    background: var(--md-sys-color-surface-variant);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile */
@media (max-width: 576px) {
    .guestbook-form-card {
        position: static;
    }

    .guestbook-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ========================================= */
/*            NEWSLETTER STYLES              */
/* ========================================= */
.newsletter-section {
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input-group {
    max-width: 350px;
    margin: 0 auto;
}

.newsletter-input-group .form-control {
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    border-right: none;
}

.newsletter-input-group .btn {
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
    padding: 0.5rem 1rem;
}

.newsletter-input-group .btn .material-icons-round {
    font-size: 20px;
}

/* RTL Support */
[dir="rtl"] .newsletter-input-group .form-control {
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
    border-right: 1px solid var(--md-sys-color-outline);
    border-left: none;
}

[dir="rtl"] .newsletter-input-group .btn {
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

/* ========================================= */
/*            MEGA MENU                       */
/* ========================================= */
.mega-menu-container {
    position: relative;
}

.mega-menu-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mega-menu-trigger .material-icons-round {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.mega-menu-container:hover .mega-menu-trigger .material-icons-round {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 700px;
    background: var(--md-sys-color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mega-menu-container:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-section {
    padding: 0;
}

.mega-menu-section h6 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--md-sys-color-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--md-sys-color-primary);
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.mega-menu-item:hover {
    background: var(--md-sys-color-primary);
    color: #fff;
}

.mega-menu-item .material-icons-round {
    font-size: 20px;
    opacity: 0.7;
}

.mega-menu-item:hover .material-icons-round {
    opacity: 1;
}

/* Dark mode */
[data-bs-theme="dark"] .mega-menu {
    background: var(--md-sys-color-surface-variant);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* RTL Support */
[dir="rtl"] .mega-menu {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Mobile - hide mega menu, show regular */
@media (max-width: 991px) {
    .mega-menu-container {
        display: none !important;
    }

    .mobile-nav-items {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .mobile-nav-items {
        display: none !important;
    }
}

/* ============================================
   Memorial Stone Styles - Islamic Design
   ============================================ */

/* Memorial Stone Container */
.memorial-stone {
    background: linear-gradient(180deg, #4a4a4a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 12px 12px 8px 8px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #d4af37;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.memorial-stone-container {
    background: linear-gradient(135deg, #5a5a5a 0%, #3a3a3a 100%);
}

/* بسم الله الرحمن الرحيم - Islamic Font, Larger */
.stone-header {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1rem;
    color: #d4af37;
    margin-bottom: 5px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Crescent Moon */
.stone-crescent {
    font-size: 1.8rem;
    color: #d4af37;
    margin: 3px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Name Display */
.stone-name {
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin: 5px 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Date - Larger */
.stone-date {
    font-family: 'Cairo', sans-serif;
    font-size: 0.75rem;
    color: #c0c0c0;
    margin: 5px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* رحمه الله / رحمها الله - Islamic Font, Larger */
.stone-footer {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 0.95rem;
    color: #d4af37;
    margin-top: 5px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ornamental Lines */
.stone-ornament {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 4px 0;
}

.stone-ornament.top {
    margin-bottom: 5px;
}

.stone-ornament.bottom {
    margin-top: 5px;
}

/* Memorial Ribbon */
.memorial-ribbon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 30px;
    background: linear-gradient(180deg, #1a1a1a 0%, #333 100%);
    border-radius: 0 0 3px 3px;
    z-index: 10;
}