/* =================================
   GAYA INDUK UNTUK HALAMAN ISU
   (Tema Sekolah - Final, Semua Interaksi)
   ================================= */

/* 1. Import Fon Sekolah */
@import url('https://fonts.googleapis.com/css2?family=Gochi+Hand&family=Patrick+Hand&display=swap');

/* Gaya Asas */
body {
    font-family: 'Patrick Hand', sans-serif;
    background-color: #fdfaf4;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    font-size: 1.3rem;
}

/* Navigasi */
.nav-quick-access {
    background-color: #37474f; padding: 0.5rem 1rem; display: flex;
    justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.nav-quick-access a {
    font-family: 'Patrick Hand', sans-serif; font-size: 1.2rem; color: white;
    text-decoration: none; font-weight: 400; padding: 1rem 1rem;
    display: inline-block; transition: background-color 0.3s;
}
.nav-quick-access a:hover { background-color: #546e7a; }
.nav-quick-access a.active { background-color: #00796b; color: white; }
.nav-quick-access a.home-link {
    background-color: #004d40; border-radius: 5px; margin-right: 10px; flex-shrink: 0;
}

/* Butang Hamburger */
.nav-toggle { display: none; background: transparent; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger { display: block; position: relative; width: 25px; height: 3px; background: white; border-radius: 3px; transition: all 0.3s; }
.hamburger::before,
.hamburger::after { content: ''; position: absolute; width: 100%; height: 100%; background: white; border-radius: 3px; transition: all 0.3s; }
.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }

/* Kandungan Umum */
.content-section { padding: 4rem 2rem; max-width: 900px; margin: 0 auto; }
.content-section h2 {
    font-family: 'Gochi Hand', sans-serif; font-size: 3.2rem; color: var(--color-teks-tajuk);
    margin-top: 0; border-bottom: 3px solid var(--color-teks-tajuk);
    padding-bottom: 10px; margin-bottom: 2.5rem;
}

/* Footer "Meja Kayu" */
footer {
    font-family: 'Patrick Hand', sans-serif; margin-top: -1px; padding: 2rem;
    font-size: 1.1rem; background-color: #8B4513;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05)),
                      linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05));
    background-size: 30px 30px; color: #f0eada;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4); border-top: 5px solid #5D4037;
    text-align: center;
}

/* =================================
   GAYA KAD TOPIK (Putih, Border Atas)
   ================================= */
.topic-card {
    background-color: #ffffff; border-radius: 10px; padding: 1.5rem 2rem;
    margin-bottom: 2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-top: 6px solid var(--color-teks-tajuk);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
/* Efek Hover hanya untuk kartu non-interaktif */
.topic-card:not(.interactive-card):not(.modal-trigger):hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Tajuk H3 dalam Kad Topik (Ada Pensel) */
/* Pastikan tidak berlaku pada header interaktif atau trigger modal */
.topic-card h3:not(.card-header) {
    font-family: 'Gochi Hand', sans-serif; font-size: 2rem; color: #111;
    margin-top: 0; margin-bottom: 1rem; position: relative; padding-left: 45px;
}
.topic-card h3:not(.card-header)::before {
    content: '✏️'; position: absolute; left: 0; top: 5px;
    font-size: 1.5rem; transform: rotate(-15deg);
}

/* Senarai UL dalam Kad Topik */
.topic-card ul { list-style-type: none; padding-left: 0; margin-top: 0; margin-bottom: 0; }
.topic-card li { position: relative; margin-bottom: 10px; }

/* Gaya Kad Topik Dengan Gambar */
.topic-card-with-image { display: flex; align-items: center; gap: 1.5rem; }
.topic-card-with-image .topic-content { flex: 1 1 65%; }
.topic-card-with-image .topic-image-container { flex: 0 0 30%; text-align: center; }
.topic-card-with-image .topic-image { max-width: 100%; height: auto; max-height: 150px; display: block; margin: 0 auto; }
@media (max-width: 600px) {
    .topic-card-with-image { flex-direction: column; text-align: center; }
    .topic-card-with-image .topic-content { flex-basis: auto; margin-bottom: 1rem; }
    .topic-card-with-image .topic-image-container { flex-basis: auto; }
    .topic-card-with-image .topic-content h3 { padding-left: 0; display: inline-block; position: relative; }
     .topic-card-with-image .topic-content h3::before { position: absolute; left: -35px; top: 5px; }
     .topic-card-with-image .topic-content ul { text-align: left; display: inline-block; }
}

/* =================================
   GAYA NOTA LEKAT (Kuning, Senget)
   ================================= */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 2.5rem 0; }
.info-box {
    background-color: #fff9c4; border-radius: 4px; padding: 1.5rem; border-left: none;
    box-shadow: 3px 3px 7px rgba(0,0,0,0.15); transition: transform 0.3s, box-shadow 0.3s;
    transform: rotate(-2deg); position: relative;
}
.info-box::before { /* Selotip */
    content: ''; position: absolute; top: -15px; left: 50%;
    transform: translateX(-50%) rotate(-2deg); width: 100px; height: 30px;
    background-color: rgba(255, 255, 0, 0.3); border-left: 2px dashed rgba(0,0,0,0.1);
    border-right: 2px dashed rgba(0,0,0,0.1); opacity: 0.5;
}
.info-box:hover { transform: rotate(1deg) scale(1.05); box-shadow: 5px 5px 15px rgba(0,0,0,0.2); z-index: 10; }
.info-box h4 { /* Tajuk H4 dalam Nota Lekat */
    font-family: 'Gochi Hand', sans-serif; margin-top: 0; font-size: 1.7rem;
    color: var(--color-teks-tajuk); padding-left: 0; margin-bottom: 1rem;
}
.info-box h4::before { display: none; }
.info-box ul { list-style-type: none; padding-left: 0; margin-top: 0; margin-bottom: 0; }
.info-box li { position: relative; margin-bottom: 10px; }


/* =================================
   KODE IKON
   ================================= */

/* Hapus ikon default dari SEMUA li */
.content-section li::before {
    content: none;
}

/* Terapkan ikon HANYA pada li di dalam kelas list-* */
[class*="list-"] li {
    padding-left: 35px; /* Ruang standard untuk ikon */
    position: relative; /* Diperlukan oleh ::before */
    margin-bottom: 10px;
}
[class*="list-"] li::before {
    content: ''; /* Default kosong, akan di-override di bawah */
    position: absolute;
    left: 0;
    top: 0;
}

/* Ikon ❓ */
.list-soal li { font-size: 1.5rem; }
.list-soal li::before {
    content: '❓';
    font-size: 1.1rem;
}

/* Ikon 📎 (Klip Kertas) */
.info-box .list-chevron { text-align: left; padding-left: 0; }
.info-box .list-chevron li {
    padding-left: 30px;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.info-box .list-chevron li::before {
    content: '📎';
    font-size: 1.2rem;
    color: #555;
    transform: rotate(45deg);
    top: 2px;
}

/* Ikon 👀 */
.list-contoh li { font-size: 1.5rem; }
.list-contoh li::before {
    content: '👀';
    font-size: 1.1rem;
}


/* === GAYA VIDEO YOUTUBE === */
.video-container { margin-top: 3rem; margin-bottom: 2.5rem; text-align: center; }
.video-container h3 { padding-left: 0; margin-bottom: 1.5rem; }
.video-container h3::before { display: none; }
.video-wrapper {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    max-width: 100%; background: #000; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* === GAYA KESIMPULAN (Nota Lekat Hijau) === */
.tindakan-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 2.5rem 0; text-align: left; }
.tindakan {
    display: block; background-color: #c8e6c9; border-radius: 4px; padding: 2rem 1.5rem;
    font-size: 1.4rem; font-weight: 400; color: #333; border-left: none;
    box-shadow: 3px 3px 7px rgba(0,0,0,0.15); transition: transform 0.3s, box-shadow 0.3s;
    transform: rotate(1deg); position: relative;
}
.tindakan::before { /* Selotip */
    content: ''; position: absolute; top: -15px; left: 50%;
    transform: translateX(-50%) rotate(1deg); width: 100px; height: 30px;
    background-color: rgba(255, 255, 0, 0.3); border-left: 2px dashed rgba(0,0,0,0.1);
    border-right: 2px dashed rgba(0,0,0,0.1); opacity: 0.5;
}
.tindakan:hover { transform: rotate(-1deg) scale(1.05); box-shadow: 5px 5px 15px rgba(0,0,0,0.2); z-index: 10; }
.punchline {
    margin-top: 2.5rem; font-size: 1.5rem; font-weight: 400; color: #004d40;
    background-color: #e8f5e9; padding: 1.5rem; border-radius: 10px;
    border-left: 5px solid #004d40; text-align: center;
}
@media (min-width: 900px) { .tindakan-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* === GAYA KARTU ACCORDION (EXPAND/COLLAPSE) === */
.interactive-card .card-header { cursor: pointer; position: relative; user-select: none; }
.interactive-card .card-header::after {
    content: '+'; position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%); font-family: monospace; font-size: 2rem; font-weight: bold;
    color: var(--color-teks-tajuk); transition: transform 0.3s ease-out;
}
.interactive-card .card-content {
    max-height: 0; overflow: hidden;
    transition: max-height 0.5s ease-out, padding-top 0.5s ease-out, margin-top 0.5s ease-out;
    padding-top: 0; margin-top: 0;
}
.interactive-card.card-expanded .card-content {
    max-height: 500px; padding-top: 1rem; margin-top: 1rem; border-top: 1px dashed #ccc;
}
.interactive-card.card-expanded .card-header::after { content: '−'; transform: translateY(-50%) rotate(180deg); }
.interactive-card:hover { transform: none; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }


/* === GAYA FLIP CARD WALL === */
.mission-section {
    background-color: #ffffff; border-radius: 10px; padding: 1.5rem 2rem;
    margin-bottom: 2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-top: 6px solid var(--color-teks-tajuk);
}
.mission-section h3 {
    font-family: 'Gochi Hand', sans-serif; font-size: 2rem; color: #111;
    margin-top: 0; margin-bottom: 2rem; position: relative; padding-left: 45px;
}
.mission-section h3::before {
    content: '✏️'; position: absolute; left: 0; top: 5px; font-size: 1.5rem; transform: rotate(-15deg);
}
.flip-card-wall {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; padding: 1rem 0;
}
.flip-card-container {
    width: calc(50% - 1rem); min-width: 220px; height: 200px;
    perspective: 1000px; cursor: pointer;
}
.flip-card { /* Inner container */
    width: 100%; height: 100%; position: relative;
    transition: transform 0.6s; transform-style: preserve-3d;
    transform: rotate(0deg); /* Default */
}
/* Random rotation/scale on INNER card */
.flip-card-container:nth-child(4n+1) .flip-card { transform: rotate(-2deg); }
.flip-card-container:nth-child(4n+2) .flip-card { transform: rotate(1deg); }
.flip-card-container:nth-child(4n+3) .flip-card { transform: rotate(2.5deg); }
.flip-card-container:nth-child(4n+4) .flip-card { transform: rotate(-1.5deg); }

.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 8px; padding: 1.5rem; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.flip-card-front {
    background-color: #e0f2f7; color: #333; font-family: 'Gochi Hand', sans-serif; font-size: 1.5rem;
    align-items: flex-start; justify-content: center; text-align: left;
    flex-direction: row; align-items: center; padding: 1.5rem;
}
.mission-section .flip-card-front .card-text::before {
    content: '✅'; display: inline-block; margin-right: 10px; font-size: 1.2rem; vertical-align: middle;
}
.flip-card-front .card-text { display: inline-block; vertical-align: middle; flex-grow: 1; }
.flip-card-back {
    background-color: #fff9c4; color: #555; transform: rotateY(180deg);
    font-size: 1.2rem; line-height: 1.5; justify-content: center; align-items: center; text-align: center;
}
/* Flipped state (Gabungkan flip dan rotasi awal) */
.flip-card-container.flipped .flip-card { transform: rotateY(180deg); }
.flip-card-container:nth-child(4n+1).flipped .flip-card { transform: rotateY(180deg) rotate(-2deg); }
.flip-card-container:nth-child(4n+2).flipped .flip-card { transform: rotateY(180deg) rotate(1deg); }
.flip-card-container:nth-child(4n+3).flipped .flip-card { transform: rotateY(180deg) rotate(2.5deg); }
.flip-card-container:nth-child(4n+4).flipped .flip-card { transform: rotateY(180deg) rotate(-1.5deg); }

@media (max-width: 600px) {
    .flip-card-container { width: 80%; height: 180px; }
    .flip-card-front { font-size: 1.3rem; }
    .mission-section .flip-card-front .card-text::before { font-size: 1.1rem; margin-right: 8px;}
    .flip-card-back { font-size: 1.1rem; }
}


/* === GAYA MODAL POP-UP === */
.modal-trigger { cursor: pointer; }
.modal-trigger:hover { transform: translateY(-6px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.modal-trigger h3 { /* Gaya khusus untuk judul trigger modal */
    font-family: 'Gochi Hand', sans-serif; font-size: 2rem; color: #111;
    margin-top: 0; margin-bottom: 0; /* Hapus margin bawah default */
    position: relative; padding-left: 45px;
}
.modal-trigger h3::before { /* Ikon pensel tetap ada */
    content: '✏️'; position: absolute; left: 0; top: 5px;
    font-size: 1.5rem; transform: rotate(-15deg);
}
.modal-trigger h3 .open-prompt { font-family: 'Patrick Hand', sans-serif; font-size: 1rem; color: #777; margin-left: 10px; font-style: italic; }
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease-out;
}
.modal-overlay.visible { opacity: 1; }
.modal-content {
    background-color: #ffffff; padding: 2.5rem 3rem; border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); max-width: 600px; width: 90%;
    position: relative; transform: scale(0.9); transition: transform 0.3s ease-out;
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    font-size: 2.5rem; font-weight: bold; color: #aaa; cursor: pointer; padding: 0; line-height: 1; transition: color 0.2s;
}
.modal-close:hover { color: #333; }
.modal-content h3 { /* Gaya judul di dalam modal */
    font-family: 'Gochi Hand', sans-serif; font-size: 2.2rem; color: var(--color-teks-tajuk);
    margin-top: 0; margin-bottom: 1.5rem; padding-left: 0; text-align: center;
}
.modal-content h3::before { display: none; } /* Sembunyikan pensel di modal */
.modal-content ul { list-style-type: none; padding-left: 0; margin-top: 0; margin-bottom: 0; }
.modal-content .list-soal li { font-size: 1.4rem; padding-left: 35px; margin-bottom: 12px; }
.modal-content .list-soal li::before { content: '❓'; position: absolute; left: 0; top: 0; font-size: 1.1rem; }


/* === RESPONSIVE (Nota Lekat) === */
@media (min-width: 768px) { .info-grid { grid-template-columns: 1fr 1fr; } }


/* === GAYA MESRA MUDAH ALIH (MOBILE) === */
@media (max-width: 800px) {
    .nav-links {
        display: none; position: fixed; top: 0; left: 0; right: 0; height: 100vh;
        background-color: #37474f; flex-direction: column; justify-content: center;
        align-items: center; transform: translateX(100%); transition: transform 0.3s ease-out;
    }
    .nav-links a { font-size: 1.7rem; padding: 1.5rem 0; width: 80%; text-align: center; }
    .nav-toggle { display: block; z-index: 1001; }
    .nav-active .nav-links { display: flex; transform: translateX(0); }
    .nav-active .hamburger { background: transparent; transform: rotate(180deg); }
    .nav-active .hamburger::before { transform: translateY(0) rotate(45deg); }
    .nav-active .hamburger::after { transform: translateY(0) rotate(-45deg); }

    /* Modal responsive */
    .modal-content { padding: 2rem 1.5rem; }
    .modal-content h3 { font-size: 2rem; }
     .modal-content .list-soal li { font-size: 1.3rem; }
}