/* Professional Modern Educational Theme - SMA Diponegoro Palembang */
:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --secondary: #0d9488;
  --accent: #d97706;
  --dark: #0f172a;
  --light: #f8fafc;
  --surface: #ffffff;
  --text: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--light);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header & Navigation */
header {
  background-color: var(--surface);
  border-bottom: 3px solid var(--secondary);
  box-shadow: var(--shadow);
  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: 12px;
  text-decoration: none;
  color: var(--dark);
}

.brand img {
  height: 48px;
  width: auto;
  display: block;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  padding: 6px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-menu a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-menu a:hover, .nav-menu a.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Banner Card H1 Header */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1e1b4b 100%);
  color: #ffffff;
  padding: 2.5rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: inset 0 -4px 6px rgba(0,0,0,0.1);
}

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

.banner-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.banner-card p {
  font-size: 1rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto;
}

/* Layout Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem 1rem;
  width: 100%;
  flex: 1;
}

/* Cards & Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

/* Typography & Content Elements */
.section-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 0.875rem;
}

.btn:hover {
  background-color: var(--primary-hover);
}

/* Table Responsive Cards for Mobile */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.responsive-table th, .responsive-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.responsive-table th {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

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

/* Image styling */
.img-thumbnail {
  max-width: 280px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 10px 0;
}

/* Random Links Partner Footer Bar */
.random-links-container {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
  padding: 1.25rem 1rem;
  margin-top: auto;
}

.random-links-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.random-links-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.random-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.random-links a {
  color: var(--primary);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
}

.random-links a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: #94a3b8;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
}

footer p {
  max-width: 1200px;
  margin: 0 auto;
}

/* Article Styling */
.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.article-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #1e293b;
  margin-bottom: 2rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--surface);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-bottom: 2px solid var(--primary);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu a {
    padding: 10px 16px;
    width: 100%;
  }

  /* Transform table to cards on mobile */
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    margin-bottom: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .responsive-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
  }

  .responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: 700;
    color: var(--primary);
  }
}
