/* Saudi Cities Module Styles */
:root {
    --bg: #ffffff;
    --text: #0f1f1c;
    --muted: #5f6f6b;
    --primary: #2e8b57;
    --primary-dark: #1f6b43;
    --primary-soft: #e9f6ee;
    --border: #e2ece7;
    --card: #f7fbf8;
    --shadow: 0 8px 24px rgba(31, 107, 67, 0.12);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

html[dir="rtl"] .text-en {
    display: none;
}

html[dir="ltr"] .text-ar {
    display: none;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.logo-text {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-dark);
}

.logo-link {
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.lang-toggle {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-line {
    width: 22px;
    height: 2px;
    background: var(--text);
    display: block;
    margin: 4px 0;
}

.mobile-menu {
    display: none;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 1rem 0;
}

.mobile-menu-title {
    display: none;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.mobile-menu-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 0;
}

.mobile-menu-link:hover {
    color: var(--primary);
}

.mobile-menu-close {
    display: none;
}

/* Hero */
.hub-hero {
    padding: 3.5rem 0 2.5rem;
    background: linear-gradient(135deg, var(--primary-soft), #ffffff);
    text-align: center;
}

.hub-hero h1 {
    margin: 0 0 1rem;
    font-size: 2.4rem;
    color: var(--primary-dark);
}

.hub-hero p {
    margin: 0 auto;
    max-width: 720px;
    color: var(--muted);
}

/* Sections */
.hub-section {
    padding: 2.5rem 0;
}

.hub-section.alt {
    background: #f9fafb;
}

.section-title {
    text-align: center;
    margin: 0 0 1rem;
    color: var(--primary-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.hub-intro p {
    margin: 0 auto;
    max-width: 820px;
    color: var(--muted);
    text-align: center;
}

/* City grid */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.city-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.city-card-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.city-card-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.hub-links a {
    background: var(--primary-soft);
    color: var(--primary-dark);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
}

/* FAQ */
.hub-faq details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
}

.hub-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
}

/* City page */
.city-hero {
    text-align: center;
    padding: 2.5rem 0 1rem;
}

.city-hero h1 {
    margin: 0 0 0.5rem;
    color: var(--primary-dark);
}

.city-hero p {
    color: var(--muted);
    margin: 0;
}

.date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.date-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.date-card h3 {
    margin: 0 0 0.5rem;
    color: var(--primary-dark);
}

.next-prayer {
    text-align: center;
    margin: 1rem 0 2rem;
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
}

.simple-table,
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.simple-table th,
.simple-table td,
.calendar-table th,
.calendar-table td {
    padding: 0.7rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
    font-size: 0.95rem;
}

.simple-table th,
.calendar-table th {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.calendar-heading {
    text-align: center;
    margin: 2rem 0 1rem;
    color: var(--primary-dark);
}

.city-related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.city-related a {
    background: var(--primary-soft);
    color: var(--primary-dark);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
}

.simple-hadith {
    margin-top: 2rem;
    text-align: center;
}

.simple-hadith .hadith-text {
    max-width: 760px;
    margin: 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.simple-hadith .hadith-ref {
    color: var(--muted);
    margin-top: 0.4rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: 2rem;
    background: var(--primary-dark);
    color: #fff;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-title {
    margin: 0 0 0.75rem;
    color: #fff;
    font-size: 1.05rem;
}

.footer-text {
    margin: 0;
    color: #e8f2ec;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.footer-links a {
    color: #e8f2ec;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    color: #dfeae4;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 1rem;
}

html[dir="ltr"] .footer {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .footer {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .footer-bottom {
    text-align: left;
}

html[dir="rtl"] .footer-bottom {
    text-align: right;
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: inline-block;
    }
    .mobile-menu.open {
        display: block;
    }
}
