/* Mobile-First App-Style CSS Framework */
/* Font Definitions */
@font-face {
    font-family: 'QuranFont';
    src: url('assets/font/quran.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Hafs';
    src: url('assets/font/HAFS-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Preload Quran font for better performance */
.preload-quran-font {
    font-family: 'QuranFont';
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}

/* Force font loading */
.quran-font-loaded {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif !important;
}

/* Arabic/Quran Text Classes */
.arabic-text,
.quran-text,
.arabic {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.2em;
    line-height: 2;
    letter-spacing: 0.5px;
}

.arabic-inline {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
}

/* Force Quran font loading with higher specificity */
.surah-name-arabic,
.surah-title-arabic,
.arabic-text,
.bismillah-text .arabic-text,
.verse-content .arabic-text,
.arabic-text-small,
.arabic-inline,
.admin-arabic-text,
.admin-quran-text,
.admin-arabic,
.admin-arabic-inline {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif !important;
    direction: rtl;
    text-align: right;
    font-weight: normal;
    color: #2c3e50;
    margin: 0.5rem 0;
    line-height: 1.8;
    letter-spacing: 1px;
}

/* Ensure font loads on page load */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Arabic text specific styling */
.arabic-text {
    font-size: 2.2em;
    color: #2c3e50;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-right: 4px solid #8b5cf6;
    margin: 1rem 0;
}

.bismillah-text .arabic-text {
    font-size: 1.8em !important;
    text-align: center !important;
    color: #8b5cf6 !important;
    text-shadow: 0 2px 4px rgba(139, 92, 246, 0.2) !important;
    margin: 1rem 0 !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem !important;
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
}

/* Specific styling for Bismillah */
.bismillah-text .arabic-text {
    font-size: 2.5em !important;
    text-align: center !important;
    color: #8b5cf6 !important;
    text-shadow: 0 2px 4px rgba(139, 92, 246, 0.2) !important;
    margin: 1rem 0 !important;
}

.surah-name-arabic {
    font-size: 1.6em;
    color: #8b5cf6;
    text-shadow: 0 1px 2px rgba(139, 92, 246, 0.2);
}

.surah-title-arabic {
    font-size: 1.8em;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Arabic text in search results and verses */
.arabic-text-small {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.6em;
    line-height: 2.2;
    color: #374151;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    border-right: 4px solid #8b5cf6;
    margin: 0.5rem 0;
    letter-spacing: 0.5px;
}

/* General Arabic verse styling */
.verse-arabic,
.arabic-verse {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.4em;
    line-height: 2.5;
    color: #1f2937;
    background: linear-gradient(135deg, #fef7ed 0%, #fef3c7 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #f59e0b;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.1);
    letter-spacing: 1px;
}

/* Utility classes for Arabic text */
.arabic-quote {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.2em;
    line-height: 2;
    color: #7c3aed;
    background: #f3f4f6;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-right: 4px solid #7c3aed;
    margin: 1rem 0;
    font-style: italic;
}

.arabic-heading {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.6em;
    font-weight: bold;
    color: #1e293b;
    margin: 1.5rem 0 1rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.arabic-caption {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    direction: rtl;
    text-align: right;
    font-size: 0.9em;
    color: #6b7280;
    margin: 0.5rem 0;
    font-style: italic;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    flex: 1;
    text-align: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background-color: white;
}

/* Navigation */
.nav-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

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

.settings-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.settings-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    transition: left 0.3s ease;
    z-index: 200;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding-top: 4rem;
}

.nav-menu.active {
    left: 0;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 150;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-list {
    list-style: none;
    padding: 1rem;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 1rem;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: #f1f5f9;
    color: #667eea;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    padding: 1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

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

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

/* Feature Card Icons */
.feature-icon {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

/* App Promotion Styles */
.app-promo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.app-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.app-promo-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.app-icon {
    font-size: 2.5rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    border-radius: 12px;
}

.app-info {
    flex: 1;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #ffffff;
    direction: ltr;
    text-align: left;
}

.app-description {
    font-size: 0.9rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.app-promo .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.app-promo .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-text {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Quran Header */
.quran-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.quran-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.quran-info {
    flex: 1;
}

.quran-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: white;
}

.quran-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0 0 0.5rem 0;
    color: white;
}

.quran-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    min-height: 120px;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.1);
    border-color: #1e40af;
}

/* Quran Hero Section */
.quran-hero-section {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 3rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quran-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.quran-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.quran-hero-text {
    margin-bottom: 2rem;
}

.quran-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.quran-main {
    display: block;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.quran-subtitle {
    display: block;
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 500;
}

.quran-hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quran-hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.quran-stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e40af;
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(30, 64, 175, 0.1);
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quran-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    padding: 2rem;
    text-align: center;
}

.empty-state-icon {
    color: #cbd5e1;
    margin-bottom: 1rem;
    font-size: 3rem;
}

/* Book Placeholder */
.book-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.book-placeholder-large {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Search Bar */
.search-container {
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    font-size: 1rem;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1rem;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Book Cards */
.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.book-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    background: white;
    padding: 0.5rem;
    box-sizing: border-box;
}

.book-content {
    padding: 1rem;
}

.book-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.book-meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* Book Detail Page Styles */
.book-detail-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.book-detail-image {
    flex: 0 0 200px;
    max-width: 200px;
}

.book-detail-image img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.book-detail-info {
    flex: 1;
    min-width: 0;
}

.book-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.book-detail-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-style: italic;
}

.book-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.meta-item i {
    color: #667eea;
    font-size: 0.8rem;
}

/* Responsive Book Detail Styles */
@media (max-width: 768px) {
    .book-detail-header {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .book-detail-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .book-detail-image img {
        max-width: 250px;
        margin: 0 auto;
    }

    .book-detail-info {
        width: 100%;
    }

    .book-detail-title {
        font-size: 1.25rem;
    }

    .book-detail-meta {
        justify-content: center;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .book-detail-image img {
        max-width: 200px;
    }

    .book-detail-title {
        font-size: 1.1rem;
    }

    .book-detail-subtitle {
        font-size: 0.9rem;
    }
}

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.category-pill:hover {
    background: #667eea;
    color: white;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.category-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.category-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-content {
    flex: 1;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.category-link {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.category-card:hover .category-link {
    color: #4f46e5;
}

/* Responsive Categories Grid */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .category-card {
        padding: 1rem;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 0.75rem;
    }

    .category-name {
        font-size: 1rem;
    }

    /* Mobile Hero Section */
    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Mobile Footer Styles */
    .site-footer {
        padding: 1.5rem 0 1rem 0;
        margin-top: 2rem;
    }

    .footer-content {
        padding: 0 1rem;
    }

    .footer-content p {
        font-size: 0.85rem;
        margin: 0.4rem 0;
    }

    .footer-links {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .footer-links a {
        display: inline-block;
        margin: 0;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        transition: background-color 0.2s;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .footer-links a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* About Page Specific Styles */
.mission-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.mission-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.mission-card h3 {
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.mission-card p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.9rem;
}

.feature-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.feature-item h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-item p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.9rem;
}

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

.level-group {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.level-group h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.level-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.level-badge {
    background: #667eea;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.team-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.team-card h3 {
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.team-card p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Hero stats for about page */
.welcome-card .hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Responsive styles for about page */
@media (max-width: 768px) {
    .academic-levels {
        grid-template-columns: 1fr;
    }

    .welcome-card .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.25rem 0.75rem;
        min-height: 100px;
    }

    .stat-number {
        font-size: 1.8rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }
}
.tabs {
    display: flex;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #64748b;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
}

/* Footer */
.app-footer {
    background: #f8fafc;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.footer-text {
    font-size: 0.75rem;
    color: #64748b;
}

/* Site Footer (Enhanced) */
.site-footer {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: #ffffff;
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid #718096;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #ffffff;
}

.footer-content a {
    color: #93c5fd;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: #dbeafe;
    text-decoration: underline;
}

.footer-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #718096;
}

.footer-links a {
    margin: 0 0.5rem;
    font-size: 0.85rem;
    color: #e2e8f0;
}

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

/* Responsive Design */
@media (min-width: 768px) {
    .app {
        max-width: 768px;
    }

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

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .book-image {
        height: 200px !important;
    }
}

@media (min-width: 1024px) {
    .app {
        max-width: 1024px;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        box-shadow: none;
        padding-top: 0;
    }

    .nav-list {
        display: flex;
        gap: 1rem;
        padding: 0;
    }

    .nav-item {
        margin-bottom: 0;
    }

    .nav-link {
        padding: 0.5rem 1rem;
    }

    .nav-toggle,
    .nav-overlay {
        display: none;
    }

    .book-image {
        height: 250px !important;
        border-radius: 12px;
        overflow: hidden;
    }

    .book-image img {
        transition: transform 0.3s ease;
        object-fit: scale-down;
        background: white;
        padding: 0.5rem;
        box-sizing: border-box;
    }

    .book-card:hover .book-image img {
        transform: scale(1.05);
    }

    .grid-2 {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .book-card {
        border-radius: 16px;
    }

    /* Desktop Hero Section */
    .hero-section {
        padding: 3rem 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    /* Desktop Blog Image Styles */
    .post-image {
        height: 280px !important;
        border-radius: 12px;
        overflow: hidden;
    }

    .post-hero-image {
        margin-bottom: 2.5rem;
        border-radius: 16px;
    }

    .hero-img {
        max-height: 600px;
    }
}

/* Desktop Blog Posts Layout */
@media (min-width: 1024px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }

    .blog-post-card {
        margin-bottom: 0;
    }

    .post-image {
        height: 220px;
    }

    .post-content {
        padding: 1.25rem;
    }

    .post-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }
}

/* Mobile Blog Posts Layout */
@media (max-width: 768px) {
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .blog-post-card {
        margin-bottom: 0;
    }

    .post-image {
        height: 180px;
    }

    .post-content {
        padding: 1rem;
    }

    .post-title {
        font-size: 1rem;
        line-height: 1.4;
    }

    .post-meta {
        font-size: 0.85rem;
    }
}

/* Tablet Blog Posts Layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .blog-posts {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }

    .post-image {
        height: 200px;
    }

    /* Tablet Hero Section */
    .hero-section {
        padding: 2.5rem 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}

/* Desktop Styles for Related Blog Posts */
@media (min-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .related-image {
        height: 180px;
    }

    .related-content h4 {
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: #64748b; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Surah Card Loading State */
.surah-card.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.surah-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quran/Surah Styles */
.surah-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.surah-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.surah-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* Circular surah number in grid */
div.surah-number {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: all 0.3s ease;
    line-height: 1;
    text-align: center;
    padding: 0;
}

div.surah-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.surah-card:hover div.surah-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.surah-card:hover div.surah-number::before {
    left: 100%;
}

/* Text surah number in individual view */
span.surah-number {
    background: none;
    color: #1e293b;
    border-radius: 0;
    box-shadow: none;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    background-color: #f1f5f9;
    border-radius: 6px;
    margin-right: 0.5rem;
}

/* Subtle pulse animation for surah numbers */
@keyframes surahNumberPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

div.surah-number {
    animation: surahNumberPulse 2s ease-in-out infinite;
}

.surah-info {
    flex: 1;
    margin: 0 1rem;
}

.surah-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.surah-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.surah-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.surah-type.makki {
    background: #fef3c7;
    color: #92400e;
}

.surah-type.madani {
    background: #dbeafe;
    color: #1e40af;
}

.surah-verses {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.surah-arrow {
    color: #94a3b8;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.surah-reading-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.surah-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.surah-title-arabic {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
}

.surah-navigation {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Bismillah */
.bismillah-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.bismillah-text {
    padding: 1.5rem;
}

.bismillah-text .arabic-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
}

.bismillah-text .translation-text {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #1e40af;
    font-weight: 600;
    text-align: center;
}

/* Verse Cards */
.verse-card {
    margin-bottom: 1rem;
    position: relative;
}

.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.verse-number {
    display: flex;
    align-items: center;
}

.verse-badge {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
}

.verse-actions {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.verse-actions:hover {
    background: #f1f5f9;
    color: #667eea;
}

.verse-content {
    line-height: 1.7;
}

.arabic-text {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: right;
    direction: rtl;
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    line-height: 2.2;
}

.arabic-text.small { font-size: 1.6rem; }
.arabic-text.medium { font-size: 2rem; }
.arabic-text.large { font-size: 2.4rem; }

.translation-text {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

.translation-text.small { font-size: 0.9rem; }
.translation-text.medium { font-size: 1rem; }
.translation-text.large { font-size: 1.1rem; }

.verse-footnotes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.verse-footnotes small {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.settings-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
}

.settings-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-close:hover {
    background: #e2e8f0;
    color: #667eea;
}

.settings-content {
    padding: 1.5rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.setting-item select,
.setting-item input[type="checkbox"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.setting-item select:focus,
.setting-item input[type="checkbox"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-item input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Welcome Card Styles */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.welcome-card .card-header {
    text-align: center;
    border-bottom: none;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.welcome-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.welcome-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.welcome-actions .btn {
    flex: 1;
    max-width: 140px;
}

/* Book Placeholder */
.book-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border-radius: 4px;
}

/* Blog Post Styles */
.blog-post-link {
    display: block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.blog-post-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.blog-post-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.blog-post-date {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Page Styles */
.page-description {
    text-align: center;
    padding: 2rem 1rem;
}

.description-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.description-text {
    font-size: 1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.category-filter {
    padding: 1.5rem;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.filter-tab:hover {
    background: #e2e8f0;
    color: #475569;
}

.filter-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-tab.active:hover {
    background: #5a67d8;
}

.blog-grid {
    display: grid;
    gap: 1.5rem;
}

.blog-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.blog-card,
.blog-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

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

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    background: white;
    padding: 0.5rem;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.post-img:hover {
    transform: scale(1.05);
}

/* Blog Post Hero Image */
.post-hero-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: scale-down;
    background: white;
    display: block;
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    margin-bottom: 0.75rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-right: 1rem;
}

.post-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: #667eea;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-excerpt {
    padding: 0 1.5rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-actions {
    padding: 0 1.5rem 1.5rem;
}

.pagination-info {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.pagination-nav:hover {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}

/* Fatwa Styles */
.fatwa-list {
    display: grid;
    gap: 1.5rem;
}

.fatwa-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.fatwa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.fatwa-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.fatwa-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.fatwa-question i {
    color: #667eea;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.fatwa-category {
    margin-bottom: 0.5rem;
}

.fatwa-answer-preview {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

.answer-text {
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fatwa-meta {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    flex-wrap: wrap;
}

.fatwa-actions {
    padding: 0 1.5rem 1.5rem;
}

.fatwa-form {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.fatwa-form .form-group {
    margin-bottom: 1rem;
}

.fatwa-form .form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.fatwa-form .form-input,
.fatwa-form .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.fatwa-form .form-input:focus,
.fatwa-form .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fatwa-form .form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Fatwa Detail Styles */
.fatwa-detail {
    max-width: 800px;
    margin: 0 auto;
}

.fatwa-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.fatwa-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.fatwa-type i {
    font-size: 1rem;
}

.fatwa-category .category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.fatwa-category .category-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.fatwa-question-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.fatwa-question {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.fatwa-question i {
    color: #667eea;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.fatwa-answer-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.answer-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.answer-title i {
    color: #10b981;
}

.fatwa-answer {
    color: #374151;
    line-height: 1.8;
    font-size: 1rem;
}

.fatwa-footer {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.fatwa-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    flex-wrap: wrap;
}

.related-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-title i {
    color: #667eea;
}

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

.related-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.related-item:hover {
    background: #e2e8f0;
    border-color: #667eea;
    transform: translateX(-2px);
}

.related-content {
    flex: 1;
}

.related-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

.related-arrow {
    color: #94a3b8;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.related-item:hover .related-arrow {
    color: #667eea;
    transform: translateX(-2px);
}

.post-navigation {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Submission Result Styles */
.submission-result {
    text-align: center;
    padding: 2rem;
}

.submission-result.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.submission-result.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.result-icon.success {
    color: #ecfdf5;
}

.result-icon.error {
    color: #fef2f2;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-message {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.submission-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

.submission-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.detail-item {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-item strong {
    display: inline-block;
    min-width: 80px;
    color: rgba(255, 255, 255, 0.8);
}

.question-preview {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.6;
}

.result-actions {
    margin-top: 2rem;
}

.contact-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.contact-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-title i {
    color: #667eea;
}

.contact-info p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.contact-item i {
    color: #667eea;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item span {
    color: #374151;
    font-weight: 500;
}

/* Statistics Styles */
.stat-item {
    padding: 1rem 0;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f172a;
        color: #f1f5f9;
    }

    .app {
        background: #1e293b;
    }

    .card {
        background: #334155;
        border-color: #475569;
    }

    .card-title {
        color: #f1f5f9;
    }

    .form-input {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }

    .search-input {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }

    .blog-post-link {
        background: #334155;
        border-color: #475569;
    }

    .blog-post-link:hover {
        border-color: #667eea;
    }

/* Filter Panel */
.filter-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filter-panel.active {
    right: 0;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.filter-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.filter-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.filter-form {
    padding: 1rem;
}

.filter-actions {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Filter Overlay */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Filter Overlay */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Filter Card Styles */
.filter-card {
    margin-bottom: 1.5rem;
}

.filter-card .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

.filter-card .card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.filter-card .card-title i {
    color: #667eea;
}

/* Filter Toggle Button */
.filter-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.filter-toggle:hover {
    background: #e2e8f0;
    color: #1e293b;
}

    .blog-post-title {
        color: #f1f5f9;
    }

    .blog-post-date {
        color: #94a3b8;
    }

    .book-placeholder {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
    }

    .welcome-card {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
    }

    .welcome-title {
        color: #f1f5f9;
    }

    .welcome-subtitle {
        color: rgba(241, 245, 249, 0.9);
    }

    .islamic-info-card {
        background: linear-gradient(135deg, #1e3a1e 0%, #0f1f0f 100%);
    }

    .islamic-date {
        background: rgba(255, 255, 255, 0.05);
    }

    .prayer-times-section {
        background: rgba(255, 255, 255, 0.03);
    }

    .prayer-time {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Search Page Styles */
.search-form-extended {
    padding: 1.5rem;
}

.search-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.search-input-group .search-input {
    padding-right: 3.5rem;
}

.search-input-group .search-btn {
    right: 0.75rem;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-input-group .search-btn:hover {
    background: #5a67d8;
    transform: translateY(-50%) scale(1.05);
}

.search-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.search-query {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.search-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.results-count {
    font-weight: 500;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.search-type {
    font-size: 0.9rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.search-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.search-result-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateX(-2px);
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.result-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

.result-meta i {
    font-size: 0.8rem;
}

.result-type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-top: 0.5rem;
}

.result-arrow {
    color: #9ca3af;
    font-size: 1.25rem;
    margin-left: 1rem;
}

.verse-preview {
    margin: 0.5rem 0;
}

.arabic-text-small {
    font-family: 'Hafs', 'QuranFont', 'Traditional Arabic', 'Arabic Typesetting', serif;
    font-size: 1.1rem;
    color: #1f2937;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
    direction: rtl;
}

.translation-text-small {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

.blog-preview {
    margin: 0.5rem 0;
}

.blog-preview p {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

.search-suggestions {
    padding: 1.5rem;
}

.suggestions-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.suggestion-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.search-help {
    padding: 1.5rem;
}

.help-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
}

.help-list li:last-child {
    border-bottom: none;
}

.help-list strong {
    color: #1f2937;
}

/* Responsive Search Styles */
@media (max-width: 768px) {
    .search-form-extended {
        padding: 1rem;
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .search-results-header {
        padding: 1rem;
    }

    .search-query {
        font-size: 1.25rem;
    }

    .search-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .search-result-item {
        padding: 0.75rem;
    }

    .result-title {
        font-size: 1rem;
    }

    .suggestion-tags {
        gap: 0.25rem;
    }

    .suggestion-tag {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Responsive Filter Card */
@media (max-width: 768px) {
    .filter-card {
        margin-bottom: 1rem;
    }

    .filter-card .card-header {
        padding: 0.75rem 1rem;
    }

    .filter-card .card-title {
        font-size: 1rem;
    }

    .filter-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

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

/* Blog Post Related Posts - Base Styles */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-title i {
    color: #667eea;
}

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

.related-post {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.related-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.related-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    background: white;
    padding: 0.5rem;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.related-post:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1rem;
}

.related-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

/* Desktop Styles for Related Blog Posts */
@media (min-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .related-image {
        height: 180px;
    }

    .related-content h4 {
        font-size: 1.1rem;
    }
}

/* Mobile Styles for Related Blog Posts */
@media (max-width: 768px) {
    .related-posts {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .related-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-post {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
        border-radius: 8px;
    }

    .related-image {
        width: 100px;
        height: 80px;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    .related-image img {
        padding: 0.25rem;
    }

    .related-content {
        padding: 0.75rem 0;
        flex: 1;
    }

    .related-content h4 {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 0.25rem;
    }

/* PDF List Styles for Book Detail Page */
.pdf-list-section {
    background: white !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin: 2rem 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    position: relative !important;
    overflow: visible !important;
}

.pdf-list-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

.pdf-list-title i {
    color: #667eea !important;
    flex-shrink: 0 !important;
}

.pdf-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    position: relative !important;
}

.pdf-item {
    display: flex !important;
    align-items: center !important;
    padding: 1rem !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important; /* Ensures item doesn't exceed container width */
}

.pdf-item:hover {
    background: #e2e8f0 !important;
    border-color: #667eea !important;
    transform: translateX(-2px) !important;
}

.pdf-info {
    flex: 1 !important;
    margin-right: 1rem !important;
    min-width: 0 !important; /* Prevents flex item from overflowing */
    overflow: hidden !important; /* Ensures content doesn't overflow */
}

.pdf-name {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

.pdf-name i {
    color: #10b981 !important;
    font-size: 0.9rem !important;
}

.pdf-meta {
    font-size: 0.85rem !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.pdf-meta i {
    font-size: 0.8rem !important;
}

.pdf-actions {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* Prevents wrapping on desktop */
}

.pdf-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    background: white !important;
    color: #475569 !important;
    cursor: pointer !important;
}

.pdf-btn:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
    transform: translateY(-1px) !important;
}

.pdf-btn.download {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.pdf-btn.download:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.pdf-btn.read {
    background: #f59e0b !important;
    color: white !important;
    border-color: #f59e0b !important;
}

.pdf-btn.read:hover {
    background: #d97706 !important;
    border-color: #d97706 !important;
}

.pdf-btn i {
    font-size: 0.8rem !important;
}

/* Mobile Responsive PDF List */
@media (max-width: 768px) {
    .pdf-list-section {
        padding: 1rem !important;
        margin: 1.5rem 0 !important;
    }

    .pdf-list-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }

    .pdf-item {
        padding: 0.75rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .pdf-info {
        margin-right: 0 !important;
        width: 100% !important;
    }

    .pdf-actions {
        width: 100% !important;
        justify-content: center !important;
    }

    .pdf-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 0.75rem 1rem !important;
    }
}

/* Force PDF section to work on desktop */
@media (min-width: 1024px) {
    /* Override any conflicting styles */
    .main-content .pdf-list-section,
    main .pdf-list-section,
    .app .pdf-list-section {
        width: 100% !important;
        max-width: none !important;
        padding: 2rem !important;
        margin: 3rem 0 !important;
        box-sizing: border-box !important;
    }

    .main-content .pdf-list,
    main .pdf-list,
    .app .pdf-list {
        width: 100% !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .main-content .pdf-item,
    main .pdf-item,
    .app .pdf-item {
        width: 100% !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1.25rem !important;
        box-sizing: border-box !important;
    }

    .main-content .pdf-info,
    main .pdf-info,
    .app .pdf-info {
        flex: 1 !important;
        margin-right: 2rem !important;
        max-width: calc(100% - 200px) !important;
        width: auto !important;
        flex-basis: auto !important;
        box-sizing: border-box !important;
    }

    .main-content .pdf-actions,
    main .pdf-actions,
    .app .pdf-actions {
        flex-shrink: 0 !important;
        min-width: 180px !important;
        width: auto !important;
        flex-basis: auto !important;
        display: flex !important;
        justify-content: flex-end !important;
        gap: 0.5rem !important;
        box-sizing: border-box !important;
    }
}

/* Desktop Arabic Font Size Enhancements */
@media (min-width: 1024px) {
    /* Main Arabic text - much larger for desktop */
    .arabic-text {
        font-size: 4rem !important;
        line-height: 3 !important;
        padding: 2.5rem !important;
    }

    /* Bismillah text - very large for desktop */
    .bismillah-text .arabic-text {
        font-size: 5rem !important;
        padding: 3rem !important;
        line-height: 3.5 !important;
    }

    /* Arabic text size variations for desktop */
    .arabic-text.small { font-size: 3rem !important; }
    .arabic-text.medium { font-size: 4rem !important; }
    .arabic-text.large { font-size: 4.5rem !important; }

    /* Arabic text in verses - very prominent */
    .verse-content .arabic-text {
        font-size: 4.2rem !important;
        line-height: 3.5 !important;
        padding: 3rem !important;
    }

    /* Arabic text in search results */
    .arabic-text-small {
        font-size: 2.8rem !important;
        line-height: 3 !important;
    }

    /* Arabic headings */
    .arabic-heading {
        font-size: 4rem !important;
    }

    /* Arabic quotes */
    .arabic-quote {
        font-size: 3.2rem !important;
        line-height: 3.2 !important;
        padding: 2.5rem !important;
    }

    /* Arabic captions */
    .arabic-caption {
        font-size: 2.8rem !important;
    }

    /* Surah names - very prominent */
    .surah-name-arabic {
        font-size: 4.2rem !important;
    }

    /* Surah titles - largest */
    .surah-title-arabic {
        font-size: 5.2rem !important;
    }

    /* Force all Arabic text to be large on desktop */
    .verse-content .arabic-text,
    .card .arabic-text,
    .bismillah-text .arabic-text,
    .arabic-text,
    .arabic-text-small,
    .arabic-text-medium,
    .arabic-text-large {
        font-size: 4rem !important;
        line-height: 3.2 !important;
    }
}

/* Mobile Arabic Text Optimization */
@media (max-width: 768px) {
    /* Arabic text optimized for mobile */
    .arabic-text {
        font-size: 1.8rem !important;
        line-height: 2.2 !important;
        padding: 1.2rem !important;
    }

    /* Bismillah text for mobile */
    .bismillah-text .arabic-text {
        font-size: 2.2rem !important;
        padding: 1.5rem !important;
        line-height: 2.5 !important;
    }

    .bismillah-text .translation-text {
        color: #1e40af !important;
        font-weight: 600 !important;
    }

    /* Arabic text in verses for mobile */
    .verse-content .arabic-text {
        font-size: 2rem !important;
        line-height: 2.4 !important;
        padding: 1.5rem !important;
    }

    /* Arabic text in search results for mobile */
    .arabic-text-small {
        font-size: 1.4rem !important;
        line-height: 2 !important;
    }

    /* Surah names for mobile */
    .surah-name-arabic {
        font-size: 1.8rem !important;
    }

    /* Surah titles for mobile */
    .surah-title-arabic {
        font-size: 2.0rem !important;
    }

    /* Surah number for tablets */
    div.surah-number {
        width: 3.2rem !important;
        height: 3.2rem !important;
        font-size: 1rem !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Even smaller Arabic text for very small screens */
    .arabic-text {
        font-size: 1.6rem !important;
        padding: 1rem !important;
    }

    .bismillah-text .arabic-text {
        font-size: 2rem !important;
        padding: 1.2rem !important;
    }

    .bismillah-text .translation-text {
        color: #1e40af !important;
        font-weight: 600 !important;
        font-size: 0.85rem !important;
    }

    .verse-content .arabic-text {
        font-size: 1.8rem !important;
        padding: 1.2rem !important;
    }

    .surah-name-arabic {
        font-size: 1.6rem !important;
    }

    .surah-title-arabic {
        font-size: 1.8rem !important;
    }

    /* Surah number for small mobile */
    div.surah-number {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1rem !important;
        margin-left: 0.25rem !important;
    }

    /* App promotion for mobile */
    .app-promo {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.25rem !important;
        padding: 1.25rem !important;
    }

    .app-promo-content {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .app-icon {
        font-size: 2rem !important;
        padding: 0.5rem !important;
    }

    .app-title {
        font-size: 1rem !important;
        text-align: center !important;
    }

    .app-description {
        font-size: 0.85rem !important;
    }

    .app-promo .btn {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
    }
}

