/* CSS Utama SMAN 1 Semau - Modern Emerald & Gold Palette */
:root {
  --primary: #047857;
  --primary-dark: #065f46;
  --primary-light: #ecfdf5;
  --secondary: #d97706;
  --secondary-light: #fffbeb;
  --accent: #2563eb;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

.top-bar {
  background-color: var(--primary-dark);
  color: #a7f3d0;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-info { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.top-bar-info span { display: inline-flex; align-items: center; gap: 0.35rem; }

header {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-dark);
}

.brand img { height: 52px; width: auto; object-fit: contain; }
.brand-text h1 { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.brand-text p { font-size: 0.8rem; color: var(--text-muted); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--primary-dark);
}

.nav-menu { display: flex; list-style: none; gap: 0.25rem; align-items: center; }
.nav-menu li a {
  display: block;
  padding: 0.6rem 0.85rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.925rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-menu li a:hover, .nav-menu li a.active {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

main {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  min-height: 60vh;
}

.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 2.25rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
}

.page-banner h1 { font-size: 1.85rem; font-weight: 800; margin-bottom: 0.35rem; }
.page-banner p { font-size: 0.975rem; color: #a7f3d0; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card h2, .card h3 { color: var(--primary-dark); margin-bottom: 0.85rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }

.quick-card {
  background: var(--white);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-card h3 { font-size: 1.1rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.quick-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

.btn-link { display: inline-block; color: var(--primary); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.btn-link:hover { text-decoration: underline; }

.news-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.news-item h3 { font-size: 1.1rem; line-height: 1.4; margin-bottom: 0.6rem; }
.news-item h3 a { color: var(--text-dark); text-decoration: none; }
.news-item h3 a:hover { color: var(--primary); }
.news-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

.img-thumbnail-small {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 3px solid var(--white);
  box-shadow: var(--shadow-md);
  margin: 0.5rem 0;
}

.table-responsive { width: 100%; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.925rem; }
table.data-table th, table.data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
table.data-table th { background-color: var(--primary-light); color: var(--primary-dark); font-weight: 700; }

@media (max-width: 768px) {
  table.responsive-card-table { display: block; }
  table.responsive-card-table thead { display: none; }
  table.responsive-card-table tbody { display: block; }
  table.responsive-card-table tr {
    display: block; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm);
  }
  table.responsive-card-table td {
    display: flex; justify-content: space-between; padding: 0.4rem 0;
    border-bottom: 1px solid #f1f5f9; font-size: 0.875rem;
  }
  table.responsive-card-table td:last-child { border-bottom: none; }
  table.responsive-card-table td::before {
    content: attr(data-label); font-weight: 700; color: var(--primary-dark); padding-right: 0.5rem;
  }
}

.stat-box {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid #a7f3d0;
}

.stat-box .number { font-size: 2rem; font-weight: 800; color: var(--primary-dark); }
.stat-box .label { font-size: 0.875rem; color: var(--text-muted); font-weight: 600; }

.random-links {
  background: var(--white);
  border-top: 2px dashed var(--border);
  padding: 1.25rem 1rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.random-links-container { max-width: 1200px; margin: 0 auto; }
.random-links h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.random-links-list { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; list-style: none; }
.random-links-list a { color: var(--text-muted); text-decoration: none; transition: color 0.2s ease; }
.random-links-list a:hover { color: var(--primary); text-decoration: underline; }

footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 1.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 0;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; width: 100%; flex-direction: column; background-color: var(--white);
    position: absolute; top: 100%; left: 0; box-shadow: var(--shadow-lg); padding: 1rem; border-top: 1px solid var(--border);
  }
  .nav-menu.show { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu li a { padding: 0.75rem; border-bottom: 1px solid var(--border); }
  .brand-text h1 { font-size: 1.05rem; }
  .brand-text p { font-size: 0.725rem; }
}
