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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: #2c3e50;
    line-height: 1.6;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #1e3c2c 0%, #2d5a3f 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    opacity: 0.9;
}

.search-box {
    margin-top: 20px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-icon {
    padding: 0 15px;
    color: #2d5a3f;
}

.search-wrapper input {
    flex: 1;
    padding: 15px 0;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    background: transparent;
}

.search-btn {
    background: #2d5a3f;
    border: none;
    padding: 15px 30px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #1e3c2c;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #2d5a3f 0%, #1e3c2c 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
}

.hero-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.hero h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* Categories */
.categories {
    padding: 60px 0;
}

.categories h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: #1e3c2c;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.category-card {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 15px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: #2d5a3f;
    color: white;
}

.category-card i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.category-card span {
    font-size: 18px;
    font-weight: 600;
}

/* Results Page */
.search-header {
    padding: 15px 0;
}

.results-header {
    margin: 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.results-header h2 {
    color: #1e3c2c;
    margin-bottom: 10px;
}

.results-stats {
    color: #666;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 60px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ddd;
    border-top-color: #2d5a3f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.result-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.result-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.result-card:hover .result-thumbnail img {
    transform: scale(1.05);
}

.result-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
}

.result-info {
    padding: 20px;
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e3c2c;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.no-results {
    text-align: center;
    padding: 60px 0;
}

.no-results i {
    font-size: 60px;
    color: #999;
    margin-bottom: 20px;
}

/* Fatwa Page */
.fatwa-header {
    padding: 15px 0;
}

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

.back-btn {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.fatwa-container {
    margin: 40px 0;
}

.fatwa-title-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.fatwa-title-section h1 {
    color: #1e3c2c;
    margin-bottom: 15px;
}

.fatwa-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.fatwa-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.fatwa-content h3 {
    color: #1e3c2c;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2d5a3f;
}

.fatwa-content h3 i {
    margin-left: 10px;
}

.fatwa-text {
    line-height: 1.8;
    font-size: 16px;
}

.fatwa-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.video-section, .audio-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-section h3, .audio-section h3 {
    color: #1e3c2c;
    margin-bottom: 20px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-link, .download-btn {
    display: inline-block;
    background: #ff0000;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    margin-top: 15px;
    transition: background 0.3s;
}

.video-link:hover, .download-btn:hover {
    background: #cc0000;
}

.audio-player {
    margin: 20px 0;
}

audio {
    width: 100%;
}

.download-btn {
    background: #2d5a3f;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.download-btn:hover {
    background: #1e3c2c;
}

@media (max-width: 768px) {
    .fatwa-media {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h2 {
        font-size: 24px;
    }
}

footer {
    background: #1e3c2c;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}
