:root {
  --primary: #0b1d3a;
  --secondary: #d4a43a;
  --accent: #0f7adf;
  --text: #243044;
  --muted: #5f6b7a;
  --light: #f5f7fb;
  --white: #ffffff;
  --header-shadow: 0 18px 40px rgba(10, 25, 56, 0.12);
  --card-shadow: 0 12px 30px rgba(10, 25, 56, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 220px);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar */
.top-bar {
  background: linear-gradient(90deg, #09152f 0%, #0b1d3a 100%);
  color: var(--white);
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-info {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.top-info span i {
  color: var(--secondary);
  margin-right: 6px;
}

.top-social a {
  margin-left: 15px;
  transition:
    color 0.3s,
    transform 0.3s;
}

.top-social a:hover {
  color: var(--secondary);
  transform: translateY(-1px);
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--header-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(10, 25, 56, 0.06);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 13px;
  padding: 9px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
}

.logo img {
  height: 57px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  border-left: 2px solid rgba(15, 122, 223, 0.18);
  padding-left: 12px;
  min-width: 0;
}

.logo-text h1 {
  font-size: 15px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0.01em;
}

.logo-text p {
  font-size: 10px;
  color: var(--muted);
  margin: 2px 0 0;
  letter-spacing: 2.6px;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(11, 29, 58, 0.12);
  border-radius: 13px;
  background: var(--white);
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(10, 25, 56, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.nav-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(10, 25, 56, 0.12);
}

.nav-toggle i {
  font-size: 17px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

nav ul {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.22s ease;
  border-radius: 999px;
}

nav ul li a:hover,
nav ul li.active a,
nav ul li a.is-active {
  background: rgba(15, 122, 223, 0.1);
  color: var(--accent);
}

nav ul li a.is-active {
  box-shadow: inset 0 0 0 1px rgba(15, 122, 223, 0.16);
}

nav ul li a.btn-login {
  background: linear-gradient(135deg, var(--primary) 0%, #132d59 100%);
  color: var(--white);
  border: 1px solid rgba(11, 29, 58, 0.12);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.25s ease;
  box-shadow: 0 10px 18px rgba(11, 29, 58, 0.14);
}

nav ul li a.btn-login:hover {
  background: linear-gradient(135deg, var(--secondary) 0%, #e1b94c 100%) !important;
  border-color: var(--secondary) !important;
  color: #102446 !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(212, 164, 58, 0.24);
}

.mobile-nav-panel {
  display: none;
}

.mobile-nav-backdrop {
  display: none;
}

/* Hero / Slider */
.hero {
  height: 600px;
  background: linear-gradient(rgba(12, 26, 75, 0.6), rgba(12, 26, 75, 0.6)), url("https://sman3-slo.sch.id/wp-content/uploads/2023/06/slider-1.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, transparent 20%, rgba(12, 26, 75, 0.4) 80%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}

.hero-content .welcome-text {
  display: inline-block;
  background-color: var(--secondary);
  color: #0c1a4b;
  padding: 5px 20px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  border-radius: 50px;
  animation: fadeInDown 1s ease-out;
}

.hero-content h2 {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 35px;
  font-weight: 300;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-content .btn-primary {
  background-color: var(--secondary);
  color: #0c1a4b;
  padding: 15px 40px;
  font-size: 16px;
  border-radius: 50px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-content .btn-primary:hover {
  background-color: var(--white);
  transform: translateY(-5px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 32px;
  color: var(--primary);
  position: relative;
  padding-bottom: 15px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-10px);
}

.card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

/* Latest News */
.latest-news {
  background-color: #0f7adf;
}

.latest-news .section-title h2 {
  color: var(--white);
}

.latest-news .section-title h2::after {
  background-color: var(--white);
}

.latest-news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.latest-news-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  overflow: hidden;
  background-color: var(--white);
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(8, 38, 86, 0.18);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.latest-news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px rgba(8, 38, 86, 0.26);
}

.latest-news-image {
  display: block;
  height: 185px;
  background-size: cover;
  background-position: center;
  background-color: #dce9f8;
}

.latest-news-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 16px;
}

.latest-news-category {
  margin-bottom: 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.latest-news-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.latest-news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 26px;
  color: #526171;
  font-size: 13px;
}

.latest-news-date i {
  margin-right: 6px;
  color: #8293a8;
}

.latest-news-link {
  color: #0f7adf;
  font-weight: 700;
  white-space: nowrap;
}

.latest-news-more {
  display: inline-block;
  margin-top: 38px;
  padding: 12px 30px;
  color: var(--white);
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.latest-news-more:hover {
  background-color: var(--white);
  color: #0f7adf;
}

.articles-page {
  background-color: var(--light);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.articles-grid .latest-news-card {
  min-height: 425px;
  border: 1px solid #d9e0ea;
  box-shadow: none;
}

.materials-section {
  background: linear-gradient(180deg, #1e70d4 0%, #1164d6 100%);
  color: var(--white);
  padding: 62px 0 66px;
}

.materials-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.materials-heading-copy {
  max-width: 640px;
}

.materials-header h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.materials-header p {
  max-width: 600px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.7;
}

.materials-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.materials-view-all i {
  font-size: 10px;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.material-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(6, 23, 54, 0.16);
  min-height: 306px;
}

.material-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.material-card-body {
  padding: 14px 14px 16px;
  color: #0f172a;
}

.material-card-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.material-card-body h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.material-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #6b7280;
  font-size: 11px;
}

.material-card-footer i {
  margin-right: 6px;
  color: #94a3b8;
}

.articles-grid .latest-news-card:hover {
  box-shadow: 0 14px 30px rgba(8, 38, 86, 0.16);
}

.articles-grid .latest-news-image {
  height: 260px;
}

.articles-grid .latest-news-body {
  padding: 22px 16px 24px;
}

.articles-grid .latest-news-title {
  font-size: 16px;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  margin-bottom: 25px;
  color: var(--secondary);
}

.footer-col p,
.footer-col li {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 992px) {
  .top-bar .container,
  .header-content {
    gap: 11px;
  }

  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 22px rgba(10, 25, 56, 0.1);
  }

  .nav-toggle i {
    font-size: 18px;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7, 16, 34, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 998;
    backdrop-filter: blur(4px);
  }

  .mobile-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-panel {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.985);
    backdrop-filter: blur(22px);
    box-shadow: 0 28px 70px rgba(10, 25, 56, 0.22);
    transform: translateY(-114%);
    transition: transform 0.32s ease;
    z-index: 1001;
    border-bottom: 1px solid rgba(11, 29, 58, 0.08);
    border-radius: 0 0 24px 24px;
    padding: 16px 0 18px;
    pointer-events: auto;
  }

  .mobile-nav-panel.is-open {
    transform: translateY(0);
  }

  .mobile-nav-panel .container {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 2px;
  }

  .mobile-nav-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-nav-brand strong {
    font-size: 14px;
    color: var(--primary);
    line-height: 1.2;
  }

  .mobile-nav-brand span {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 2.6px;
    text-transform: uppercase;
  }

  .mobile-nav-close {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(11, 29, 58, 0.12);
    border-radius: 12px;
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(10, 25, 56, 0.08);
    touch-action: manipulation;
  }

  .mobile-nav-panel nav ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 4px;
  }

  .mobile-nav-panel nav ul li a {
    width: 100%;
    min-height: 52px;
    justify-content: space-between;
    padding: 15px 16px;
    border-radius: 16px;
    background: #f6f9ff;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    touch-action: manipulation;
  }

  .mobile-nav-panel nav ul li a.is-active {
    background: rgba(15, 122, 223, 0.12);
  }

  .mobile-nav-panel nav ul li a.btn-login {
    background: linear-gradient(135deg, var(--primary) 0%, #132d59 100%);
    color: var(--white);
  }

  .header-content {
    align-items: center;
  }

  .logo img {
    height: 56px;
  }

  .logo-text h1 {
    font-size: 14px;
  }

  .hero-content h2 {
    font-size: 32px;
  }

  .latest-news-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .latest-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .top-bar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .top-info {
    gap: 10px 14px;
    font-size: 12px;
  }

  .logo img {
    height: 50px;
  }

  .logo-text {
    padding-left: 12px;
  }

  .logo-text h1 {
    font-size: 13px;
  }

  .logo-text p {
    letter-spacing: 1.4px;
  }

  .hero-content h2 {
    font-size: 28px;
  }
}
