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

:root {
    --primary-color: #2c5530;
    --secondary-color: #34a853;
    --accent-color: #f4b942;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #2c5530 0%, #34a853 100%);
    --gradient-accent: linear-gradient(45deg, #f4b942, #e67e22);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(44, 85, 48, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.2em;
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    background: rgba(52, 168, 83, 0.1);
}

.nav-link.admin-link {
    background: var(--gradient-primary);
    color: var(--white);
    margin-left: 20px;
}

.nav-link.admin-link:hover {
    background: var(--gradient-accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 100px 0 0;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5em;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title i {
    color: var(--accent-color);
    margin-right: 15px;
}

.hero-subtitle {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

.islamic-quote {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 40px auto;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.islamic-quote i.fa-quote-left {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 1.5em;
    color: var(--accent-color);
    opacity: 0.7;
}

.islamic-quote i.fa-quote-right {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 1.5em;
    color: var(--accent-color);
    opacity: 0.7;
}

.islamic-quote p {
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.8;
}

.islamic-quote small {
    font-weight: 600;
    color: var(--accent-color);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    fill: var(--light-bg);
}

/* Search Section */
.search-section {
    padding: 40px 0;
    background: var(--white);
}

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

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2em;
}

.search-box input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid #e1e8ed;
    border-radius: 50px;
    font-size: 16px;
    background: var(--white);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.1);
}

.filter-info {
    text-align: center;
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.count {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 60px 0;
    min-height: 50vh;
}

.loading {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-light);
}

.loading i {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.loading p {
    font-size: 1.2em;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.article-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

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

.article-category {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: var(--text-light);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-content {
    padding: 0 25px 25px;
}

.article-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.article-author {
    color: var(--text-light);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-color);
    gap: 8px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-heavy);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.modal-body {
    padding: 40px;
}

.modal-header {
    margin-bottom: 30px;
}

.modal-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
}

.modal-content-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
}

.modal-content-text p {
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section h3 {
    font-size: 1.5em;
}

.footer-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #bbb;
}

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

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

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(244, 185, 66, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent-color);
    color: var(--text-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #bbb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 20px 0;
        gap: 15px;
    }

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

    .nav-toggle {
        display: flex;
    }

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

    .hero-subtitle {
        font-size: 1.1em;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-body {
        padding: 30px 20px;
    }

    .modal-title {
        font-size: 1.5em;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 60px 0 0;
    }

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

    .islamic-quote {
        padding: 20px;
        margin: 30px 0;
    }

    .search-section {
        padding: 30px 0;
    }

    .main-content {
        padding: 40px 0;
    }

    .articles-grid {
        gap: 15px;
    }

    .article-header,
    .article-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:nth-child(2n) {
    animation-delay: 0.1s;
}

.article-card:nth-child(3n) {
    animation-delay: 0.2s;
}