/* =========================
   RESET
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f8faf9;
    color: #17231e;
    line-height: 1.7;
    transition: 0.3s;
}

button,
a {
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================
   DARK MODE
========================= */

body.dark {
    background: #111816;
    color: #edf5f1;
}

body.dark .navbar,
body.dark .card,
body.dark .tarbiyah-card,
body.dark .quiz-container,
body.dark .source-item,
body.dark .student-card {
    background: #18221f;
}

body.dark .alternate {
    background: #0d1412;
}

body.dark p {
    color: #b9c8c1;
}

body.dark .question-box,
body.dark .quiz-answer,
body.dark .review-item {
    background: #202c28;
}

body.dark .modal-box {
    background: #18221f;
}


/* =========================
   VARIABLES
========================= */

:root {

    --primary: #146b50;
    --primary-dark: #0c4d3a;

    --secondary: #c79a45;

    --text: #17231e;
    --muted: #68766f;

    --background: #f8faf9;
    --card: #ffffff;

    --border: #e2e9e5;

    --shadow:
        0 15px 40px rgba(20, 50, 40, 0.08);
}


/* =========================
   NAVBAR
========================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.95);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(15px);
}

.nav-container {
    max-width: 1200px;
    margin: auto;

    padding: 15px 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

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

.logo > span {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    background: var(--primary);
    color: white;

    border-radius: 12px;

    font-size: 23px;
}

.logo div {
    display: flex;
    flex-direction: column;
}

.logo strong {
    font-size: 14px;
}

.logo small {
    font-size: 9px;
    color: var(--muted);
}

nav {
    display: flex;
    gap: 18px;
}

nav a {
    font-size: 12px;
    font-weight: 500;

    color: var(--muted);

    transition: 0.3s;
}

nav a:hover {
    color: var(--primary);
}

.dark-mode-btn {
    width: 38px;
    height: 38px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: transparent;

    cursor: pointer;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 700px;

    max-width: 1200px;
    margin: auto;

    padding: 80px 25px;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;

    align-items: center;

    gap: 60px;
}

.badge {
    display: inline-block;

    padding: 7px 14px;

    background: #e5f2ed;
    color: var(--primary);

    border-radius: 50px;

    font-size: 11px;
    font-weight: 700;

    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 70px);

    line-height: 1.12;

    max-width: 750px;

    margin-bottom: 25px;
}

.hero h1 span {
    color: var(--primary);
    display: block;
}

.hero p {
    max-width: 620px;

    color: var(--muted);

    font-size: 16px;

    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 12px;

    flex-wrap: wrap;
}

.btn {
    border: none;
    cursor: pointer;

    padding: 13px 22px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;

    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn.secondary {
    background: transparent;

    border: 1px solid var(--border);
}

.author {
    margin-top: 35px;

    display: flex;
    flex-direction: column;

    gap: 2px;

    font-size: 11px;

    color: var(--muted);
}

.author strong {
    color: var(--primary);
}


/* =========================
   HERO VISUAL
========================= */

.hero-visual {
    display: flex;
    justify-content: center;
}

.mosque-card {
    width: 330px;
    height: 370px;

    background: linear-gradient(
        145deg,
        #e7f2ed,
        #d5e8df
    );

    border-radius: 35px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    position: relative;

    box-shadow: var(--shadow);
}

.moon {
    font-size: 55px;

    color: var(--secondary);

    position: absolute;

    top: 40px;
    right: 55px;
}

.mosque {
    position: relative;

    width: 230px;
    height: 180px;

    margin-top: 40px;
}

.dome {
    position: absolute;

    width: 110px;
    height: 110px;

    border-radius: 110px 110px 0 0;

    background: var(--primary);

    left: 60px;
    top: 15px;
}

.building {
    position: absolute;

    bottom: 0;

    width: 230px;
    height: 110px;

    background: var(--primary);

    border-radius: 12px 12px 0 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;
}

.arch {
    width: 35px;
    height: 60px;

    border-radius: 25px 25px 0 0;

    background: #d8ebe3;
}

.minaret {
    position: absolute;

    width: 25px;
    height: 145px;

    background: var(--primary-dark);

    right: -15px;
    bottom: 0;

    border-radius: 8px 8px 0 0;
}

.mosque-card p {
    margin-top: 20px;

    font-weight: 600;

    color: var(--primary);
}


/* =========================
   SECTION
========================= */

.section {
    max-width: 1200px;

    margin: auto;

    padding: 100px 25px;
}

.alternate {
    max-width: none;

    background: #eef5f1;

    padding-left: calc((100% - 1150px) / 2);
    padding-right: calc((100% - 1150px) / 2);
}

.section-heading {
    display: flex;

    gap: 20px;

    margin-bottom: 55px;
}

.number {
    color: var(--secondary);

    font-size: 13px;

    font-weight: 700;
}

.label {
    color: var(--primary);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 45px);

    line-height: 1.2;

    margin: 8px 0 12px;
}

.section-heading p {
    color: var(--muted);

    max-width: 600px;

    font-size: 14px;
}


/* =========================
   INTRO
========================= */

.intro {
    max-width: 1200px;

    margin: auto;

    padding: 80px 25px;
}

.intro-text {
    max-width: 850px;

    font-size: 18px;

    color: var(--muted);

    margin-left: 55px;
}


/* =========================
   CARDS
========================= */

.cards {
    display: grid;

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

    gap: 18px;
}

.card {
    background: white;

    border: 1px solid var(--border);

    padding: 28px;

    border-radius: 18px;

    transition: 0.3s;
}

.card:hover {
    transform: translateY(-7px);

    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 28px;

    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 10px;

    font-size: 17px;
}

.card p {
    color: var(--muted);

    font-size: 13px;
}


/* =========================
   HIGHLIGHT
========================= */

.highlight {
    margin-top: 25px;

    padding: 25px;

    border-left: 4px solid var(--secondary);

    background: #f5f1e7;

    display: flex;

    gap: 18px;

    border-radius: 12px;
}

.highlight-icon {
    font-size: 25px;
}

.highlight h3 {
    font-size: 15px;

    margin-bottom: 5px;
}

.highlight p {
    color: var(--muted);

    font-size: 13px;
}


/* =========================
   TIMELINE
========================= */

.timeline {
    position: relative;

    max-width: 850px;

    margin: auto;
}

.timeline::before {
    content: "";

    position: absolute;

    left: 24px;
    top: 0;
    bottom: 0;

    width: 2px;

    background: #cbdcd5;
}

.timeline-item {
    display: flex;

    gap: 25px;

    position: relative;

    margin-bottom: 35px;
}

.timeline-dot {
    min-width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    font-weight: 700;

    z-index: 2;
}

.timeline-content {
    padding-top: 3px;
}

.timeline-content span {
    font-size: 10px;

    color: var(--secondary);

    font-weight: 700;
}

.timeline-content h3 {
    margin: 4px 0 7px;

    font-size: 19px;
}

.timeline-content p {
    color: var(--muted);

    font-size: 13px;
}


/* =========================
   TARBIYAH
========================= */

.tarbiyah-grid {
    display: grid;

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

    gap: 18px;
}

.tarbiyah-card {
    position: relative;

    text-align: left;

    border: 1px solid var(--border);

    background: white;

    padding: 30px;

    border-radius: 20px;

    cursor: pointer;

    transition: 0.3s;
}

.tarbiyah-card:hover {
    transform: translateY(-7px);

    border-color: var(--primary);

    box-shadow: var(--shadow);
}

.tarbiyah-number {
    position: absolute;

    top: 18px;
    right: 20px;

    font-size: 11px;

    color: var(--secondary);

    font-weight: 700;
}

.tarbiyah-icon {
    font-size: 30px;

    margin-bottom: 20px;
}

.tarbiyah-card h3 {
    margin-bottom: 8px;
}

.tarbiyah-card p {
    color: var(--muted);

    font-size: 13px;

    margin-bottom: 20px;
}

.read-more {
    font-size: 11px;

    color: var(--primary);

    font-weight: 700;
}


/* =========================
   MODAL
========================= */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.55);

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 2000;

    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-box {
    width: min(600px, 100%);

    background: white;

    padding: 40px;

    border-radius: 25px;

    position: relative;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);

    animation: modalIn 0.3s ease;
}

@keyframes modalIn {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.close-modal {
    position: absolute;

    right: 20px;
    top: 15px;

    border: none;

    background: transparent;

    font-size: 28px;

    cursor: pointer;
}

.modal-icon {
    font-size: 35px;

    margin-bottom: 10px;
}

.modal-box h2 {
    margin-bottom: 15px;

    color: var(--primary);
}

.modal-box p {
    color: var(--muted);

    font-size: 14px;
}

.dalil-box {
    margin-top: 25px;

    padding: 18px;

    background: #eef5f1;

    border-radius: 12px;
}

.dalil-box strong {
    font-size: 13px;
}

.dalil-box p {
    margin-top: 5px;

    font-size: 12px;
}


/* =========================
   AYAT
========================= */

.ayat-section {
    max-width: none;

    background: #10251d;

    color: white;

    padding-left: calc((100% - 1150px) / 2);
    padding-right: calc((100% - 1150px) / 2);
}

.ayat-section .section-heading p {
    color: #b7c8c0;
}

.ayat-card {
    max-width: 950px;

    margin: auto;

    padding: 45px;

    border: 1px solid rgba(255,255,255,0.1);

    background: rgba(255,255,255,0.04);

    border-radius: 25px;
}

.arabic {
    font-family: "Amiri", serif;

    font-size: 28px;

    line-height: 2.2;

    text-align: right;

    margin-bottom: 35px;
}

.translation {
    border-top: 1px solid rgba(255,255,255,0.1);

    padding-top: 25px;
}

.translation span {
    color: var(--secondary);

    font-size: 11px;

    font-weight: 700;
}

.translation p {
    margin: 10px 0;

    color: #d7e1dc;

    font-size: 14px;
}

.translation small {
    color: var(--secondary);
}

.ayat-message {
    margin-top: 30px;

    padding: 20px;

    background: rgba(255,255,255,0.06);

    border-radius: 12px;
}

.ayat-message strong {
    color: var(--secondary);

    font-size: 13px;
}

.ayat-message p {
    margin-top: 5px;

    color: #c9d5d0;

    font-size: 13px;
}


/* =========================
   IBRAH
========================= */

.ibrah-flow {
    display: grid;

    grid-template-columns: 1fr auto 1fr auto 1fr;

    align-items: center;

    gap: 20px;
}

.ibrah-item {
    text-align: center;

    padding: 35px 20px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 20px;
}

.ibrah-icon {
    font-size: 32px;

    margin-bottom: 10px;
}

.ibrah-item > span {
    font-size: 10px;

    color: var(--secondary);

    font-weight: 700;
}

.ibrah-item h3 {
    color: var(--primary);

    font-size: 25px;

    margin: 5px 0;
}

.ibrah-item p {
    color: var(--muted);

    font-size: 12px;
}

.arrow {
    color: var(--secondary);

    font-size: 25px;
}

.student-card {
    margin-top: 30px;

    padding: 30px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 20px;
}

.student-card h3 {
    margin-bottom: 15px;
}

.student-card ul {
    padding-left: 20px;

    color: var(--muted);

    font-size: 13px;
}

.student-card li {
    margin-bottom: 7px;
}


/* =========================
   QUIZ
========================= */

.quiz-section {
    background: #f0f6f3;

    max-width: none;

    padding-left: calc((100% - 1150px) / 2);
    padding-right: calc((100% - 1150px) / 2);
}

.quiz-container {
    max-width: 850px;

    margin: auto;

    background: white;

    padding: 35px;

    border-radius: 25px;

    box-shadow: var(--shadow);
}

.quiz-top {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;

    font-size: 12px;

    color: var(--muted);
}

#scorePreview {
    color: var(--primary);
}

.progress-container {
    height: 7px;

    background: #e8eeeb;

    border-radius: 10px;

    overflow: hidden;

    margin-bottom: 35px;
}

#quizProgress {
    width: 10%;

    height: 100%;

    background: var(--primary);

    transition: 0.3s;
}

.question-box {
    background: #f3f7f5;

    padding: 30px;

    border-radius: 18px;

    margin-bottom: 20px;
}

.question-label {
    font-size: 10px;

    letter-spacing: 2px;

    color: var(--secondary);

    font-weight: 700;
}

.question-box h3 {
    margin-top: 8px;

    font-size: 19px;

    line-height: 1.6;
}

.answer-container {
    display: grid;

    gap: 10px;
}

.quiz-answer {
    width: 100%;

    padding: 16px 18px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 12px;

    text-align: left;

    cursor: pointer;

    font-size: 13px;

    transition: 0.2s;
}

.quiz-answer:hover {
    border-color: var(--primary);

    background: #f2f8f5;
}

.quiz-answer.selected {
    background: var(--primary);

    border-color: var(--primary);

    color: white;
}

.next-button {
    margin-top: 20px;

    width: 100%;

    border: none;

    padding: 15px;

    border-radius: 12px;

    background: var(--primary);

    color: white;

    font-weight: 600;

    cursor: pointer;

    transition: 0.3s;
}

.next-button:hover {
    background: var(--primary-dark);
}

.hidden {
    display: none !important;
}


/* =========================
   RESULT
========================= */

.quiz-result-page {
    text-align: center;

    padding: 20px;
}

.result-icon {
    font-size: 50px;
}

.quiz-result-page h2 {
    margin-top: 10px;
}

.quiz-result-page > p {
    color: var(--muted);

    font-size: 13px;
}

.score-circle {
    width: 150px;
    height: 150px;

    border-radius: 50%;

    border: 10px solid #dcebe5;

    margin: 30px auto;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.score-circle strong {
    color: var(--primary);

    font-size: 42px;

    line-height: 1;
}

.score-circle span {
    color: var(--muted);

    font-size: 12px;
}

#resultMessage {
    color: var(--primary);

    margin-bottom: 25px;
}

.result-stats {
    display: flex;

    justify-content: center;

    gap: 15px;
}

.result-stat {
    min-width: 110px;

    padding: 15px;

    border-radius: 12px;

    background: #f2f6f4;
}

.result-stat strong {
    display: block;

    font-size: 24px;

    color: var(--primary);
}

.result-stat span {
    font-size: 11px;

    color: var(--muted);
}

.result-buttons {
    margin-top: 25px;

    display: flex;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;
}


/* =========================
   REVIEW
========================= */

.review-page {
    padding-top: 10px;
}

.review-header {
    margin-bottom: 25px;
}

.review-header h2 {
    margin-bottom: 5px;
}

.review-header p {
    color: var(--muted);

    font-size: 13px;
}

.review-item {
    padding: 22px;

    background: #f5f8f6;

    border-radius: 15px;

    margin-bottom: 15px;
}

.review-question {
    font-weight: 600;

    font-size: 14px;

    margin-bottom: 12px;
}

.review-answer {
    padding: 10px 13px;

    border-radius: 8px;

    font-size: 12px;

    margin-bottom: 7px;
}

.correct-answer {
    background: #e1f3e9;

    color: #146b50;
}

.wrong-answer {
    background: #fae6e6;

    color: #a52f2f;
}

.review-explanation {
    margin-top: 15px;

    padding-top: 15px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 12px;
}

.review-page > button {
    margin-top: 20px;
}


/* =========================
   SOURCES
========================= */

.source-list {
    display: grid;

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

    gap: 15px;
}

.source-item {
    background: white;

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 22px;

    display: flex;

    gap: 15px;
}

.source-item > span {
    color: var(--secondary);

    font-weight: 700;
}

.source-item strong {
    font-size: 14px;
}

.source-item p {
    color: var(--muted);

    font-size: 12px;

    margin-top: 3px;
}


/* =========================
   FOOTER
========================= */

footer {
    background: #0c1814;

    color: white;

    padding: 50px 25px 25px;
}

.footer-content {
    max-width: 1150px;

    margin: auto;

    display: flex;

    justify-content: space-between;

    gap: 20px;
}

.footer-content h2 {
    color: white;

    margin-bottom: 5px;
}

.footer-content p {
    color: #9eafa7;

    font-size: 12px;
}

.footer-author {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    font-size: 11px;

    color: #9eafa7;
}

.footer-author strong {
    color: var(--secondary);
}

.footer-bottom {
    max-width: 1150px;

    margin: 35px auto 0;

    padding-top: 20px;

    border-top: 1px solid rgba(255,255,255,0.1);

    color: #74847d;

    font-size: 10px;

    text-align: center;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;

        text-align: center;

        padding-top: 60px;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .author {
        align-items: center;
    }

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

    .ibrah-flow {
        grid-template-columns: 1fr;

        max-width: 500px;

        margin: auto;
    }

    .arrow {
        transform: rotate(90deg);

        text-align: center;
    }

}


@media (max-width: 650px) {

    .section,
    .intro {
        padding: 70px 18px;
    }

    .alternate,
    .ayat-section,
    .quiz-section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero {
        padding: 60px 18px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .mosque-card {
        width: 290px;
    }

    .section-heading {
        gap: 12px;
    }

    .intro-text {
        margin-left: 0;
    }

    .cards,
    .tarbiyah-grid,
    .source-list {
        grid-template-columns: 1fr;
    }

    .ayat-card,
    .quiz-container {
        padding: 22px;
    }

    .arabic {
        font-size: 23px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-author {
        align-items: flex-start;
    }

}