/*
Theme Name: cjhomebase theme
Author: cjhomebase
Description: Tema kustom untuk cjhomebase, dibina untuk menyokong plugin kehadiran.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/g2.html
Tags: custom-theme
*/

/* NOTA: CSS untuk plugin (Tailwind, FullCalendar) 
dimuatkan secara automatik oleh plugin V3.3. 
Awak boleh letak CSS khas untuk tema di sini.
*/

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* Ini akan membetulkan isu container yang kita bincang */
/* Kita benarkan 'main' membesar, tetapi hadkan kandungan artikel biasa */
.content-area {
    width: 100%;
}

/* Stail Asas untuk Header dan Footer */
.site-header {
    background-color: #ffffff;
    padding: 20px 40px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title a {
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    color: #1056a0; /* Guna warna biru plugin */
    white-space: nowrap; /* (BARU) Pastikan tajuk tidak terpisah */
}

.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 15px;
}

.main-navigation li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #333;
    color: #aaa;
}

/* --- (BARU V1.1) Stail Menu Mudah Alih --- */

.mobile-menu-toggle {
    display: none; /* Tersembunyi pada desktop */
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Media Query untuk skrin mudah alih (cth: 768px ke bawah) */
@media (max-width: 768px) {
    .site-header {
        padding: 20px; /* Kurangkan padding pada mudah alih */
    }
    
    .main-navigation {
        display: none; /* Sembunyikan menu desktop */
        width: 100%;
        position: absolute;
        top: 81px; /* Ketinggian header anda (anggaran) */
        left: 0;
        background-color: #ffffff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .main-navigation ul {
        display: block; /* Susun menu secara menegak */
        flex-direction: column;
        padding: 10px 0;
    }

    .main-navigation li {
        text-align: center;
    }

    .main-navigation li a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-menu-toggle {
        display: block; /* Paparkan butang hamburger */
    }
    
    /* Apabila menu dibuka (ditambah oleh JS) */
    .main-navigation.is-open {
        display: block;
    }
    
    /* Animasi ikon 'X' */
    .mobile-menu-toggle.is-open .icon-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-toggle.is-open .icon-bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.is-open .icon-bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}