/* المتغيرات العامة */
:root {
    --primary-color: #2c7a7b;
    --secondary-color: #38b2ac;
    --accent-color: #d4af37;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #38b2ac;
    --secondary-color: #2c7a7b;
    --accent-color: #fbbf24;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-card: #2d3748;
    --border-color: #4a5568;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* إعادة تعيين الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-start {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.logo-icon {
    width: 50px;
    height: 50px;
    color: var(--accent-color);
}

.logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    padding-left: .5px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 3px;
    background-color: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

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

.theme-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    color: #000000;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 140px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.theme-select:hover,
.theme-select:focus {
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

[data-theme="dark"] .theme-select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #000000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 250px);
    padding: 40px 0;
}

/* Search Section */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 122, 123, 0.1);
}

.search-results {
    margin-top: 20px;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: none;
}

.search-results.active {
    display: block;
}

/* Content Area */
.content-area {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.1) 0%, rgba(56, 178, 172, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.hero-actions .btn-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 480px) {
    .hero-actions .btn-column {
        width: 100%;
    }

    .hero-actions .btn-column .btn {
        width: 100%;
    }
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.media-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-align: center;
}

.media-description {
    color: var(--text-secondary);
    margin: 0 auto 30px;
    max-width: 640px;
    line-height: 1.8;
    text-align: center;
}

.media-navigation {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.media-nav-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.media-nav-btn:hover,
.media-nav-btn:focus {
    background: var(--secondary-color);
    outline: none;
    box-shadow: var(--shadow-lg);
}

.media-nav-btn:active {
    transform: translateY(1px);
}

/* Card Styles */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Favorites Media */
.favorites-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    align-items: stretch;
}

.favorite-media-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    min-height: 100%;
}

.favorite-media-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.favorite-media-item video,
.favorite-media-item audio {
    width: 100%;
    display: block;
    background-color: var(--bg-secondary);
}

.favorite-media-item video {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.favorite-media-item .media-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.favorite-media-item .media-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.favorite-media-item h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.favorite-media-item .media-info-actions {
    display: flex;
    gap: 10px;
}

.favorite-media-item .media-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.favorite-media-item p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.favorite-media-item .media-ayah,
.favorite-media-item .media-waqfah {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
}

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Expanded Card Styles */
.card.expanded {
    grid-column: span 2;
    max-width: 100%;
}

.card.collapsed .card-content {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.card.collapsed .card-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, var(--bg-card));
}

.expand-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 0.9rem;
    width: 100%;
}

.expand-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

.expand-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.card.expanded .expand-toggle svg {
    transform: rotate(180deg);
}

.hadith-index {
    margin-bottom: 40px;
    padding: 25px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.hadith-index h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.hadith-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.hadith-index-group h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.hadith-index-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hadith-index-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.hadith-index-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(44, 122, 123, 0.1);
}

.hadith-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hadith-source-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.hadith-source-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.hadith-book-section {
    margin-bottom: 30px;
}

.hadith-book-title {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.hadith-chapter {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

.hadith-book-section:last-child {
    margin-bottom: 0;
}

.hadith-latest-section {
    margin-top: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hadith-latest-title {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.4rem;
}

.hadith-back {
    margin-bottom: 20px;
}

.hadith-back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hadith-back-link:hover {
    text-decoration: underline;
}

.hadith-book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.hadith-book-list .hadith-card {
    height: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.card-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.ayah-text {
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.05) 0%, rgba(56, 178, 172, 0.05) 100%);
    padding: 20px;
    border-right: 4px solid var(--accent-color);
    border-radius: 8px;
    margin: 15px 0;
    font-size: 1.2rem;
    line-height: 2;
}

.tafseer {
    margin-top: 15px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 5px;
}

.favorite-btn:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

.favorite-btn.active {
    color: var(--accent-color);
}

.favorite-btn svg {
    width: 24px;
    height: 24px;
}

.card-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.hadith-card .card-actions,
.modal-card .card-actions {
    right: auto;
    left: 15px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 5px;
}

.action-btn:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

.action-btn svg {
    width: 24px;
    height: 24px;
}

/* Suwar Grid */
.suwar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.surah-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.surah-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.surah-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.surah-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.surah-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.topic-card {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.topic-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.topic-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    color: var(--primary-color);
}

.topic-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.topic-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Hadith Card */
.hadith-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border-right: 4px solid var(--secondary-color);
}

.hadith-text {
    background: linear-gradient(135deg, rgba(56, 178, 172, 0.05) 0%, rgba(44, 122, 123, 0.05) 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 1.1rem;
    line-height: 2;
}

.hadith-source {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.social-link {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: none;
}
.social-link.instagram {
    width: 68px;
    height: 68px;
}

.social-link.facebook {
    width: 84px;
    height: 84px;
}

.social-link.tiktok {
    width: 75px;
    height: 75px;
}

.social-link.youtube {
    width: 88px;
    height: 88px;
}

.social-link.phone {
    width: 80px;
    height: 80px;
}

.social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-link::after {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 10px);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.social-link:hover {
    transform: translateY(-8px);
}

.social-link:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 100px;
    height: 100px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-start {
        width: 100%;
        justify-content: space-between;
    }

    .header-actions {
        order: 2;
        align-self: flex-end;
        width: 100%;
        justify-content: flex-end;
    }

    .nav {
        width: 100%;
        order: 3;
    }

    .nav-toggle {
        display: inline-flex;
        align-self: flex-start;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        padding: 12px 15px;
        margin-top: 10px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        box-shadow: var(--shadow);
    }

    .nav.is-open .nav-list {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

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

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: var(--accent-color);
    color: white;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}


.card, .hadith-card {
    position: relative;
    cursor: default;
}

/* Expand/Collapse Styles */
.card .card-content,
.hadith-card .hadith-text,
.hadith-card .hadith-source,
.hadith-card .tafseer,
.hadith-card .hadith-benefits {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.card.expanded .card-content,
.hadith-card.expanded .hadith-text,
.hadith-card.expanded .hadith-source,
.hadith-card.expanded .tafseer,
.hadith-card.expanded .hadith-benefits {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.hadith-benefits {
    margin-top: 15px;
    background: linear-gradient(135deg, rgba(56, 178, 172, 0.05) 0%, rgba(44, 122, 123, 0.05) 100%);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.hadith-benefits ul {
    margin: 12px 0 0;
    padding-inline-start: 20px;
}

.hadith-benefits li {
    margin-bottom: 6px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    padding: 20px;
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 24px 24px 32px;
    border: 1px solid var(--border-color);
    width: min(700px, 100%);
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.close-button {
    color: var(--text-secondary);
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}
