/* --- Modern Design System & Variables --- */
:root {
    --primary-color: #0052D4;
    --secondary-color: #4364F7;
    --accent-color: #6FB1FC;
    --text-color: #2c3e50;
    --light-gray: #ecf0f1;
    --white: #ffffff;
    --dark-bg: #1a1a1a;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

/* --- Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230052d4' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 3rem; color: var(--primary-color); }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

p {
    margin-bottom: 1rem;
}

/* --- Modern Buttons --- */
.btn, .btn-read-more, .btn-login, .btn-submit {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 82, 212, 0.3);
}

.btn:hover, .btn-read-more:hover, .btn-login:hover, .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 82, 212, 0.4);
}

.btn-hero {
    font-size: 1.1rem;
    padding: 15px 35px;
    margin-top: 1.5rem;
}

/* --- Loading Screen --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-out;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

.loading-logo {
    font-size: 2.5rem;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* --- Header & Nav --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 10px;
}

nav {
    background: var(--white);
    padding: 0.8rem 0;
    position: sticky;
    top: 80px;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover::after {
    width: 80%;
    left: 10%;
}

/* --- Main Content & Animations --- */
main {
    padding-top: 160px;
}

#hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(0, 82, 212, 0.05), rgba(67, 100, 247, 0.1));
    border-radius: var(--border-radius);
    margin-bottom: 60px;
}

#hero h1 span {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animasi Fade In untuk Section */
.section-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Modern Content Grid & Cards --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.content-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-top: 5px solid var(--primary-color);
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.card-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

#quran-snippet p, #hadits-snippet p, #berita-snippet p, #forum-snippet p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

#quran-snippet .source, #hadits-snippet .source, #berita-snippet .source, #forum-snippet .source {
    font-size: 0.9rem;
    color: #777;
    text-align: right;
    margin-top: 1rem;
}

.btn-read-more {
    align-self: flex-end;
    margin-top: 20px;
    background: none;
    color: var(--primary-color);
    box-shadow: none;
    font-weight: 600;
}
.btn-read-more:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 82, 212, 0.3);
}

/* --- Founder & Contact --- */
#founder-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: linear-gradient(135deg, rgba(0, 82, 212, 0.05), rgba(67, 100, 247, 0.1));
    padding: 50px;
    border-radius: var(--border-radius);
    margin-top: 60px;
}

.founder-profile img {
    max-width: 150px;
    border-radius: 50%;
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
    border: 5px solid var(--white);
    box-shadow: var(--card-shadow);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- Footer --- */
footer {
    background: var(--text-color);
    color: var(--light-gray);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer i.fa-heart {
    color: #e74c3c;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.5rem; }

    header {
        padding: 0.8rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }

    nav {
        top: 70px;
    }
    
    main {
        padding-top: 140px;
    }

    header .container {
        flex-direction: column;
        gap: 10px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    nav ul li {
        margin: 0;
    }

    #founder-contact {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    
    .founder-profile img {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
    }
}

/* =================================================== */
/* --- GAYA UNTUK HALAMAN BERITA & MODAL --- */
/* =================================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-body h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

.news-card-body p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-detail {
    align-self: flex-start;
    background: none;
    color: var(--primary-color);
    box-shadow: none;
    font-weight: 600;
    padding: 10px 0;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.btn-detail:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 82, 212, 0.3);
    padding: 10px 20px;
}

/* --- Gaya untuk Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-color);
}

#modal-image {
    width: 100%;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

#modal-full-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

/* Responsif untuk Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .close-btn {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }
}

/* =================================================== */
/* --- GAYA UNTUK HALAMAN QURAN READER --- */
/* =================================================== */

.quran-reader-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
}

.control-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.control-group select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.verse-navigation {
    display: flex;
    gap: 50px;
    margin-top: 10px;
}

.verse-nav-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 82, 212, 0.2);
}

.verse-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 82, 212, 0.3);
}

.verse-nav-btn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

#quran-reader-content {
    text-align: left;
    padding: 40px;
    transition: opacity 0.4s ease-in-out;
}

.verse-text {
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 3.5rem;
    text-align: right;
    direction: rtl;
    color: var(--text-color);
    margin-bottom: 20px;
}

.verse-translation {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin-bottom: 30px;
}

.verse-tafsir {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

/* Responsif untuk kontrol pembaca */
@media (max-width: 768px) {
    .verse-navigation {
        gap: 30px;
    }
    .verse-text {
        font-size: 2rem;
        line-height: 2.8rem;
    }
}

/* =================================================== */
/* --- GAYA UNTUK HALAMAN FORUM (DITAMBAHKAN) --- */
/* =================================================== */

.forum-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.forum-thread-card {
    border-left: 5px solid var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.forum-thread-card:hover {
    transform: translateY(-5px);
}

.forum-thread-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    color: var(--text-color);
}

.thread-preview {
    margin-bottom: 15px;
    flex-grow: 1;
}

.thread-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.thread-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.thread-meta i {
    color: var(--primary-color);
}

/* Gaya untuk Jawaban di dalam Modal */
.forum-answer {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

.forum-answer:last-child {
    margin-bottom: 0;
}

.forum-answer-header {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.forum-answer-text {
    line-height: 1.7;
}