/* CSS Stylesheet - SMA Negeri Unggul Sigli */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --secondary: #0d9488;
  --bg-light: #f8fafc;
  --surface: #ffffff;
  --text-dark: #334155;
  --text-headings: #0f172a;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --radius: 8px;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header & Navigation */
header {
  background-color: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  width: 100%;
}

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

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #475569;
  color: #fff;
  font-size: 1.5rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 2px solid #38bdf8;
}

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

/* Page Banner Card Header (H1) */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border-left: 5px solid var(--accent);
}

.page-banner h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.page-banner p {
  color: #cbd5e1;
  font-size: 1rem;
}

/* Card Components */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-headings);
  border-bottom: 2px solid var(--bg-light);
  padding-bottom: 0.5rem;
}

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

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

/* Homepage Hero & Cards */
.hero-thumb {
  width: 160px;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
  float: right;
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}

.profile-thumb {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: var(--shadow-md);
}

.quick-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-link:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

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

th {
  background-color: #f1f5f9;
  color: var(--text-headings);
  font-weight: 600;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 1rem;
  background: #fff;
}

.faq-question {
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
}

.faq-answer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Partner Links / Random Links Section */
.random-links {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

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

.random-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  list-style: none;
  font-size: 0.875rem;
}

.random-links-list li {
  display: inline-flex;
  align-items: center;
}

.random-links-list li:not(:last-child)::after {
  content: "|";
  margin-left: 12px;
  color: #94a3b8;
}

/* Footer */
footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 2rem;
  border-top: 3px solid var(--accent);
}

footer p {
  margin: 0.25rem 0;
}

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

  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    border-top: 1px solid var(--primary-light);
  }

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

  .main-nav a {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--primary-light);
  }
  .main-nav a.active {
    border-bottom: 1px solid #38bdf8;
  }

  .brand-title {
    font-size: 1rem;
  }

  /* Responsive Table to Mobile Card Conversion */
  .responsive-card-table {
    display: block;
  }

  .responsive-card-table thead {
    display: none;
  }

  .responsive-card-table tbody, 
  .responsive-card-table tr, 
  .responsive-card-table td {
    display: block;
    width: 100%;
  }

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

  .responsive-card-table td {
    text-align: right;
    padding: 8px 12px;
    position: relative;
    border-bottom: 1px dashed var(--border-color);
  }

  .responsive-card-table td:last-child {
    border-bottom: none;
  }

  .responsive-card-table td::before {
    content: attr(data-label);
    float: left;
    font-weight: 700;
    color: var(--text-headings);
  }
}
