/* CSS RESET & MODERN DESIGN SYSTEM FOR SMKN 1 RAWAJITU SELATAN */
:root {
  --primary-color: #0f4c81;
  --primary-dark: #0a3357;
  --secondary-color: #00a896;
  --accent-color: #f4a261;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --radius: 8px;
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* HEADER & NAVBAR */
.top-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.top-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: block;
}

.main-header {
  background: #ffffff;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: table;
  width: 100%;
}

.brand-section {
  display: table-cell;
  vertical-align: middle;
  width: 35%;
}

.brand-link {
  display: inline-block;
  vertical-align: middle;
}

.logo-img {
  height: 48px;
  width: auto;
  vertical-align: middle;
  margin-right: 10px;
}

.brand-text {
  display: inline-block;
  vertical-align: middle;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.menu-toggle {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  float: right;
  margin-top: 4px;
}

.nav-menu-cell {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
  width: 65%;
}

.nav-list {
  list-style: none;
  display: inline-block;
}

.nav-item {
  display: inline-block;
  margin-left: 14px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* BANNER CARD / PAGE TITLE */
.banner-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: white;
  padding: 32px 16px;
  margin-bottom: 24px;
  border-bottom: 4px solid var(--accent-color);
}

.banner-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.banner-card h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.banner-card p {
  font-size: 1rem;
  opacity: 0.9;
}

/* MAIN CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto 32px auto;
  padding: 0 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-color);
}

/* GRID LAYOUT VIA TABLE FOR WEASY/STANDARD HTML COMPAT */
.row {
  width: 100%;
  margin-bottom: 20px;
}

.col-4 {
  display: inline-block;
  width: 31%;
  vertical-align: top;
  margin-right: 2%;
}

.col-4:last-child {
  margin-right: 0;
}

.col-6 {
  display: inline-block;
  width: 48%;
  vertical-align: top;
  margin-right: 3%;
}

.col-6:last-child {
  margin-right: 0;
}

/* TABLES & RESPONSIVE CARDS */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.data-table th, .data-table td {
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background-color: var(--primary-color);
  color: white;
}

.data-table tr:nth-child(even) {
  background-color: #f1f5f9;
}

/* STATS GRID */
.stat-box {
  background: #e0f2fe;
  border-left: 4px solid var(--primary-color);
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--primary-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ARTICLES / NEWS */
.news-item {
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

.news-item:last-child {
  border-bottom: none;
}

.news-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.news-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--text-main);
}

.img-responsive {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 12px 0;

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

/* RANDOM LINKS CLASS */
.random-links {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 20px 16px;
  margin-top: 30px;
  border-radius: var(--radius);
}

.random-links h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.random-links ul {
  list-style: none;
  padding: 0;
}

.random-links li {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 8px;
}

.random-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.random-links a:hover {
  color: var(--primary-color);
}

/* FOOTER */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 24px 16px;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 20px;
}

/* MOBILE MEDIA QUERIES */
@media screen and (max-width: 768px) {
  .brand-section {
    width: 80%;
  }
  .menu-toggle {
    display: block;
  }
  .nav-menu-cell {
    display: none;
    width: 100%;
    text-align: left;
    margin-top: 10px;
  }
  .nav-menu-cell.active {
    display: block;
  }
  .nav-list {
    display: block;
    width: 100%;
  }
  .nav-item {
    display: block;
    margin: 6px 0;
  }
  .col-4, .col-6 {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  /* Convert Table to Card on Mobile */
  .responsive-table table, 
  .responsive-table thead, 
  .responsive-table tbody, 
  .responsive-table th, 
  .responsive-table td, 
  .responsive-table tr {
    display: block;
  }
  
  .responsive-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .responsive-table tr {
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    border-radius: var(--radius);
    padding: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  
  .responsive-table td {
    border: none;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 45%;
    text-align: right;
  }
  
  .responsive-table td:last-child {
    border-bottom: none;
  }
  
  .responsive-table td:before {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--primary-dark);
    content: attr(data-label);
  }
}
