/* QIBSAT.COM - Modern Spiritual Islamic UI & Qibla Platform */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --q-emerald-dark: #042f22;
    --q-emerald: #064e3b;
    --q-emerald-light: #0d9488;
    --q-emerald-soft: #ecfdf5;
    --q-gold: #c59b27;
    --q-gold-light: #fef08a;
    --q-gold-dark: #854d0e;
    --q-white: #ffffff;
    --q-bg: #f8fafc;
    --q-border: #e2e8f0;
    --q-text-dark: #0f172a;
    --q-text-muted: #64748b;
    --q-wa: #25D366;
    --q-wa-dark: #128C7E;
    --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-ar: 'Amiri', 'Traditional Arabic', serif;
}

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

body {
    background-color: var(--q-bg);
    color: var(--q-text-dark);
    font-family: var(--font-ui);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

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

/* TOP VOLUNTEER BADGE BAR */
.volunteer-badge-bar {
    background: linear-gradient(90deg, #042f22 0%, #064e3b 50%, #042f22 100%);
    color: #fef9c3;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.volunteer-badge-bar svg {
    color: var(--q-gold);
}

/* HEADER */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--q-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--q-text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--q-emerald);
    background-color: var(--q-emerald-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-share-head {
    background-color: var(--q-wa);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    transition: transform 0.2s, background-color 0.2s;
}

.btn-share-head:hover {
    background-color: var(--q-wa-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

/* HERO QIBLA SECTION */
.hero-compass-section {
    background: radial-gradient(circle at 50% 20%, #064e3b 0%, #042f22 100%);
    color: #ffffff;
    padding: 50px 0 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-compass-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text-col h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #ffffff;
}

.hero-text-col h1 span {
    color: #fde047;
}

.hero-sub {
    font-size: 16px;
    color: #a7f3d0;
    margin-bottom: 24px;
    line-height: 1.6;
}

.location-badge-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    margin-bottom: 20px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
}

/* COMPASS VISUAL DIAL */
.compass-dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.compass-housing {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, #022c22 40%, #011d16 100%);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 20px rgba(0,0,0,0.6);
    border: 8px solid #064e3b;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.compass-ring {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 2px dashed rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-degree-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
}

.degree-n { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); color: #ef4444; font-size: 14px; font-weight: 900; }
.degree-e { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.degree-s { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); }
.degree-w { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }

.compass-needle-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s cubic-bezier(0.1, 0.9, 0.2, 1);
    will-change: transform;
}

.needle-kaaba {
    width: 14px;
    height: 130px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.needle-north {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 75px solid #eab308;
    filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.8));
}

.needle-south {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 55px solid #475569;
}

.compass-center-hub {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #022c22;
    border: 3px solid #eab308;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.kaaba-mini-glyph {
    width: 20px;
    height: 20px;
    background: #000000;
    border: 1px solid #eab308;
    border-radius: 2px;
}

.compass-metrics-box {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 12px 24px;
    border-radius: 12px;
    text-align: center;
}

.metric-item-num {
    font-size: 22px;
    font-weight: 800;
    color: #fde047;
}

.metric-item-lbl {
    font-size: 12px;
    color: #a7f3d0;
    text-transform: uppercase;
    font-weight: 600;
}

/* PRAYER TIMES SECTION */
.prayer-times-bar-wrapper {
    background: #ffffff;
    border-bottom: 1px solid var(--q-border);
    padding: 24px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.prayer-card {
    background: #f8fafc;
    border: 1px solid var(--q-border);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.prayer-card:hover {
    border-color: var(--q-emerald);
    transform: translateY(-2px);
}

.prayer-card.active-prayer {
    background: linear-gradient(135deg, #064e3b 0%, #042f22 100%);
    color: #ffffff;
    border-color: var(--q-gold);
    box-shadow: 0 6px 16px rgba(6, 78, 59, 0.25);
}

.prayer-card.active-prayer .prayer-time {
    color: #fde047;
}

.prayer-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.prayer-time {
    font-size: 20px;
    font-weight: 800;
    color: var(--q-text-dark);
}

/* MAIN CONTENT SECTIONS */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 44px 0 20px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--q-emerald-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* VIRAL HATIM MODULE */
.hatim-hero-card {
    background: #ffffff;
    border: 1px solid var(--q-border);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.hatim-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--q-border);
    padding-bottom: 20px;
}

.hatim-meta h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--q-text-dark);
    margin-bottom: 6px;
}

.hatim-meta p {
    font-size: 14px;
    color: var(--q-text-muted);
}

.hatim-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-wa-share {
    background-color: var(--q-wa);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    border: none;
    cursor: pointer;
}

.btn-wa-share:hover {
    background-color: var(--q-wa-dark);
    color: #ffffff;
}

.btn-new-hatim {
    background-color: var(--q-emerald);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-new-hatim:hover {
    background-color: var(--q-emerald-dark);
}

.progress-track {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

/* JUZ 30 GRID */
.juz-grid-30 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.juz-card {
    background: #ffffff;
    border: 1px solid var(--q-border);
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.juz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.juz-card.available {
    border-color: #cbd5e1;
    cursor: pointer;
}

.juz-card.available:hover {
    border-color: var(--q-emerald);
    background-color: var(--q-emerald-soft);
}

.juz-card.taken {
    background-color: #fefce8;
    border-color: #fde047;
}

.juz-card.completed {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
}

.juz-num {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.juz-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.badge-available { background: #e2e8f0; color: #475569; }
.badge-taken { background: #fef08a; color: #854d0e; }
.badge-completed { background: #bbf7d0; color: #166534; }

.juz-reader-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--q-emerald-dark);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DAILY AYAH / HADITH SHARE CARD */
.daily-share-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.daily-card {
    background: #ffffff;
    border: 1px solid var(--q-border);
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.daily-tag {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--q-emerald);
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.daily-arabic {
    font-family: var(--font-ar);
    font-size: 24px;
    line-height: 1.8;
    color: var(--q-emerald-dark);
    direction: rtl;
    text-align: right;
    margin-bottom: 16px;
}

.daily-meaning {
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 14px;
    font-style: italic;
}

.daily-source {
    font-size: 12px;
    font-weight: 700;
    color: var(--q-text-muted);
}

.daily-share-btn {
    align-self: flex-start;
    margin-top: 16px;
    background-color: var(--q-emerald-soft);
    color: var(--q-emerald-dark);
    border: 1px solid #a7f3d0;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.daily-share-btn:hover {
    background-color: #a7f3d0;
}

/* 7/24 LIVE HARAMAIN BROADCAST */
.live-broadcast-box {
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}

.live-tabs {
    display: flex;
    background: #111827;
    border-bottom: 1px solid #374151;
}

.live-tab-btn {
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s, background-color 0.2s;
}

.live-tab-btn.active {
    color: #ffffff;
    background: #1f2937;
    border-bottom: 2px solid var(--q-gold);
}

.video-frame-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-frame-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* FOOTER */
.site-footer {
    background: #042f22;
    color: #ffffff;
    padding: 50px 0 24px 0;
    margin-top: 60px;
    border-top: 3px solid var(--q-gold);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-nav {
    display: flex;
    gap: 20px;
    list-style: none;
    font-size: 14px;
    color: #a7f3d0;
}

.footer-nav a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
    color: #6ee7b7;
}

/* MODAL */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

.modal-content input, .modal-content select, .modal-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--q-border);
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero-compass-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .prayer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .juz-grid-30 {
        grid-template-columns: repeat(5, 1fr);
    }
    .daily-share-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 60px;
    }
    .nav-links {
        display: none;
    }
    .hero-text-col h1 {
        font-size: 28px;
    }
    .compass-housing {
        width: 270px;
        height: 270px;
    }
    .prayer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .juz-grid-30 {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================================
   LANGUAGE SELECTOR & RTL STYLES
   ======================================================== */
.lang-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid var(--q-border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--q-emerald-dark);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.lang-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid var(--q-border);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    min-width: 170px;
    z-index: 1050;
    overflow: hidden;
}

.lang-selector:hover .lang-dropdown-menu,
.lang-selector:focus-within .lang-dropdown-menu {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--q-text-dark);
    transition: background 0.15s;
    text-decoration: none;
}

.lang-option:hover {
    background: var(--q-emerald-soft);
    color: var(--q-emerald);
}

.lang-option.active {
    background: #ecfdf5;
    color: var(--q-emerald);
    font-weight: 800;
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body {
    font-family: var(--font-ar), var(--font-ui);
}

html[dir="rtl"] .lang-dropdown-menu {
    left: 0;
    right: auto;
}

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-text-col {
    text-align: right;
}

html[dir="rtl"] .hatim-actions,
html[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

/* Mini Quran Radio Widget on Homepage */
.mini-radio-banner {
    background: linear-gradient(135deg, #064e3b 0%, #042f22 100%);
    border-radius: 14px;
    padding: 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(6,78,59,0.18);
    border: 1px solid rgba(212,175,55,0.3);
}

.mini-radio-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mini-radio-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eab308;
    color: #042f22;
    border: none;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234,179,8,0.4);
    transition: transform 0.15s;
}

.mini-radio-btn:hover {
    transform: scale(1.08);
}

