/* direktori.css */

/* RESET ASAS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f9;
  color: #333;
  padding: 20px;
}

h2 {
  text-align: left;
  color: #003366;
  margin-bottom: 30px;
  font-size: 28px;
}

form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

input[type="text"], select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

button {
  padding: 10px 20px;
  background-color: #003366;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #8bb9e7;
}

/* PAUTAN BAHAGIAN SEBAGAI KAD */
a {
  text-decoration: none;
}

.card-title {
  background-color: #006699;
  color: white;
  margin: 15px auto;
  padding: 15px;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  color: white; /* Example: If your links should remain white */
}

.card-title:hover {
  background-color: #004466;
  transform: translateY(-3px);
}

/* MOBILE RESPONSIVE */
@media (max-width: 600px) {
  .card-title {
    font-size: 16px;
    padding: 12px;
  }

  form {
    flex-direction: column;
    gap: 15px;
  }
}
 
/* Tajuk Bahagian */
h2 {
  font-size: 24px;
  color: #003366;
  margin-bottom: 20px;
  text-align: left;
}

/* Alamat & Phone */
.notice {
  display: inline-block;           /* pastikan hanya satu baris (tidak full-width block) */
  background-color: #ffeb3b;       /* warna kuning cerah, boleh ditukar */
  font-weight: bold;
  font-style: italic;
  padding: 4px 8px;
  border-radius: 4px;      
}

.notice-full {
  display: block;
  background-color: #ffc107;
  color: #000;
  font-weight: bold;
  font-style: italic;
  padding: 8px;
}

.address {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line; /* kekalkan pecahan baris */
}

/* Senarai Seksysen */
ul {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto 30px;
}

ul li {
  margin: 8px 0;
}

ul li a {
  display: block;
  background-color: #e0f2ff;
  color: #003366;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
} 

ul li a:hover {
  background-color: #cce8ff;
}

/* ini menu 2nd choice
ul li a.seksyen {
  background-color: #e0f2ff;
  color: #003366;
  font-weight: 600;
}

ul li a.unit {
  background-color: #f0fbff;
  color: #0386a7;
  margin-left: 20px;
  font-weight: 500;
} */

/* ini menu 1st choice
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submenu {
  display: none;
  padding-left: 20px;
}

li.has-submenu.active .submenu {
  display: block;
}

.toggle-submenu {
  cursor: pointer;
  font-size: 14px;
  padding: 0 8px;
  color: #0077aa;
} */

.sidebar ul {
  list-style-type: none;
  padding: 0;
}

.sidebar ul li a {
  display: block;
  background-color: #e0f2ff;
  color: #003366;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 5px;
}

.sidebar ul li a:hover {
  background-color: #cce9ff;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-submenu {
  cursor: pointer;
  /*font-size: 14px;*/
  font-size: 1.6em; /* Boleh ubah ke 1.5em, 2em ikut saiz yang diingini */
  color: #0077aa;
  padding-right: 10px;
  margin-left: 5px; /* Jarak dari teks jika perlu */
  vertical-align: middle; /* Biar nampak sejajar */
}

.submenu {
  display: none;
  padding-left: 20px;
}

.has-submenu.active .submenu {
  display: block;
}

/*sub-menu tibi kusta*/
.toggle-submenu i {
  font-size: 0.8em;
  color: #004466;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

/* Rotate ikon bila parent aktif */
.has-submenu.active .toggle-submenu i {
  transform: rotate(180deg);
}


/* Gaya untuk seksyen */
a.seksyen-link {
  background-color: #e0f2ff;
  color: #044656;
  font-weight: 600;
}

/* Unit (warna lain & indent) */
a.unit-link {
 background-color: #fef7e0 !important;   /* kuning lembut */
/*background-color: transparent !important; */
 /* color: #7c5800 !important;              coklat gelap */
  color: #333 !important;
  padding-left: 32px !important;         /* lebih ke dalam */
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}

a.unit-link:hover {
  background-color: #d0f0ff !important;
  color: #004d60 !important;
}

/* Buat layout flex */
.container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar (dalam sidemenu.php MESTI ada class="sidebar") */
.sidebar {
  width: 250px;
  background-color: #f8f9fa;
  padding: 15px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Kandungan utama */
.content {
  flex-grow: 1;
  padding: 30px;
  background: #fff;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Untuk pastikan content tak tertolak bawah sidebar */
.content h2 {
  margin-top: 0;
}

ul li a.seksyen-link {
  display: block;
  background-color: #e0f2ff;
  color: #003366;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

ul li a.unit-link {
  display: block;
  background-color: #f0fbff;
  color: #044656;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  margin-left: 10px;
}



/* Jadual Pegawai */
table {
  width: 95%;
  margin: 0 auto 50px;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 14px;
}

table th, table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

table th {
  background-color: #003366;
  color: #fff;
}

table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table tr:hover {
  background-color: #eef6ff;
}

/* Responsive (pilihan) */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  table tr {
    margin-bottom: 15px;
  }

  table td {
    padding-left: 50%;
    position: relative;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: bold;
    color: #003366;
  }

  table th {
    display: none;
  }
}

/* print.css - maklumat cetakan */
.print-info {
  text-align: right;
  margin-bottom: 20px;
  font-size: 12pt;
}

.print-info p {
  margin: 2px 0;
}

/* print.css */
.print-only {
  display: block !important;
}

/* direktori.css (paparan biasa) */
.print-only {
  display: none;
}

/* Layout utama */
.layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Sidebar di kiri */
.sidebar {
  width: 220px;
  background-color: #eaf2f8;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin-bottom: 10px;
}

.sidebar ul li a {
  display: block;
  padding: 10px;
  background-color: #003366;
  color: #f7f9fc;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.sidebar ul li a:hover {
  background-color: #0990eb;
  color: #020b19;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s;
} 

/* Kandungan kanan */
.content {
  flex-grow: 1;
}

/* Responsif: sidebar ke atas */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}

header {
    display: flex; /* Use flexbox for easy alignment of logo and title */
    align-items: center; /* Vertically align items in the header */
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center content horizontally, or adjust as needed */
    padding: 10px 20px; /* Add some padding around the header */
    background-color: #003366; /* Example background color for the header */
    border-bottom: 1px solid #ccc; /* Example border */
}

.header-logo {
    max-width: 400px; /* Set a maximum width for your logo */
    height: auto; /* Maintain aspect ratio */
    margin-right: 20px; /* Add space between the logo and the title */
}

h3 {
    margin: 0; /* Remove default margin from h3 to align it better */
    color: #f3f0f0; /* Example text color for the title */
}

.header-title {
    font-size: 2em; /* Adjust this value as needed */
    /* You can also add other styles like: */
    font-weight: bold;
    color: #f3f0f0; /* Example color */
    margin-top: 10px; /* Adjust spacing from the image */
}

.no-records {
            text-align: center;
            color: #777;
            margin-top: 30px;
            font-size: 1.1em;
            padding: 15px;
            background-color: #fff3cd;
            border: 1px solid #ffeeba;
            border-radius: 8px;
        }

.ketua td {
    font-weight:700 !important;
}
