/* ===================================================
   SMP NEGERI 2 KARANGGAYAM — Design System
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --primary:       #1A56DB;
  --primary-dark:  #1347B5;
  --primary-light: #EBF2FF;
  --accent:        #F97316;
  --accent-dark:   #EA6B0C;
  --bg-light:      #EFF4FB;
  --bg-section:    #F8FAFC;
  --text-dark:     #1E293B;
  --text-muted:    #64748B;
  --white:         #FFFFFF;
  --border:        #E2E8F0;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

/* --- Navbar --- */
.navbar-main {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1050;
  border-bottom: 1px solid var(--border);
}

.navbar-main .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.navbar-main .brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.navbar-main .brand-text .school-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  display: block;
}

.navbar-main .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px 14px !important;
  border-radius: var(--radius-sm);
  transition: all .2s;
  position: relative;
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: var(--primary);
}

.navbar-main .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.navbar-main .search-box {
  position: relative;
}

.navbar-main .search-box input {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px 6px 36px;
  font-size: 13px;
  width: 180px;
  background: var(--bg-light);
  outline: none;
  transition: all .2s;
}

.navbar-main .search-box input:focus {
  width: 220px;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}

.navbar-main .search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.btn-masuk {
  background: var(--accent);
  color: var(--white) !important;
  border-radius: 8px;
  padding: 8px 20px !important;
  font-weight: 600;
  font-size: 14px;
  transition: all .2s;
  border: none;
}
.btn-masuk:hover {
  background: var(--accent-dark);
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249,115,22,.3);
}

/* --- Hero Slider --- */
.hero-slider {
  position: relative;
  height: 480px;
  overflow: hidden;
}

.hero-slider .swiper-slide {
  position: relative;
  height: 480px;
}

.hero-slider .slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slider .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

.hero-slider .slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.hero-slider .slide-text {
  max-width: 520px;
  color: var(--white);
}

.hero-slider .slide-text h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.hero-slider .slide-text p {
  font-size: 1rem;
  opacity: .9;
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-hero {
  background: var(--accent);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  display: inline-block;
  transition: all .2s;
  cursor: pointer;
}
.btn-hero:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(249,115,22,.35);
}

.hero-slider .swiper-pagination-bullet {
  background: rgba(255,255,255,.6);
  width: 8px; height: 8px;
  opacity: 1;
}
.hero-slider .swiper-pagination-bullet-active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}

/* --- Quick Access Bar --- */
.quick-access {
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.quick-access-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
}
.quick-access-item:hover {
  background: var(--bg-light);
  color: var(--primary);
  transform: translateY(-3px);
}

.quick-access-item .qa-icon {
  width: 52px; height: 52px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  transition: all .2s;
}
.quick-access-item:hover .qa-icon {
  background: var(--primary);
  color: var(--white);
}

.quick-access-item span {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* --- Section --- */
.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--bg-light);
}
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.link-lihat-semua {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.link-lihat-semua:hover { color: var(--primary-dark); }

/* --- Card Berita --- */
.card-berita {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all .25s;
  border: 1px solid var(--border);
  height: 100%;
}
.card-berita:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-berita .card-img-top {
  height: 170px;
  object-fit: cover;
  width: 100%;
}
.card-berita .card-body {
  padding: 16px;
}
.card-berita .card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-berita .card-text {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-detail {
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  margin-top: 12px;
  transition: all .2s;
}
.btn-detail:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* --- Card Agenda --- */
.card-agenda {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all .2s;
}
.card-agenda:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.agenda-date-box {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  text-align: center;
  min-width: 64px;
  flex-shrink: 0;
}
.agenda-date-box .badge-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  opacity: .8;
}
.agenda-date-box .tanggal {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}
.agenda-date-box .bulan {
  font-size: 11px;
  font-weight: 600;
  opacity: .85;
}
.agenda-hari {
  font-size: 11px;
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  display: inline-block;
}
.agenda-body .agenda-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.agenda-body .agenda-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.agenda-body .agenda-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- Badge Status --- */
.badge-pns   { background: #DBEAFE; color: #1D4ED8; }
.badge-pppk  { background: #D1FAE5; color: #065F46; }
.badge-honor { background: #FEF3C7; color: #92400E; }
.badge-gtt   { background: #EDE9FE; color: #5B21B6; }
.badge-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

/* --- Card Guru --- */
.card-guru {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all .25s;
  background: var(--white);
}
.card-guru:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-guru .guru-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
}
.card-guru .guru-body {
  padding: 14px;
}
.card-guru .guru-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.card-guru .guru-mapel {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Fasilitas Carousel --- */
.card-fasilitas {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  border: 1px solid var(--border);
}
.card-fasilitas img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-fasilitas .fasilitas-body {
  padding: 14px;
  text-align: center;
}
.card-fasilitas .fasilitas-name {
  font-weight: 700;
  font-size: 14px;
}

/* --- Swiper Custom Buttons --- */
.swiper-nav-btn {
  width: 36px; height: 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 14px;
  transition: all .2s;
}
.swiper-nav-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* --- Footer --- */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
}
.footer-brand .school-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.6;
}
.footer-logo { width: 44px; height: 44px; object-fit: contain; }
.footer h6 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color .2s;
}
.footer ul li a:hover { color: var(--primary); }
.footer-contact li {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.footer-contact li i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.footer-social a {
  width: 32px; height: 32px;
  background: var(--bg-light);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--primary);
  margin-right: 6px;
  transition: all .2s;
}
.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}
.footer-bottom {
  background: var(--bg-light);
  padding: 14px 0;
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* --- Breadcrumb --- */
.breadcrumb-section {
  background: var(--bg-light);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb { margin: 0; background: transparent; padding: 0; }
.breadcrumb-item a { color: var(--primary); font-size: 13px; }
.breadcrumb-item.active { color: var(--text-muted); font-size: 13px; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* --- Page Hero --- */
.page-hero {
  position: relative;
  height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.page-hero .page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero .page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,86,219,.75) 0%, rgba(0,0,0,.4) 100%);
}
.page-hero .page-hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}
.page-hero h1 { color: var(--white); font-size: 2rem; }
.page-hero p  { color: rgba(255,255,255,.85); font-size: 15px; }

/* --- Filter Tabs --- */
.filter-tabs .btn-filter {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all .2s;
}
.filter-tabs .btn-filter:hover,
.filter-tabs .btn-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  transition: background .2s;
}
.faq-question:hover { background: var(--bg-light); }
.faq-answer {
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-muted);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-answer.open {
  max-height: 300px;
  padding: 12px 20px 16px;
}

/* --- Galeri Grid --- */
.galeri-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.galeri-item img, .galeri-item .galeri-video-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.galeri-item:hover img,
.galeri-item:hover .galeri-video-thumb img {
  transform: scale(1.05);
}
.galeri-item .galeri-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,86,219,.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .3s;
}
.galeri-item:hover .galeri-overlay { opacity: 1; }
.galeri-item .galeri-overlay i { font-size: 2rem; color: var(--white); }
.galeri-item .galeri-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: var(--white);
  padding: 20px 14px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* --- Step Card (PPDB) --- */
.step-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all .25s;
}
.step-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-4px);
}
.step-number {
  width: 36px; height: 36px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
}
.step-icon {
  font-size: 2rem;
  color: var(--primary);
  margin: 12px 0 10px;
}
.step-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.step-desc { font-size: 12px; color: var(--text-muted); }

/* --- Timeline Jadwal PPDB --- */
.timeline-ppdb {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 0;
}
.timeline-ppdb::before {
  content: '';
  position: absolute;
  top: 38px;
  left: 12%;
  right: 12%;
  height: 3px;
  background: var(--border);
}
.timeline-ppdb .tl-item {
  flex: 1;
  text-align: center;
  position: relative;
}
.tl-dot {
  width: 16px; height: 16px;
  background: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
  position: relative;
  z-index: 1;
}
.tl-dot.inactive {
  background: var(--border);
  box-shadow: 0 0 0 2px var(--border);
}
.tl-date { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.tl-title { font-size: 13px; font-weight: 700; }
.tl-desc { font-size: 12px; color: var(--text-muted); }

/* --- Org Chart --- */
.org-level { display: flex; justify-content: center; margin-bottom: 32px; }
.org-node {
  text-align: center;
  padding: 0 12px;
}
.org-node .org-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  margin-bottom: 8px;
}
.org-node .org-name { font-size: 12px; font-weight: 700; }
.org-node .org-role { font-size: 11px; color: var(--text-muted); }

/* --- Admin Panel (placeholder untuk Fase 2) --- */
.admin-sidebar {
  width: 240px;
  background: var(--primary);
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
}

/* --- Utility --- */
.bg-primary-light { background: var(--primary-light); }
.text-primary     { color: var(--primary) !important; }
.text-accent      { color: var(--accent) !important; }
.text-muted-custom{ color: var(--text-muted) !important; }

/* --- Responsive --- */
@media (max-width: 991px) {
  .hero-slider { height: 360px; }
  .hero-slider .swiper-slide { height: 360px; }
  .hero-slider .slide-content { padding: 0 30px; }
  .hero-slider .slide-text h1 { font-size: 1.6rem; }
  .quick-access { padding: 16px; }
  .quick-access-item { padding: 10px 12px; }
}

@media (max-width: 767px) {
  .hero-slider { height: 300px; }
  .hero-slider .swiper-slide { height: 300px; }
  .hero-slider .slide-text h1 { font-size: 1.3rem; }
  .hero-slider .slide-text p  { display: none; }
  .quick-access { margin-top: -24px; padding: 12px 8px; }
  .quick-access-item .qa-icon { width: 42px; height: 42px; font-size: 18px; }
  .quick-access-item span { font-size: 11px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.3rem; }
  .timeline-ppdb { flex-direction: column; gap: 20px; }
  .timeline-ppdb::before { display: none; }
  .page-hero { height: 200px; }
  .page-hero h1 { font-size: 1.4rem; }
}
