/* ====================================================================
 * TEMA WEBSITE RESMI SEKOLAH MENENGAH ATAS
 * Terinspirasi Desain Elegan, Dinamis, & Modern (Ref: sman1dps.sch.id)
 * ==================================================================== */

:root {
  --primary-color: #0d47a1;
  --secondary-color: #ffb300;
  --accent-color: #1565c0;
  --dark-color: #0f172a;
  --light-bg: #f8fafc;
  --text-main: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --hover-shadow: 0 20px 30px -10px rgba(13, 71, 161, 0.18);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  overflow-x: hidden;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
}

/* ====================================================================
 * TOP BAR (Informasi Kontak & NPSN)
 * ==================================================================== */
.top-bar {
  background: linear-gradient(90deg, #0a2558 0%, #0d47a1 100%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--secondary-color);
}

.top-bar a {
  color: rgba(255, 255, 255, 0.85);
}

.top-bar a:hover {
  color: #ffffff;
}

.top-bar .badge-akreditasi {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.top-bar .badge-akreditasi i {
  color: #ffc107 !important;
}

.social-top-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  margin-left: 6px;
  transition: var(--transition);
}

.social-top-icons a:hover {
  background: var(--secondary-color);
  color: #0f172a;
  transform: translateY(-2px);
}

/* ====================================================================
 * NAVBAR UTAMA (RESPONSIF & STICKY)
 * ==================================================================== */
.navbar-main {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 12px 0;
  transition: var(--transition);
}

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

.navbar-brand img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-color);
  text-transform: uppercase;
  margin: 0;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}

.navbar-nav .nav-link {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px !important;
  border-radius: 6px;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(13, 71, 161, 0.06);
}

.dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: 10px;
  padding: 10px;
  min-width: 250px;
  max-height: 82vh;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 6px;
  color: var(--text-main);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: rgba(13, 71, 161, 0.08);
  color: var(--primary-color);
  transform: translateX(4px);
}

/* ====================================================================
 * HERO SLIDER / CAROUSEL
 * ==================================================================== */
.hero-carousel .carousel-item {
  height: 580px;
  min-height: 480px;
  background-color: #0f172a;
}

.hero-carousel img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: brightness(0.85);
}

.hero-caption {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  z-index: 10;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 18px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-badge i {
  color: #ffc107 !important;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 18px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 720px;
  margin-bottom: 28px;
}

/* ====================================================================
 * TICKER PENGUMUMAN CEPAT (INFO BAR)
 * ==================================================================== */
.news-ticker-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  font-size: 0.9rem;
}

.ticker-label {
  background: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ====================================================================
 * SECTION HEADING
 * ==================================================================== */
.section-title-wrap {
  text-align: center;
  margin-bottom: 45px;
  position: relative;
}

.section-subtitle {
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark-color);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* ====================================================================
 * KARTU STATISTIK (COUNTERS)
 * ==================================================================== */
.stat-box {
  background: #ffffff;
  padding: 30px 20px;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--hover-shadow);
}

.stat-icon {
  width: 64px;
  height: 64px;
  line-height: 64px;
  font-size: 1.85rem;
  color: var(--primary-color);
  background: rgba(13, 71, 161, 0.08);
  border-radius: 50%;
  margin: 0 auto 16px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 4px;
}

.stat-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ====================================================================
 * SAMBUTAN KEPALA SEKOLAH
 * ==================================================================== */
.principal-section {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
  position: relative;
}

.principal-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 4px solid #ffffff;
}

.principal-frame img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  transition: var(--transition);
}

.principal-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  border-left: 4px solid var(--secondary-color);
}

/* ====================================================================
 * KARTU BERITA & ARTIKEL
 * ==================================================================== */
.news-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.news-card-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-thumb img {
  transform: scale(1.08);
}

.news-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

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

.news-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.news-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.news-card-title a {
  color: var(--dark-color);
}

.news-card-title a:hover {
  color: var(--primary-color);
}

.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

/* ====================================================================
 * AGENDA & PENGUMUMAN LIST
 * ==================================================================== */
.agenda-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
}

.agenda-card:hover {
  transform: translateX(6px);
  border-color: var(--primary-color);
}

.agenda-date-box {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
  min-width: 65px;
  height: 65px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.agenda-date-day {
  font-size: 1.5rem;
  font-weight: 800;
}

.agenda-date-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}

.announcement-box {
  border-left: 4px solid var(--secondary-color);
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  margin-bottom: 14px;
  transition: var(--transition);
}

.announcement-box:hover {
  background: #fffdf5;
  transform: translateX(4px);
}

/* ====================================================================
 * GALERI & LIGHTBOX MODAL
 * ==================================================================== */
.gallery-item-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item-card:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ====================================================================
 * FOOTER
 * ==================================================================== */
.footer-main {
  background: #091a38;
  color: #cbd5e1;
  padding-top: 65px;
  border-top: 4px solid var(--secondary-color);
  font-size: 0.95rem;
}

.footer-main h5 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 22px;
  position: relative;
  padding-bottom: 10px;
}

.footer-main h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary-color);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
  transform: translateX(4px);
}

.footer-bottom {
  background: #051024;
  padding: 20px 0;
  margin-top: 50px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ====================================================================
 * RESPONSIF MEDIA QUERIES
 * ==================================================================== */
@media (max-width: 991.98px) {
  .hero-carousel .carousel-item {
    height: 440px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .navbar-nav {
    padding-top: 12px;
  }
}

@media (max-width: 575.98px) {
  .hero-carousel .carousel-item {
    height: 380px;
  }
  .hero-title {
    font-size: 1.55rem;
  }
  .brand-title {
    font-size: 1rem;
  }
}
