/* Base Styles */
:root {
  --primary-color: #a70e13;
  --primary-color-hover: #d84a12;

  --bg-color: #e5e5e5;
  --secondary-color: #f4c430;
  --accent-purple: #8b5cf6;
  --supporting-color: #f5f5f5;
  --accent-color: #4e733a;
  --main-text: #010101;
  --secondary-text: #353333;
  --light-gray: #dddddd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* body {
  font-family: "Poppins", sans-serif;
  color: var(--main-text);
  background-color: #f9fafb;
  line-height: 1.6;
} */

html {
  scroll-padding-top: 80px;
}

/* =============================
   HERO AKADEMIK
============================= */
.hero-section-akademik {
    position: relative;
    height: 500px;
    background: linear-gradient(
        135deg,
        #a70e13 0%,
        #c84a1a 40%,
        #e87a3a 75%,
        #f4a56a 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 0 0 40px 40px;
    overflow: hidden;
}

#hero-canvas-akademik {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: block;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(55px);
    animation: heroBlobDrift 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-blob-1 {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    top: -80px;
    left: -60px;
    animation-duration: 12s;
}

.hero-blob-2 {
    width: 220px;
    height: 220px;
    background: rgba(244, 196, 48, 0.1);
    bottom: -60px;
    right: -40px;
    animation-duration: 9s;
    animation-delay: -4s;
}

.hero-blob-3 {
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.05);
    top: 35%;
    right: 12%;
    animation-duration: 14s;
    animation-delay: -7s;
}

@keyframes heroBlobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(15px, -20px) scale(1.05); }
    66%       { transform: translate(-12px, 15px) scale(0.97); }
}

.hero-corner {
    position: absolute;
    width: 52px;
    height: 52px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.hero-corner-tl {
    top: 28px;
    left: 28px;
    border-top: 1.5px solid rgba(255, 255, 255, 0.9);
    border-left: 1.5px solid rgba(255, 255, 255, 0.9);
}

.hero-corner-tr {
    top: 28px;
    right: 28px;
    border-top: 1.5px solid rgba(255, 255, 255, 0.9);
    border-right: 1.5px solid rgba(255, 255, 255, 0.9);
}

.hero-corner-bl {
    bottom: 48px;
    left: 28px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
    border-left: 1.5px solid rgba(255, 255, 255, 0.9);
}

.hero-corner-br {
    bottom: 48px;
    right: 28px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
    border-right: 1.5px solid rgba(255, 255, 255, 0.9);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 24px 32px 0;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 20px;
    animation: heroFadeUp 0.7s ease both;
}

.hero-eyebrow-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f4c430;
    flex-shrink: 0;
    animation: eyebrowDotPulse 2s ease-in-out infinite;
}

@keyframes eyebrowDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.6); }
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(100, 20, 0, 0.2);
    animation: heroFadeUp 0.7s 0.12s ease both;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 28px;
    line-height: 1.6;
    animation: heroFadeUp 0.7s 0.22s ease both;
}

.hero-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    animation: heroFadeUp 0.7s 0.32s ease both;
}

.hero-ornament-line {
    height: 1px;
    width: 52px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
}

.hero-ornament-line.right {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent);
}

.hero-ornament-diamond {
    width: 7px;
    height: 7px;
    background: #f4c430;
    transform: rotate(45deg);
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(244, 196, 48, 0.6);
}

.hero-ayat {
    font-family: 'Amiri', serif;
    font-size: 1.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 2;
    direction: rtl;
    text-shadow: 0 2px 16px rgba(100, 20, 0, 0.3);
    margin-bottom: 6px;
    animation: heroFadeUp 0.7s 0.42s ease both;
}

.hero-ayat-latin {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    letter-spacing: 0.4px;
    animation: heroFadeUp 0.7s 0.52s ease both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================
   MAIN CONTENT
============================= */
.main-content {
  padding: 3rem 5%;
  background-color: #f9fafb;
}

/* =============================
   AKADEMIK GRID
============================= */
.akademik-content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

/* =============================
   SIDEBAR
============================= */
.fixed-sidebar {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.sidebar {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--main-text);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-color);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-menu-item {
  display: block;
  text-decoration: none;
  color: var(--secondary-text);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.sidebar-menu-item:hover {
  background-color: rgba(167, 14, 19, 0.07);
  color: var(--primary-color);
  transform: translateX(3px);
}

/* =============================
   ANNOUNCEMENT (warna disesuaikan agar semantically benar)
============================= */
.sidebar-announcement {
  margin-top: 2rem;
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.announcement-item {
  padding: 1rem;
  border-radius: 0.75rem;
  border-left: 5px solid transparent;
}

.announcement-item.info {
  background-color: #e3f2fd;
  color: #1565c0;
  border-left-color: #2196f3;
}

.announcement-item.warning {
  background-color: #fff8e1;
  color: #8a6d1d;
  border-left-color: var(--secondary-color);
}

.announcement-item.success {
  background-color: #eef3e8;
  color: var(--accent-color);
  border-left-color: var(--accent-color);
}

.announcement-text {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* =============================
   AKADEMIK CONTENT MAIN
============================= */
.akademik-content-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Satu class untuk semua section card (Kurikulum, Jadwal, Evaluasi, Prestasi) */
.akademik-content-section {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* =============================
   SECTION HEADER
============================= */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-bullet {
  width: 0.75rem;
  height: 2rem;
  background-color: var(--primary-color);
  border-radius: 999px;
  margin-right: 0.75rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

/* =============================
   TWO COLUMN GRID
============================= */
.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* =============================
   SUBSECTION (Tahfidz = merah, Akademik = hijau, agar dua kolom punya identitas berbeda)
============================= */
.subsection-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 0.9rem;
}

.subsection-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 4px;
  border-radius: 2px;
}

.subsection-title.tahfidz {
  color: var(--primary-color);
}
.subsection-title.tahfidz::before {
  background-color: var(--primary-color);
}

.subsection-title.akademik {
  color: var(--accent-color);
}
.subsection-title.akademik::before {
  background-color: var(--accent-color);
}

.subsection-content {
  font-size: 1rem;
  color: var(--secondary-text);
  line-height: 1.8;
  padding-left: 1.2rem;
}

.subsection-content li {
  margin-bottom: 0.75rem;
}

/* =============================
   TABLE
============================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--light-gray);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table thead {
  background-color: var(--primary-color);
  color: white;
}

.schedule-table th,
.schedule-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

.schedule-table tbody tr:last-child td {
  border-bottom: none;
}

.schedule-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.schedule-table tbody tr:hover {
  background-color: rgba(167, 14, 19, 0.04);
}

/* =============================
   EVALUATION
============================= */
.evaluation-item {
  padding: 1.5rem;
  border: 1px solid var(--light-gray);
  border-top: 4px solid var(--light-gray);
  border-radius: 1rem;
  background-color: var(--supporting-color);
}

.evaluation-item.tahfidz {
  border-top-color: var(--primary-color);
}

.evaluation-item.akademik {
  border-top-color: var(--accent-color);
}

.evaluation-desc {
  margin-top: 0.5rem;
  color: var(--secondary-text);
  line-height: 1.8;
}

/* =============================
   ACHIEVEMENT (gold = warna "prestasi/trofi")
============================= */
.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background-color: var(--supporting-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.achievement-badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: rgba(244, 196, 48, 0.18);
  color: #b8861f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
}

.achievement-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #b8861f;
}

.achievement-desc {
  margin-top: 0.4rem;
  color: var(--secondary-text);
  line-height: 1.8;
}

/* =============================
   TOGGLE BUTTON
============================= */
.sidebar-toggle {
  display: none;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background-color: var(--primary-color-hover);
}

/* =============================
   OVERLAY
============================= */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 998;
}

/* =====================================================
   RESPONSIVE - Halaman Info Akademik
   Tempel di PALING BAWAH file CSS ini.
   HAPUS DULU dua blok lama di bawah file:
     - @media (max-width: 991px)
     - @media (max-width: 600px)
   Semua isinya sudah digabung ke sini.
   Urutan: besar -> kecil. JANGAN dibalik.
   ===================================================== */


/* =====================================================
   LAPTOP KECIL KEBAWAH (<= 1199px)
   ===================================================== */
@media (max-width: 1199.98px) {

  /* sidebar sedikit lebih ramping, konten dapat ruang lebih */
  .akademik-content-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem;
  }

  .two-column-grid { gap: 1.5rem; }
}


/* =====================================================
   DESKTOP (>= 992px)
   ===================================================== */
@media (min-width: 992px) {

  /* sidebar sticky yang lebih tinggi dari layar tetap bisa di-scroll
     (misal pengumuman banyak), bukan kepotong */
  .fixed-sidebar {
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}


/* =====================================================
   TABLET KEBAWAH (<= 991px)  -> sidebar jadi off-canvas
   ===================================================== */
@media (max-width: 991.98px) {

  /* ----- Hero: tinggi ngikutin isi (dulu fixed 500px, isinya bisa kepotong) ----- */
  .hero-section-akademik {
    height: auto;
    min-height: 460px;
    padding: 3.5rem 0 4rem;
    border-radius: 0 0 32px 32px;
  }

  .hero-title { font-size: 2.2rem; }
  .hero-ayat { font-size: 1.65rem; }

  /* ----- Layout: 1 kolom ----- */
  .akademik-content-grid { grid-template-columns: minmax(0, 1fr); }

  .akademik-content-main {
    width: 100%;
    min-width: 0;
  }

  /* ----- Tombol menu: nimpa d-md-none Bootstrap yang bikin tombol
         ngilang di 768-991px padahal sidebar udah off-canvas ----- */
  .main-content .sidebar-toggle { display: block !important; }

  /* ----- Sidebar off-canvas ----- */
  .fixed-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: min(280px, 85vw);
    height: 100vh;
    height: 100dvh;            /* anti kepotong address bar HP */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 9999;
    transition: left 0.3s ease;
    padding: 1.25rem 1rem;
    border-radius: 0 1rem 1rem 0;
    background: #fff;
  }

  .fixed-sidebar.active {
    left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }

  /* overlay nutupin navbar juga (navbar z-index 999) */
  .sidebar-overlay { z-index: 9998; }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  body.sidebar-open { overflow: hidden; }
}


/* =====================================================
   HP BESAR / TABLET KECIL (<= 767px)
   ===================================================== */
@media (max-width: 767.98px) {

  /* ----- Hero ----- */
  .hero-section-akademik {
    min-height: 420px;
    padding: 3rem 0 3.5rem;
    border-radius: 0 0 28px 28px;
  }

  .hero-content { padding: 16px 20px 0; }

  .hero-title { font-size: 2rem; }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 22px;
  }

  .hero-ayat {
    font-size: 1.5rem;
    line-height: 1.9;
  }

  .hero-ayat-latin { font-size: 0.75rem; }

  /* ornamen sudut dikecilin & dirapetin ke pojok */
  .hero-corner {
    width: 40px;
    height: 40px;
  }

  .hero-corner-tl,
  .hero-corner-tr { top: 16px; }

  .hero-corner-bl,
  .hero-corner-br { bottom: 24px; }

  .hero-corner-tl,
  .hero-corner-bl { left: 16px; }

  .hero-corner-tr,
  .hero-corner-br { right: 16px; }

  /* ----- Konten ----- */
  .main-content { padding: 2rem 4%; }

  .akademik-content-main { gap: 1.5rem; }
  .akademik-content-section { padding: 1.5rem; }

  .section-header h2 { font-size: 1.4rem; }

  /* dulu pindah 1 kolom di 600px, sekarang di 767px */
  .two-column-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* tabel: di CSS asli `overflow: hidden` nimpa `overflow-x: auto`,
     jadi tabel ga bisa di-scroll samping. Ini nyalain lagi. */
  .table-wrapper { overflow-x: auto; }

  .evaluation-item { padding: 1.25rem; }
}


/* =====================================================
   HP (<= 575px)
   ===================================================== */
@media (max-width: 575.98px) {

  .main-content { padding: 1.5rem 4%; }

  .sidebar-toggle {
    width: 100%;
    text-align: left;
  }

  /* ----- Hero ----- */
  .hero-section-akademik {
    min-height: 0;
    padding: 2.5rem 0 3rem;
    border-radius: 0 0 24px 24px;
  }

  .hero-corner { display: none; }

  .hero-content { padding: 8px 16px 0; }

  .hero-eyebrow {
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    margin-bottom: 16px;
  }

  .hero-title { font-size: 1.7rem; }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .hero-ornament { margin-bottom: 16px; }

  .hero-ayat { font-size: 1.3rem; }
  .hero-ayat-latin { font-size: 0.72rem; }

  /* ----- Konten ----- */
  .akademik-content-section { padding: 1.25rem 1rem; }

  .section-header { margin-bottom: 1.25rem; }

  .section-bullet {
    width: 0.6rem;
    height: 1.6rem;
    margin-right: 0.6rem;
  }

  .section-header h2 { font-size: 1.25rem; }

  .subsection-title { font-size: 1.05rem; }

  .subsection-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .evaluation-item { padding: 1rem; }

  .achievement-list { gap: 1rem; }

  .achievement-item {
    gap: 1rem;
    padding: 1rem;
  }

  .achievement-badge {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.1rem;
  }

  .achievement-title { font-size: 1.05rem; }
}