/*
 * Enhanced Modern Design for myMasjid
 * Blending original green theme with modern iOS-inspired aesthetics
 * Includes Masjid Detail Page Styles
 */

/* ==================== FONT FACES ==================== */
@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/assets/fonts/SF-Pro-Display-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Text';
    src: url('/assets/fonts/SF-Pro-Text-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

/* ==================== CSS VARIABLES (Updated with original theme) ==================== */
:root {
    color-scheme: light;

    /* Primary Colors - Original Green Theme */
    --primary: #C8D829;
    --primary-dark: #cedd2b;
    --primary-light: #e5ef5e;
    --primary-gradient: linear-gradient(135deg, #C8D829 0%, #E5EF5E 100%);
    --primary-gradient-dark: linear-gradient(135deg, #a0ac1f 0%, #C8D829 100%);

    /* Secondary Colors */
    --secondary: #5d630f;
    --secondary-light: #7e8812;
    --secondary-dark: #313416;

    /* Accent Colors */
    --accent: #2bd184;
    --accent-light: #8fdfa2;
    --success: #038522;
    --warning: #f67a22;
    --info: #0dcaf0;
    --danger: #ea5c5c;
    --danger-light: #ff8787;

    /* Neutral Colors - Enhanced */
    --white: #FFFFFF;
    --black: #000000;
    --gray-50: #FAFBFC;
    --gray-100: #F4F5F7;
    --gray-200: #E8EAED;
    --gray-300: #D3D6DB;
    --gray-400: #9FA6B2;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Theme-specific colors */
    --theme-green: #C8D829;
    --theme-yellow: #ccdc21;
    --theme-olive: #5d630f;
    --theme-light-green: #eff6b1;
    --theme-border-green: rgba(178, 187, 0, 0.62);

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #fffffc;
    --bg-tertiary: #F5F7E9;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-green-light: rgba(122, 122, 122, 0.29);
    --bg-green-medium: rgba(200, 216, 41, 0.15);

    --badge-bg-quran: #f0a461d6;
    --btn-shadow : 4px 3px 7px 0px rgb(0 0 0 / 6%);

    /* Text Colors - FIXED FOR BETTER CONTRAST */
    --text-primary: #1F2937;
    --text-secondary: #5d630f;
    --text-tertiary: #7e8812;
    --text-light: #6B7280;
    --text-inverse: #FFFFFF;

    /* Border & Divider */
    --border-color: #e0e4bb;
    --border-light: rgba(122, 122, 122, 0.71);
    --border-medium: rgba(178, 187, 0, 0.38);
    --border-dark: rgba(178, 187, 0, 0.62);
    --divider: rgba(0, 0, 0, 0.08);

    /* Shadows - Enhanced with theme colors */
    --shadow-xs: 0 1px 2px rgba(200, 216, 41, 0.04);
    --shadow-sm: 0 2px 8px rgba(200, 216, 41, 0.06);
    --shadow-md: 0 4px 16px rgba(200, 216, 41, 0.08);
    --shadow-lg: 0 8px 32px rgba(200, 216, 41, 0.12);
    --shadow-xl: 0 12px 48px rgba(200, 216, 41, 0.16);
    --shadow-colored: 0 8px 32px rgba(200, 216, 41, 0.2);

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 5px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Typography */
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-text: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --bs-btn-active-color :#fff;
    --bs-btn-active-bg: #3b7335;

}

/* Dark Mode Support with Theme Colors
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;

        --bg-primary: #1b1c00;
        --bg-secondary: #303200;
        --bg-tertiary: #1e1f22;
        --bg-glass: rgba(27, 28, 0, 0.95);

        --text-primary: #F9FAFB;
        --text-secondary: #e0e4bb;
        --text-tertiary: #C8D829;
        --text-light: #9CA3AF;

        --border-color: #313400;
        --divider: rgba(200, 216, 41, 0.1);

        --theme-green: #a0ac1f;
        --theme-yellow: #C8D829;

        --bg-green-light: rgba(160, 172, 31, 0.15);
        --bg-green-medium: rgba(160, 172, 31, 0.25);
    }
}
*/
/* ==================== GLOBAL STYLES ==================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ==================== NAVBAR (Modern with Theme Colors) ==================== */
.navbar-modern {
    background: var(--primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 6px 3px 7px 4px rgb(0 0 0 / 8%);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: var(--transition);
    border-bottom: #a6b02c;
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.navbar-modern .navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--secondary) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.navbar-modern .navbar-brand:hover {
    transform: translateY(-2px);
    color: var(--secondary-dark) !important;
}

.navbar-modern .navbar-brand img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.navbar-modern .nav-link {
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(93, 99, 15, 0.9) !important;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.navbar-modern .nav-link:hover {
    background-color: rgba(200, 216, 41, 0.2);
    color: var(--secondary-dark) !important;
    transform: translateY(-1px);
}

.navbar-modern .nav-link.active {
    background-color: rgba(200, 216, 41, 0.3);
    color: var(--secondary-dark) !important;
    font-weight: 600;
}

.navbar-modern .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--secondary);
    border-radius: var(--radius-full);
    transition: transform 0.3s ease;
}

.navbar-modern .nav-link:hover::after,
.navbar-modern .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-modern .dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: var(--white);
    border: 1px solid var(--border-light);
}

.navbar-modern .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    margin-bottom: 0.25rem;
    transition: var(--transition-fast);
    font-weight: 500;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
}

.navbar-modern .dropdown-item:hover {
    background-color: var(--bg-green-light);
    color: var(--secondary) !important;
    transform: translateX(4px);
}

.navbar-modern .dropdown-item i {
    color: var(--text-tertiary);
    transition: var(--transition-fast);
}

.navbar-modern .dropdown-item:hover i {
    color: var(--secondary);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-switcher a {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--secondary) !important;
    transition: var(--transition-fast);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.3);
}

.language-switcher a:hover {
    background-color: rgba(200, 216, 41, 0.3);
    color: var(--secondary-dark) !important;
}

.language-switcher a.active {
    background-color: rgba(200, 216, 41, 0.5);
    color: var(--secondary-dark) !important;
    font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn {
    font-family: var(--font-text);
    /*font-weight: 600; */
    border-radius: var(--radius-md);
    /*padding: 0.625rem 1.5rem; */
    font-size: .8rem;
    transition: var(--transition);
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: white;
    color: #444719 !important;
    box-shadow: var(--btn-shadow);
    border: 1px solid #1919184a;
}



.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--primary-dark);
    color: var(--secondary-dark) !important;
    border-color: #a0ab20;
}

.btn-outline-primary {
    background: transparent;
    color: #444719 !important;
    box-shadow: var(--btn-shadow);
    border: 1px solid #1919184a;
}

.btn-outline-primary:hover {
    background: #fcc89385;
    color: var(--secondary-dark) !important;
    border-color: #eec8a4;
}

/* ==================== CARDS (Enhanced with Theme) ==================== */
.card-modern {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-modern .card-header {
    background: linear-gradient(135deg, var(--bg-green-light) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.card-modern .card-body {
    padding: 1.5rem;
    color: var(--text-primary); /* Ensure text is visible */
}

.card-modern .card-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
}



/* Article Index */
.article-index-list {
    background: var(--bg-green-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    color: var(--text-primary); /* Ensure text is visible */
}

.article-index-list:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

/* ==================== BADGES ==================== */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    background-color: rgb(168 192 107) !important;
}

.badge-primary {
    background: var(--primary-gradient);
    color: var(--secondary) !important;
    border-color: var(--primary-dark);
}

.badge-success {
    background: var(--success);
    color: var(--white) !important;
}

.badge-info {
    background: var(--info);
    color: var(--white) !important;
}

/* Topic Info Badges */
.topic-info-view {
    background: rgba(131, 146, 243, 0.76);
    color: var(--white);
}

.topic-info-comments {
    background: rgba(40, 167, 69, 0.76);
    color: var(--white);
}

.topic-info-photo {
    background: var(--danger);
    color: var(--white);
}

.topic-info-video {
    background: var(--warning);
    color: var(--white);
}

/* ==================== FORMS ==================== */
.form-control {
    border-width: 1px;
    border-style: solid;
    border-color: #80808061;
    font-family: var(--font-text);
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: var(--white);
    color: var(--text-primary); /* Ensure text is visible */
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200, 216, 41, 0.1);
    outline: none;
}

/* ==================== SPECIAL COMPONENTS ==================== */
/* Prayer Time Cards */
.ws-col {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin: 0.5rem;
    color: var(--text-primary); /* Ensure text is visible */
}

.ws-col:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-medium);
}

.ws-puasa {
    background: linear-gradient(135deg, var(--bg-green-light) 0%, transparent 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    color: var(--text-primary); /* Ensure text is visible */
}

.ws-puasa-isninkhamis {
    background: rgba(178, 187, 0, 0.15);
}

.ws-puasa-putih {
    background: rgba(212, 143, 24, 0.15);
}

/* Forum Components */

.forum-index-icon {
    max-height: 1rem;
}
.writer_female {
    color: hotpink !important;
}

.writer_female a {
    color: hotpink !important;
    font-weight: bold;
}
.writer_male {
    color: green !important;
}

.writer_male a {
    color: green !important;
    font-weight: bold;
}

.forum-badge {
    padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x);
    font-weight: normal !important;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    background-color: rgb(168 192 107) !important;
}
.breadcrumb-item+.breadcrumb-item::before {
    float: left;
    padding-right: var(--bs-breadcrumb-item-padding-x);
    color: var(--bs-breadcrumb-divider-color);
    content: var(--bs-breadcrumb-divider, ">");
}

.forum_dialog {
    background: var(--bg-green-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 1rem;
    margin: 1rem 0;
    color: var(--text-primary); /* Ensure text is visible */
}
.topic-content-wrapper {
    position: relative;
    font-size: 0.9375rem; /* Facebook's typical text size */
    line-height: 1.4;
}

.topic-content-preview {
    display: inline;
}

.topic-content-full {
    display: inline;
}

.show-more-btn,
.show-less-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-block;
}

.show-more-btn:hover,
.show-less-btn:hover {
    color: #1b74e4;
    text-decoration: underline;
}

.show-more-btn i,
.show-less-btn i {
    font-size: 0.8rem;
    margin-right: 2px;
}

.actorPic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}
.forum .btn:hover
{
    color: #676f12;
    background-color: #c8d829 !important;
    border-color: var(--bs-btn-hover-border-color);
}

.forum .btn:active
{
    color: #676f12;
    background-color: #c8d829 !important;
    border-color: var(--bs-btn-hover-border-color);
}

/* Video Cards */
.youtube-card-body {
    background-size: cover;
    background-position: center;
    height: 200px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.youtube-card-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
}


/* ═══════════════════════════════════════════════════════════════════════════
   Forum Media — shared styles
   Add this to your main CSS file, or <link> it in layouts/base.php
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Upload drop zone ──────────────────────────────────────────────────── */
.forum-drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #fafafa;
}
.forum-drop-zone:hover,
.forum-drop-zone:focus,
.forum-drop-zone.drag-over {
    border-color: #0d6efd;
    background: #f0f5ff;
    outline: none;
}

/* ── Upload preview strip ──────────────────────────────────────────────── */
.forum-preview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-thumb {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.preview-thumb img,
.preview-video-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
}
.thumb-remove:hover { background: rgba(220,53,69,.85); }

.thumb-video-badge {
    position: absolute;
    bottom: 4px;
    left: 6px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 4px;
}

/* ── Slide-panel media upload (show.php inline reply panel) ────────────── */
.panel-drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #fafafa;
    font-size: .875rem;
}
.panel-drop-zone:hover,
.panel-drop-zone.drag-over {
    border-color: #0d6efd;
    background: #f0f5ff;
}
.panel-preview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.panel-preview-strip .preview-thumb {
    width: 72px;
    height: 72px;
}

/* ── Displayed media grid (show.php, renderCommentTree) ────────────────── */
.forum-media-grid {
    display: grid;
    gap: 4px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 520px;
}

/* 1 image: full width */
.forum-media-grid[data-count="1"] { grid-template-columns: 1fr; }
.forum-media-grid[data-count="1"] .forum-media-item { max-height: 400px; }

/* 2 images: side by side */
.forum-media-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
.forum-media-grid[data-count="2"] .forum-media-item { height: 240px; }

/* 3 images: one left tall, two right stacked */
.forum-media-grid[data-count="3"] { grid-template-columns: 1fr 1fr; }
.forum-media-grid[data-count="3"] .forum-media-item:first-child {
    grid-row: span 2;
    height: 240px;
}
.forum-media-grid[data-count="3"] .forum-media-item:not(:first-child) { height: 118px; }

/* 4+ images: 2×2 grid, first item taller */
.forum-media-grid[data-count="4"],
.forum-media-grid[data-count="5"] { grid-template-columns: 1fr 1fr; }
.forum-media-grid[data-count="4"] .forum-media-item,
.forum-media-grid[data-count="5"] .forum-media-item { height: 160px; }

.forum-media-item {
    position: relative;
    overflow: hidden;
    background: #000;
}

.forum-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.forum-media-link:hover .forum-media-img { transform: scale(1.03); }

/* "+N more" overlay on 4th tile */
.has-overlay { filter: brightness(.55); }
.media-more-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    pointer-events: none;
}

/* ── Video player ──────────────────────────────────────────────────────── */
.forum-video-wrapper {
    position: relative;
    max-width: 520px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.forum-video {
    width: 100%;
    max-height: 360px;
    display: block;
    border-radius: 10px;
}

.video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: .75rem;
    padding: 2px 7px;
    border-radius: 12px;
    pointer-events: none;
}

/* ── Mobile tweaks ─────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .forum-media-grid { max-width: 100%; }
    .forum-video      { max-height: 240px; }
    .preview-thumb    { width: 80px; height: 80px; }
}

/* ==================== MASJID DETAIL PAGE STYLES ==================== */
.masjid-hero {
    padding: 1rem 0;
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
    padding-bottom: 2rem;

}

.masjid-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

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

.info-badge {
    border-width: 1px;
    border-style: solid;
    border-radius: 5px;
    background-color: #ecffea;
    border-color: #00000024;
    font-size: 0.8rem;
}
.action-bar {

    position: sticky;
    top: 80px;
    z-index: var(--z-sticky);
    background: #c9d829b0;
    backdrop-filter: blur(10px);
    /* border-bottom: 1px solid var(--border-color); */
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    border-color: #00000047;
    border-width: 1px;
    border-style: solid;
    justify-content: space-between;


}

/* Base styles for action buttons container */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}



     /* Action Buttons - Bigger and Bolder */
 .action-buttons {
     display: flex;
     flex-wrap: wrap;
     gap: 0.75rem;
     margin: 1.5rem 0;
     justify-content: center;
 }



/* Dropdown button special handling */
.action-buttons .dropdown {
    display: inline-block;
}

.action-buttons .dropdown .action-btn {
    min-width: auto;
    padding: 1rem 2rem;
}



/* Optional: Add animation for buttons */
.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.action-btn:active::after {
    animation: ripple 0.6s ease-out;
}


/* Desktop - distribute equally */
@media (min-width: 992px) {
    .action-buttons {
        justify-content: space-between;
    }

    .btn-action-menu,
    .dropdown {
        flex: 1;
    }
}

/* Tablet and Mobile - center align */
@media (max-width: 991px) {
    .action-buttons {
        justify-content: center !important;
    }

    .btn-action-menu,
    .dropdown {
        flex: 0 0 auto;
        margin: 5px;
    }
}

/* Very small devices - stack vertically centered */
@media (max-width: 576px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-action-menu,
    .dropdown {
        width: 100%;
        max-width: 250px; /* Optional: limit width */
    }

    .btn-action-menu {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .dropdown .action-btn {
        width: 100%;
        max-width: 250px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Fix for the dropdown to maintain consistency */
.dropdown {
    display: inline-block;
}

.dropdown .action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #dee2e6;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

.section-card {
    background: var(--bg-primary);
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgb(122 122 122 / 25%);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-primary); /* Ensure text is visible */
}

.section-card:hover {
    box-shadow: var(--shadow-md);
}

.section-card-header {
    background: rgba(227, 227, 227, 0.2);
    padding: 1rem;
    border-bottom: 1px solid rgb(208 202 202 / 71%);
}

.section-card-header h3 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    gap: 0.75rem;
}

.section-card-header h3 i {
    color: var(--primary);
}

.section-card-body {
    color: var(--text-primary); /* Ensure text is visible */
    border-bottom: 1px solid rgb(208 202 202 / 71%);
}

.section-card-footer {
    padding: 0.3rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--bg-green-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    color: var(--text-primary); /* Ensure text is visible */
    border-color: var(--primary-dark);
    border-width: 1px;
    border-style: solid;}

.contact-item:hover {
    transform: translateY(-2px);
    background: var(--bg-green-medium);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: var(--secondary);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
}

.contact-details h5 {
    margin: 0 0 0.25rem 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
}

.contact-details p {
    margin: 0;
    color: var(--text-primary);
}

.contact-details a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-details a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

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

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.photo-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption {
    transform: translateY(0);
}

.checkin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkin-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-green-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    color: var(--text-primary); /* Ensure text is visible */
}

.checkin-item:hover {
    transform: translateX(4px);
    background: var(--bg-green-medium);
}

.checkin-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.checkin-content {
    flex: 1;
}

.checkin-content h6 {
    margin: 0 0 0.25rem 0;
    color: var(--text-secondary);
    font-weight: 600;
}

.checkin-content p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.checkin-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.checkin-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

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

.service-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-green-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    color: var(--text-primary); /* Ensure text is visible */
}

.service-item:hover {
    transform: translateY(-2px);
    background: var(--bg-green-medium);
}

.service-item i {
    color: var(--success);
    font-size: 1.25rem;
}

/* Map Styles */
#map {
    height: 400px;
    width: 100%;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.leaflet-popup-content {
    font-family: var(--font-text);
}

.leaflet-popup-content h6 {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==================== LAYOUT SYSTEM ==================== */
.content-wrapper {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 100%;
    max-width: 350px;
    position: sticky;
    top: 80px;
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    color: var(--text-primary); /* Ensure text is visible */
}

.sidebar-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
}

.sidebar-card h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Advertisement Card */
.ad-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.ad-card img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.ad-card:hover img {
    transform: scale(1.02);
}

/* ==================== FOOTER ==================== */
.footer-modern {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    color: var(--text-inverse);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--primary);
}

.footer-modern a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
    text-decoration: none;
}

.footer-modern a:hover {
    color: var(--primary-light);
}

.footer-modern h5, .footer-modern h6 {
    color: var(--white);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(200, 216, 41, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(200, 216, 41, 0);
    }
}

.pulse-green {
    animation: pulse-green 2s infinite;
}

/* Now Prayer Time Animation */
@keyframes blink-green {
    0%, 100% {
        background-color: var(--bg-primary);
        box-shadow: var(--shadow-sm);
    }
    50% {
        background-color: var(--primary-light);
        box-shadow: 0 0 20px rgba(200, 216, 41, 0.3);
    }
}

.now-div {
    animation: blink-green 3s infinite;
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.loading {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .navbar-modern .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-light);
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        max-width: 100%;
        position: static;
        margin-top: 2rem;
    }

    /* Masjid Detail Responsive */
    .action-bar {
        position: static;
        margin-bottom: 1rem;

    }

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

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .masjid-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

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

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar-modern .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-modern .navbar-brand img {
        height: 28px;
    }

    .quran-card .card-body {
        font-size: 1.2rem;
        padding: 1rem;
    }

    .masjid-hero {
        padding: 2rem 0;
        padding-bottom: 0px;
    }
}

@media (max-width: 480px) {
    .masjid-stats {
        grid-template-columns: 1fr;
    }

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

    .checkin-item {
        flex-direction: column;
        text-align: center;
    }

    .checkin-image {
        width: 100%;
        height: 200px;
        margin-top: 1rem;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.bg-green-light {
    background-color: var(--bg-green-light) !important;
}

.border-theme {
    border-color: var(--border-light) !important;
}

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

.shadow-theme {
    box-shadow: var(--shadow-colored) !important;
}

/* Ensure text is always visible */
.container, .container-fluid, .row, .col, [class*="col-"] {
    color: var(--text-primary) !important;

}

/* Fix for white text on white background */
.text-white {
    color: var(--text-inverse) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

/* RTL Support */
[dir="rtl"] .navbar-modern .dropdown-item:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .language-switcher {
    flex-direction: row-reverse;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



.action-btn-outline {
    background: white !important;
    border: 2px solid #c2cf51 !important;
    color: #a2a937 !important;
}


.action-btn-outline:hover {
    background: #bdcb27 !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.btn-quran-menu {
    background: white;
    color: #444719 !important;
    box-shadow: var(--btn-shadow);
    border: 1px solid #1919184a;
}

.btn-quran-menu:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: #fcc89385;
    color: var(--secondary-dark) !important;
    border-color: #eec8a4;
}
.quran-menu-icon {
    max-height: 1.3rem;
}

.panel-icon {
    max-height: 1.5rem;
    margin-right: 1rem;
}

#displaySettingsForm  .form-check-label {
    font-size: 0.9rem;
}

.masjid-opacity-20 {
    opacity: .2 !important;
}

/* Quran Card Specific */
.quran-card {

    transition: var(--transition);
}

.quran-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--secondary-dark) !important;
    border-color: #eec8a4;
}

.quran-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-light);
    padding: 1rem;
}

.surah-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: #fcc89385;
    color: var(--secondary-dark) !important;
    border-color: #eec8a4;
}

a:hover {
    --bs-link-color-rgb: var(--bs-link-hover-color-rgb);
}

.surah-link-card {
    border: 0.3rem solid #c9d829;
    transition: all 0.2s ease;
    border-radius: 5px;
    border-width: 1px;
    border-color:#99789480;
}

.quran-badge {
    background-color: var(--badge-bg-quran);
    border-radius: 5px;
}
.revelation_source {
    max-height: 20px;
}

.active>.page-link, .page-link.active {
    z-index: 3;
    background: #fcc89385;
    color: var(--secondary-dark) !important;
    border-color: #eec8a4;
}


.rounded-pill
{
    border-radius: 10px !important;

}

.header-icon {
    max-width: 3rem;
}

.distance-badge {
    background-color: #34bfdb;
    border-radius: 2px !important;
    border-color: #37b2cc;
    border-width: 1px;
    border-style: solid;
    color: #ffffffd6;
}

.btn-action-menu {
    background: white;
    color: #444719 !important;
    box-shadow: var(--btn-shadow);
    border: 1px solid #1919184a;
    min-width: 150px;
    max-width: 200px;
}

.btn-action-menu:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: #fcc89385;
    color: var(--secondary-dark) !important;
    border-color: #eec8a4;
}