/* CSS - SMA Negeri 3 Pematang Siantar */
:root {
  --primary-color: #0f3460;
  --secondary-color: #e94560;
  --accent-color: #16213e;
  --bg-light: #f8f9fa;
  --text-dark: #2b2b2b;
  --text-muted: #6c757d;
  --white: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --border-radius: 8px;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header & Navigation */
header {
  background-color: var(--primary-color);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

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

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #dcdcdc;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
}

nav {
  display: flex;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* Page Container & Banner Card */
.container {
  max-width: 1200px;
  margin: 25px auto;
  padding: 0 20px;
}

.page-banner-card {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white);
  padding: 30px 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 25px;
  border-left: 6px solid var(--secondary-color);
}

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

.page-banner-card p {
  font-size: 0.95rem;
  color: #e0e0e0;
}

/* Section Styling */
.section-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 25px;
}

.section-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eef2f5;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--secondary-color);
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.info-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.info-card h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.btn-card {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease;
  align-self: flex-start;
}

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

/* News Article Card */
.news-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.news-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.4;
  text-decoration: none;
}

.news-title:hover {
  color: var(--secondary-color);
}

.news-excerpt {
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 15px;
  flex-grow: 1;
}

/* Responsive Table / Cards for Mobile */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.custom-table th, .custom-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.custom-table th {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
}

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

/* Responsive Table into Cards on Mobile */
@media screen and (max-width: 768px) {
  .responsive-card-table table, 
  .responsive-card-table thead, 
  .responsive-card-table tbody, 
  .responsive-card-table th, 
  .responsive-card-table td, 
  .responsive-card-table tr { 
    display: block; 
  }
  
  .responsive-card-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .responsive-card-table tr {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }
  
  .responsive-card-table td { 
    border: none;
    border-bottom: 1px solid #f1f5f9; 
    position: relative;
    padding-left: 50%; 
    text-align: right;
    font-size: 0.88rem;
  }
  
  .responsive-card-table td:last-child {
    border-bottom: 0;
  }
  
  .responsive-card-table td:before { 
    position: absolute;
    top: 12px;
    left: 12px;
    width: 45%; 
    padding-right: 10px; 
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--primary-color);
    content: attr(data-label);
  }
}

/* Navigation Mobile Menu */
@media screen and (max-width: 900px) {
  .menu-toggle {
    display: block;
  }
  
  nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  nav.active {
    display: block;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .nav-link {
    width: 100%;
    display: block;
    padding: 10px;
  }
}

/* Image Responsive */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  display: block;
  margin: 15px 0;
}

/* Stat Card Display */
.stat-box {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

/* SEO Random Links Class Tepat di Atas Footer */
.random-links {
  background-color: #ffffff;
  border-top: 2px solid #e2e8f0;
  padding: 20px 0;
  margin-top: 40px;
}

.random-links-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.random-links h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.random-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.random-links li a {
  color: #475569;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.random-links li a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: var(--accent-color);
  color: #94a3b8;
  padding: 25px 0;
  text-align: center;
  font-size: 0.88rem;
}

footer p {
  margin: 5px 0;
}
