﻿/* Base Styles & Variables */
:root {
    --primary-color: #0d5c46;
    --primary-light: #168a69;
    --primary-dark: #07382a;
    --accent-color: #f5b041;

    --bg-color: #f8faf9;
    --bg-card: #ffffff;
    --surface-color: #ffffff;
    --text-main: #1e293b;
    --text-color: #1e293b;
    --text-muted: #64748b;

    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px 0 rgba(13, 92, 70, 0.1);

    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
}

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

/* Header */
.main-header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding-left: 0;
    padding-right: 20px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 48px;
}

.logo span {
    color: var(--text-muted);
    font-weight: 400;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav .nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.nav-dropdown { position: relative; }
.nav-dropdown .fa-chevron-down { font-size: 0.65rem; margin-left: 4px; transition: transform var(--transition-fast); }
.nav-dropdown:hover > a .fa-chevron-down { transform: rotate(180deg); }
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    min-width: 160px; padding: 6px 0; z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block; padding: 8px 16px; font-size: 0.9rem;
    color: var(--text-main); white-space: nowrap; border: none;
}
.dropdown-menu li a:hover { background: rgba(13,92,70,0.06); color: var(--primary-color); }
.dropdown-menu li a::after { display: none; }
#main-nav.mobile-open .nav-dropdown { position: static; }
#main-nav.mobile-open .dropdown-menu {
    position: static; box-shadow: none; border: none; border-radius: 0;
    padding: 0 0 0 16px; background: transparent; display: block;
}
#main-nav.mobile-open .dropdown-menu li a { padding: 6px 0; font-size: 0.88rem; white-space: normal; border-bottom: 1px solid var(--border-color); }

/* Mobile Nav Overlay */
#main-nav.mobile-open {
    display: block !important;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    padding: 20px;
    box-shadow: var(--shadow-md);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

#main-nav.mobile-open .nav-links {
    flex-direction: column;
    gap: 6px;
    display: flex;
}

#main-nav.mobile-open .nav-links li a {
    display: block;
    padding: 8px 0;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
#main-nav.mobile-open .nav-links li:last-child a { border-bottom: none; }

/* App Banner */
.app-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 0;
}

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

.banner-content {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.9rem;
}

.banner-content strong {
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.btn-outline-white {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-color);
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* Hero Section */
.hero-section {
    background-color: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    /* Subtle background image from generate_image tool could go here, for now using a subtle gradient */
    background-image: radial-gradient(circle at top right, rgba(13, 92, 70, 0.03), transparent 50%);
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0 auto 30px auto;
    max-width: 650px;
    line-height: 1.6;
}

.premium-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.date-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.date-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.date-card:hover {
    transform: translateY(-5px);
}

.primary-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-glass);
}

.secondary-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.9;
}

.primary-card .card-header {
    color: white;
    opacity: 1;
}

.secondary-card .card-header {
    color: var(--primary-color);
}

.date-display {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.primary-card .date-display {
    color: white;
}

.location-note {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Article Section */
.article-section {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.seo-content h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.seo-content h3 {
    font-size: 1.3rem;
    margin: 24px 0 12px 0;
}

.seo-content p {
    margin-bottom: 16px;
    color: var(--text-muted);
}

.seo-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
    list-style-type: disc;
    color: var(--text-muted);
}

.seo-content li {
    margin-bottom: 8px;
}

.info-box {
    background-color: rgba(245, 176, 65, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 24px 0;
   .date-highlight { color: var(--primary-color); font-weight: 700; }
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-box i {
    color: #d68910;
    font-size: 1.2rem;
    margin-top: 3px;
}

.info-box p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Worldwide Section */
.worldwide-section {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.section-heading {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.world-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.world-item i {
    color: var(--primary-light);
    font-size: 0.8rem;
}

.world-item:hover {
    background: var(--primary-color);
    color: white;
}

.world-item:hover i {
    color: white;
}

.view-more {
    margin-top: 24px;
    text-align: right;
}

.view-more a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-more a:hover {
    gap: 10px;
}

/* Top Searches */
.top-searches {
    margin-top: 40px;
}

.top-searches h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li {
    margin-bottom: 12px;
}

.widget-list li:last-child {
    margin-bottom: 0;
}

.widget-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.widget-list a i {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform var(--transition-fast);
}

.widget-list a:hover {
    background: rgba(13, 92, 70, 0.05);
    color: var(--primary-color);
}

.widget-list a:hover i {
    color: var(--primary-color);
    transform: translateX(3px);
}

.quick-links-widget a {
    justify-content: flex-start;
    gap: 12px;
}

.quick-links-widget a i {
    color: var(--primary-color);
    font-size: 1rem;
}

.quick-links-widget a:hover i {
    transform: none;
}

/* Footer */
.main-footer {
    background: var(--primary-dark);
    color: white;
    padding-top: 60px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-brand .logo span {
    color: var(--accent-color);
}

.footer-brand p {
    color: #cbd5e1;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-col h4,
.footer-apps h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: white;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #cbd5e1;
    font-size: 0.95rem;
}

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

.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.app-btn:hover {
    background: white;
    color: var(--primary-dark);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-banner .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .date-cards {
        grid-template-columns: 1fr;
    }

    .hero-section,
    .article-section,
    .worldwide-section {
        padding: 24px;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-card: #1e293b;
    --surface-color: #1e293b;
    --text-main: #f1f5f9;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --primary-color: #34d399;
    --primary-light: #6ee7b7;
    --primary-dark: #059669;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
}
[data-theme="dark"] .main-header { background-color: #1e293b; border-bottom: 1px solid #334155; }
[data-theme="dark"] .hero-section,
[data-theme="dark"] .feature-section,
[data-theme="dark"] .article-section,
[data-theme="dark"] .worldwide-section,
[data-theme="dark"] .widget { background-color: #1e293b; }
[data-theme="dark"] .world-item,
[data-theme="dark"] .widget-list a,
[data-theme="dark"] .tag { background-color: #0f172a; }

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
.theme-toggle {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: 0;
    flex-shrink: 0;
}
.mobile-menu-btn {
    display: none;
    font-size: 1.3rem;
    color: var(--primary-color);
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    line-height: 1;
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--primary-color); color: var(--primary-color); }


/* ===== FEATURE SECTIONS ===== */
.feature-section {
    background: var(--surface-color); border-radius: var(--radius-xl);
    padding: 40px; box-shadow: var(--shadow-sm); margin-bottom: 30px;
    max-width: 100%;
}
@media (max-width: 768px) {
    .feature-section { padding: 20px; }
}

/* ===== PRAYER TIMES ===== */
.city-select {
    border: 1px solid var(--border-color); border-radius: 8px;
    padding: 8px 14px; font-size: 0.9rem; background: var(--bg-color);
    color: var(--text-main); cursor: pointer;
}
.prayer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.prayer-card {
    background: var(--bg-color); border-radius: var(--radius-lg);
    padding: 18px; text-align: center; border: 1px solid var(--border-color);
    transition: all var(--transition-normal); position: relative;
}
.prayer-card:hover { border-color: var(--primary-color); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.prayer-card.active-prayer { background: linear-gradient(135deg,var(--primary-color),var(--primary-dark)); color: white; border-color: transparent; }
.prayer-card.active-prayer .prayer-name, .prayer-card.active-prayer .prayer-time, .prayer-card.active-prayer .prayer-arabic { color: white; }
.prayer-name { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.prayer-time { font-size: 1.4rem; font-weight: 700; color: var(--primary-color); font-family: var(--font-heading); }
.prayer-arabic { font-size: 1.1rem; color: var(--text-muted); font-family: 'Noto Nastaliq Urdu', serif; }
.next-prayer-banner {
    margin-top: 16px; background: rgba(13,92,70,0.08); border: 1px solid rgba(13,92,70,0.2);
    border-radius: var(--radius-md); padding: 12px 20px;
    display: flex; align-items: center; gap: 10px; color: var(--primary-color); font-weight: 500;
}

/* ===== SKELETON ===== */
.skeleton { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
.sk-line { height: 14px; background: var(--border-color); border-radius: 4px; margin: 8px 0; }
.sk-line.short { width: 60%; }
.sk-inline { background: var(--border-color); border-radius: 4px; padding: 0 20px; color: transparent; }

/* ===== DATE CONVERTER ===== */
.converter-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-color); padding: 4px; border-radius: var(--radius-md); }
.conv-tab {
    flex: 1; padding: 10px; border: none; border-radius: 6px; cursor: pointer;
    font-size: 0.9rem; font-weight: 600; background: transparent; color: var(--text-muted); transition: all var(--transition-fast);
}
.conv-tab.active { background: var(--surface-color); color: var(--primary-color); box-shadow: var(--shadow-sm); }
.conv-panel { display: none; }
.conv-panel.active { display: block; }
.conv-input-row { 
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: span 3; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group select {
    border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 14px;
    font-size: 0.95rem; background: var(--bg-color); color: var(--text-main); transition: border-color var(--transition-fast);
    width: 100%;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); }
.btn-convert, .btn-primary {
    background: linear-gradient(135deg,var(--primary-color),var(--primary-dark));
    color: white; border: none; border-radius: 8px; padding: 11px 24px;
    font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast);
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn-convert:hover, .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact-form { margin-top: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form textarea { border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 14px; font-size: 0.95rem; background: var(--bg-color); color: var(--text-main); transition: border-color var(--transition-fast); width: 100%; font-family: var(--font-body); resize: vertical; }
.contact-form textarea:focus { outline: none; border-color: var(--primary-color); }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form .form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: block; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.btn-secondary {
    background: var(--bg-color); color: var(--primary-color); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 10px 20px; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition-fast); display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { border-color: var(--primary-color); background: rgba(13,92,70,0.05); }
.btn-full { width: 100%; justify-content: center; margin-top: 20px; }
.conv-result {
    margin-top: 20px; background: linear-gradient(135deg,rgba(13,92,70,0.08),rgba(13,92,70,0.03));
    border: 1px solid rgba(13,92,70,0.2); border-radius: var(--radius-md);
    padding: 20px; font-size: 1.3rem; font-weight: 700; color: var(--primary-color); text-align: center;
}

/* ===== CALENDAR ===== */
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-btn {
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 8px; width: 36px; height: 36px; cursor: pointer;
    color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast);
}
.cal-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.cal-month-label { font-size: 1rem; font-weight: 700; color: var(--text-main); white-space: nowrap; }

.cal-legend {
    display: flex; gap: 20px; justify-content: center; margin-bottom: 20px;
    padding: 10px; background: rgba(13, 92, 70, 0.03); border-radius: 8px; font-size: 0.85rem;
}
.legend-item { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.legend-box { width: 12px; height: 12px; border-radius: 3px; }

.calendar-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
/* Custom Scrollbar for Calendar */
.calendar-wrap::-webkit-scrollbar { height: 6px; }
.calendar-wrap::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 10px; }
.calendar-wrap::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }

.calendar-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 4px; 
}
.cal-day-header { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); padding: 6px 0; border-bottom: 2px solid var(--border-color); margin-bottom: 2px; }
.cal-day {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast);
    position: relative; border: 1px solid var(--border-color); padding: 4px;
    background: var(--surface-color); min-height: 60px;
}
.cal-day:hover { background: rgba(13,92,70,0.08); border-color: var(--primary-color); z-index: 10; box-shadow: var(--shadow-md); }
.cal-day.today { border: 2px solid var(--primary-color); background: rgba(13,92,70,0.05); }
.cal-day.today::after { content: 'TODAY'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--primary-color); color: white; font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.cal-day.other-month { opacity: 0.3; background: var(--bg-color); }
.cal-day.friday { border-left: 3px solid var(--primary-color); }

.cal-greg { font-size: 1rem; font-weight: 700; color: var(--text-main); align-self: flex-start; }
.cal-hijri { font-size: 0.9rem; font-weight: 700; color: var(--primary-color); align-self: flex-end; }
.cal-label-sm { font-size: 0.55rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 2px; }

.cal-event-dot { width: 5px; height: 5px; background: var(--accent-color); border-radius: 50%; margin-top: 2px; }

/* ===== EVENTS ===== */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 16px; }
.event-card {
    background: var(--bg-color); border-radius: var(--radius-lg);
    padding: 20px; border: 1px solid var(--border-color); transition: all var(--transition-normal);
    position: relative; overflow: hidden;
}
.event-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(135deg,var(--primary-color),var(--accent-color)); }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-color); }
.event-name { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.event-hijri { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.event-countdown { display: flex; gap: 10px; }
.count-box { text-align: center; background: var(--surface-color); border-radius: 8px; padding: 8px 12px; min-width: 48px; }
.count-num { font-size: 1.4rem; font-weight: 800; color: var(--primary-color); line-height: 1; font-family: var(--font-heading); }
.count-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== QIBLA ===== */
.qibla-container { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.qibla-compass-wrap { flex-shrink: 0; }
.compass-ring {
    width: 200px; height: 200px; border-radius: 50%;
    border: 3px solid var(--border-color); position: relative;
    background: radial-gradient(circle, var(--bg-color), var(--surface-color));
    box-shadow: 0 0 0 8px var(--bg-color), 0 0 0 10px var(--border-color), var(--shadow-lg);
}
.compass-directions { position: absolute; inset: 0; }
.compass-directions span { position: absolute; font-size: 0.8rem; font-weight: 800; color: var(--text-muted); }
.cd-n { top: 8px; left: 50%; transform: translateX(-50%); }
.cd-s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.cd-e { right: 10px; top: 50%; transform: translateY(-50%); }
.cd-w { left: 10px; top: 50%; transform: translateY(-50%); }
.compass-needle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(0deg);
    width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: var(--primary-color); transition: transform 1.5s cubic-bezier(0.4,0,0.2,1);
}
.qibla-info { flex: 1; }
.qibla-city { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.qibla-deg { font-size: 2.5rem; font-weight: 800; color: var(--primary-color); font-family: var(--font-heading); margin-bottom: 20px; }
.qibla-status { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }

/* ===== HADITH ===== */
.hadith-card {
    background: linear-gradient(135deg,rgba(13,92,70,0.05),rgba(245,176,65,0.05));
    border: 1px solid rgba(13,92,70,0.15); border-radius: var(--radius-lg);
    padding: 30px; position: relative;
}
.hadith-card::before { content: '\201C'; position: absolute; top: 10px; left: 20px; font-size: 5rem; color: var(--primary-color); opacity: 0.15; line-height: 1; font-family: Georgia,serif; }
.hadith-text { font-size: 1.05rem; line-height: 1.8; color: var(--text-main); margin-bottom: 16px; font-style: italic; }
.hadith-source { font-size: 0.85rem; font-weight: 700; color: var(--primary-color); }

/* ===== ZAKAT ===== */
.zakat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; }
.zakat-result {
    margin-top: 20px; border-radius: var(--radius-lg); padding: 24px;
    background: linear-gradient(135deg,var(--primary-color),var(--primary-dark)); color: white; text-align: center;
}
.zakat-total { font-size: 2rem; font-weight: 800; margin: 8px 0; font-family: var(--font-heading); }
.zakat-note { font-size: 0.85rem; opacity: 0.85; }
.zakat-nisab-note { margin-top: 12px; font-size: 0.8rem; opacity: 0.8; }

/* ===== SIDEBAR ADDITIONS ===== */
.month-info { display: flex; gap: 16px; align-items: center; }
.month-icon { font-size: 2rem; color: var(--primary-color); }
.month-name { font-size: 1.2rem; font-weight: 700; color: var(--text-main); }
.month-year { font-size: 0.85rem; color: var(--text-muted); }
.month-day-count { font-size: 0.8rem; color: var(--text-muted); }
.mini-prayer-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.mini-prayer-list li:last-child { border-bottom: none; }
.mini-prayer-list .active-p { color: var(--primary-color); font-weight: 700; }
.ad-widget { padding: 16px; }
.ad-label { font-size: 0.7rem; color: var(--text-muted); text-align: center; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.ad-placeholder { background: var(--bg-color); border: 2px dashed var(--border-color); border-radius: var(--radius-md); height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); font-size: 0.85rem; }
.ad-placeholder i { font-size: 2rem; opacity: 0.4; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); }
.social-links a:hover { background: var(--accent-color); color: var(--primary-dark); }
.maghrib-notice { margin-top: 16px; background: rgba(245,176,65,0.1); border: 1px solid rgba(245,176,65,0.4); border-radius: var(--radius-md); padding: 12px 16px; display: flex; align-items: center; gap: 10px; color: #92640a; font-size: 0.9rem; }

/* ===== URDU MODE ===== */



/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .main-nav .nav-links { gap: 10px; }
    .main-nav a { font-size: 0.85rem; }
    .logo { margin-right: 20px; font-size: 1.3rem; }
}

@media (max-width: 900px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .header-container { padding-right: 15px; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .main-header, .main-footer { width: 100%; position: relative; left: 0; right: 0; }
    .hero-section { padding: 30px 20px; }
    .feature-section { padding: 20px; }
    .prayer-grid { grid-template-columns: repeat(2,1fr); }
    .qibla-container { flex-direction: column; text-align: center; }
    .conv-input-row { grid-template-columns: 1fr; }
    .events-grid { grid-template-columns: 1fr; }
    .zakat-grid { grid-template-columns: 1fr; }
    .calendar-grid { gap: 3px; }
    .cal-day { min-height: 50px; padding: 3px; }
    .cal-greg { font-size: 0.85rem; }
    .cal-hijri { font-size: 0.75rem; }
    .cal-label-sm { font-size: 0.5rem; }
    .cal-day-header { font-size: 0.7rem; padding: 4px 0; }
    /* Stack the layout grid: content on top, sidebar below */
    .layout-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .prayer-grid { grid-template-columns: 1fr; }
    .prayer-time { font-size: 1.2rem; }
    .compass-ring { width: 160px; height: 160px; }
    .calendar-grid { gap: 2px; }
    .cal-day { min-height: 40px; padding: 2px; }
    .cal-greg { font-size: 0.75rem; }
    .cal-hijri { font-size: 0.65rem; }
    .cal-label-sm { font-size: 0.45rem; }
    .cal-legend { gap: 10px; font-size: 0.75rem; flex-wrap: wrap; }
    .page-title { font-size: 1.5rem; }
    .section-heading h2 { font-size: 1.3rem; }
    .date-display { font-size: 1.4rem; }
    .hadith-card { padding: 20px; }
    .widget { padding: 16px; }
    .hub-card { padding: 18px; }
    .event-card { padding: 16px; }
    .date-card { padding: 18px; }
    .zakat-result { padding: 18px; }
    .zakat-total { font-size: 1.6rem; }
    .conv-result { font-size: 1.1rem; }
}
/* Hub Directory Styles */
.hub-directory { padding: 20px 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.hub-card { background: var(--bg-card); border-radius: 12px; padding: 25px; text-align: center; text-decoration: none; color: var(--text-color); box-shadow: 0 4px 15px var(--shadow-color); transition: all 0.3s ease; border: 1px solid rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hub-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px var(--shadow-color); border-color: var(--primary-color); }
.hub-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }
.hub-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; color: var(--text-color); }
.hub-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }

/* ===================================================
   ARTICLE CONTENT Ã¢â‚¬â€ Premium Reading Design System
   =================================================== */

.article-content {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 40px 44px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    line-height: 1.85;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent line */
.article-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), transparent);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ H2 Article Title Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}
.article-content h2::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 1.4em;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    flex-shrink: 0;
}
[data-theme="dark"] .article-content h2 { color: var(--primary-color); }

/* Ã¢â€â‚¬Ã¢â€â‚¬ H3 Section Heading Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 32px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}
.article-content h3::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Paragraphs Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.97rem;
}
.article-content p:last-child { margin-bottom: 0; }

/* Lead / intro paragraph */
.article-content p:first-of-type {
    font-size: 1.02rem;
    color: var(--text-main);
    border-left: 3px solid var(--primary-color);
    padding-left: 16px;
    margin-bottom: 24px;
}

/* Bold emphasis inside paragraphs */
.article-content strong {
    color: var(--text-main);
    font-weight: 600;
}
[data-theme="dark"] .article-content strong { color: var(--primary-light); }

/* Ã¢â€â‚¬Ã¢â€â‚¬ Unordered Lists Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-content ul li {
    position: relative;
    padding: 14px 16px 14px 34px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.article-content ul li:hover {
    border-color: var(--primary-color);
    background: rgba(13, 92, 70, 0.04);
}
[data-theme="dark"] .article-content ul li:hover {
    background: rgba(52, 211, 153, 0.06);
}

/* Green dot bullet */
.article-content ul li::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 22px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
}

.article-content ul li strong {
    color: var(--primary-dark);
    font-weight: 700;
    white-space: nowrap;
}
[data-theme="dark"] .article-content ul li strong { color: var(--primary-light); }

/* Ã¢â€â‚¬Ã¢â€â‚¬ Ordered Lists Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content ol {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    counter-reset: article-counter;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-content ol li {
    counter-increment: article-counter;
    position: relative;
    padding: 14px 16px 14px 46px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.article-content ol li::before {
    content: counter(article-counter);
    position: absolute;
    left: 12px;
    top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Info / Callout Box Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content .callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(13, 92, 70, 0.06);
    border: 1px solid rgba(13, 92, 70, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 16px 20px;
    margin: 24px 0;
}
.article-content .callout i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.article-content .callout p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.93rem;
    border: none;
    padding: 0;
}
[data-theme="dark"] .article-content .callout {
    background: rgba(52, 211, 153, 0.07);
    border-color: rgba(52, 211, 153, 0.25);
    border-left-color: var(--primary-color);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Section Divider Ã¢â€â‚¬Ã¢â€â‚¬ */
.article-content .section-divider {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 28px 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Responsive Ã¢â€â‚¬Ã¢â€â‚¬ */
@media (max-width: 768px) {
    .article-content {
        padding: 24px 20px;
    }
    .article-content h2 { font-size: 1.25rem; }
    .article-content h3 { font-size: 1rem; }
        .article-content ul li,
    .article-content ol li {
        padding: 12px 14px;
        padding-left: 30px;
    }
}


/* ===================================================
   FAQ SECTION — Premium Interactive Design
   =================================================== */

.faq-section {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 40px 44px;
    box-shadow: var(--shadow-sm);
    margin: 40px 0;
    border: 1px solid var(--border-color);
}

.faq-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}
.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}
[data-theme="dark"] .faq-section h2 { color: var(--text-color); }

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Green left-border accent */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: var(--primary-color);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(13, 92, 70, 0.2);
}
.faq-item:hover::before {
    opacity: 1;
}

.faq-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Icon next to Question */
.faq-item h4::before {
    content: '\f059'; /* FontAwesome question circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
    color: var(--primary-light);
}

.faq-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    padding-left: 26px; /* Align with text after icon */
}

@media (max-width: 768px) {
    .faq-section {
        padding: 30px 20px;
    }
    .faq-item {
        padding: 16px 20px;
    }
    .faq-item h4 {
        font-size: 1rem;
    }
}