
/* ── Design tokens ── */
:root {
  --brand: #b91c1c;
  --brand-2: #dc2626;
  --brand-dark: #7f1d1d;
  --gold: #facc15;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 4% 0%,
      rgba(250, 204, 21, 0.28),
      transparent 28rem
    ),
    radial-gradient(
      circle at 95% 8%,
      rgba(185, 28, 28, 0.12),
      transparent 26rem
    ),
    linear-gradient(180deg, #fffdf2 0%, #f8fafc 38%, #eef2f7 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}

/* ── Material Symbols ── */
.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    "FILL" 0,
    "wght" 600,
    "GRAD" 0,
    "opsz" 24;
}

/* ── Bento card shell ── */
.bento-card {
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  /* height: 100%; */
}

/* During masonry measurement: lift overflow so scrollHeight is unclamped */
.bento-card.is-measuring {
  overflow: visible !important;
  height: auto !important;
}

.bento-card.is-measuring .card-inner {
  overflow: visible !important;
  height: auto !important;
}

.bento-card.is-measuring .absolute {
  display: none !important;
}

/* The inner wrapper — no h-full/overflow so scrollHeight measures freely */
.card-inner {
  width: 100%;
  /* height: 100%; */
  border-radius: inherit;
}

/* ── Scrollbar ── */
.thin-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

/* ── Placeholder image ── */
.placeholder-img {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.78),
      rgba(248, 250, 252, 0.9)
    ),
    linear-gradient(135deg, #fee2e2 0%, #fff7ed 45%, #e0f2fe 100%);
}

.placeholder-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 24% 24%,
      rgba(185, 28, 28, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at 70% 64%,
      rgba(250, 204, 21, 0.18),
      transparent 36%
    );
}

.placeholder-img::after {
  content: "image";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "Material Symbols Rounded";
  font-size: 28px;
  color: rgba(100, 116, 139, 0.55);
}

/* 1. Posisi Wrapper Utama */
    .fab-wrapper {
      position: fixed !important;
      bottom: 24px !important;
      right: 24px !important;
      z-index: 999999 !important;
      /* Membungkus sesuai ukuran anak-anak di dalamnya */
    }

    /* 2. Tombol Back to Top */
    .fab-back-to-top {
      position: absolute !important;
      bottom: 80px !important; /* Diletakkan pas di atas tombol WA */
      right: 6px !important; /* Disesuaikan agar posisinya di tengah relatif terhadap WA (64px - 52px)/2 */
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: 52px !important;
      height: 52px !important;
      background: #ffffff !important;
      color: #475569 !important;
      border-radius: 18px !important;
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
      border: 1px solid rgba(15, 23, 42, 0.06) !important;
      cursor: pointer !important;
      padding: 0 !important;
      z-index: 10 !important;

      /* Kondisi Awal: Sembunyi (saat scroll masih di atas) */
      opacity: 0 !important;
      visibility: hidden !important;
      transform: translateY(20px) scale(0.8) !important;
      pointer-events: none !important;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }

    /* Saat Scroll > 300px (Muncul) */
    .fab-back-to-top.show {
      opacity: 1 !important;
      visibility: visible !important;
      transform: translateY(0) scale(1) !important;
      pointer-events: auto !important;
    }

    /* Hover Tombol Back to Top */
    .fab-back-to-top:hover {
      background: #f8fafc !important;
      color: #0f172a !important;
      transform: translateY(-4px) scale(1.05) !important;
      box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15) !important;
    }

    /* 3. Style Menu Pop-up WA */
    .wa-popup-menu {
      position: absolute !important;
      bottom: 84px !important; 
      right: 0 !important;
      background: #ffffff !important;
      border-radius: 24px !important;
      box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
      border: 1px solid rgba(15, 23, 42, 0.05) !important;
      width: 250px !important;
      padding: 8px !important;
      display: flex !important;
      flex-direction: column !important;
      z-index: 10000 !important; /* Paling atas agar menutupi tombol back-to-top jika sedang terbuka */
      
      opacity: 0 !important;
      visibility: hidden !important;
      transform: translateY(20px) scale(0.9) !important;
      transform-origin: bottom right !important;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important; 
      pointer-events: none !important;
    }

    .wa-popup-menu.active {
      opacity: 1 !important;
      visibility: visible !important;
      transform: translateY(0) scale(1) !important;
      pointer-events: auto !important;
    }

    .wa-menu-header {
      padding: 12px 14px !important;
      font-weight: 700 !important;
      color: #0f172a !important;
      font-size: 15px !important;
      border-bottom: 1px solid #f1f5f9 !important;
      margin-bottom: 6px !important;
      text-align: left !important;
    }

    .wa-item {
      display: flex !important;
      align-items: center !important;
      padding: 12px 14px !important;
      text-decoration: none !important;
      color: #334155 !important;
      background: transparent !important;
      border-radius: 16px !important;
      transition: all 0.25s ease !important;
      gap: 14px !important;
    }

    .wa-item:hover {
      background: #f0fdf4 !important; 
      color: #15803d !important;
      transform: translateX(4px) !important; 
    }

    .wa-item-text {
      font-size: 14px !important;
      font-weight: 600 !important;
      flex-grow: 1 !important;
    }

    /* 4. Tombol Utama (FAB WhatsApp) */
    .fab-whatsapp {
      position: relative !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: 64px !important; 
      height: 64px !important;
      background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
      border-radius: 22px !important; 
      box-shadow: 0 12px 28px -6px rgba(37, 211, 102, 0.5) !important;
      cursor: pointer !important;
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
      border: none !important;
      color: white !important; 
      padding: 0 !important;
      z-index: 100 !important;
    }

    .fab-whatsapp::before {
      content: '' !important;
      position: absolute !important;
      inset: 0 !important;
      border-radius: inherit !important;
      border: 1px solid rgba(255, 255, 255, 0.3) !important;
      pointer-events: none !important;
    }

    .fab-whatsapp:hover {
      transform: translateY(-4px) scale(1.03) !important;
      box-shadow: 0 18px 32px -6px rgba(37, 211, 102, 0.6) !important;
    }

    .fab-whatsapp svg {
      transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }
    .wa-popup-menu.active + .fab-whatsapp svg#icon-close {
      transform: rotate(90deg) !important;
    }

    .fab-whatsapp::after {
      content: "" !important;
      position: absolute !important;
      inset: -4px !important;
      border-radius: 26px !important;
      border: 2px solid rgba(37, 211, 102, 0.4) !important;
      animation: pulse-wa 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
      z-index: -1 !important;
    }

    @keyframes pulse-wa {
      0% { transform: scale(1); opacity: 0.8; }
      100% { transform: scale(1.3); opacity: 0; }
    }

    /* Penyesuaian Responsif HP */
    @media (max-width: 640px) {
      .fab-wrapper { bottom: 20px !important; right: 20px !important; }
      .fab-whatsapp { width: 56px !important; height: 56px !important; border-radius: 18px !important; }
      .fab-whatsapp::after { border-radius: 22px !important; }
      .wa-popup-menu { bottom: 76px !important; width: 230px !important; }
      /* Sesuaikan posisi back to top di mobile */
      .fab-back-to-top { width: 44px !important; height: 44px !important; bottom: 72px !important; right: 6px !important; border-radius: 14px !important; }
    }

/* ── Overlay Menu (Mobile) ── */
@media (max-width: 1023px) {
  /* Mengubah card menu menjadi overlay drawer */
  [data-card="menu"] {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    /* Top, Right, Bottom, Left */
    width: 280px !important;
    height: 100dvh !important;
    /* dVH untuk layar mobile */
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    /* Ditambahkan !important agar wajib bergeser keluar layar saat ditutup */
    visibility: hidden !important;
    /* Memastikan drawer benar-benar tidak terlihat saat tertutup */
    pointer-events: none !important;
    /* Menonaktifkan interaksi klik/sentuh saat tertutup */
    border-radius: 0 !important;
    border: none !important;
    background: white !important;
    transition:
      transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0.4s !important;
    overflow-y: auto;
    margin: 0 !important;
    box-shadow: none !important;
  }

  [data-card="menu"].is-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    /* Memunculkan kembali drawer saat kelas .is-open aktif */
    pointer-events: auto !important;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1) !important;
  }

  [data-card="menu"] .card-inner {
    border-radius: 0 !important;
    min-height: 100%;
  }
}

/* FAB Hamburger Menu (Kiri Atas) */
.fab-menu {
  position: fixed;
  top: 24px;
  right: 20px;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: white;
  color: #0f172a;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.fab-menu:active {
  transform: scale(0.95);
}

@media (min-width: 1024px) {
  .fab-menu {
    display: none;
  }
}

/* Sembunyikan di Desktop */

/* Backdrop Gelap Menu */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 995;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.menu-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Animasi Running Text Modern ── */
@keyframes marquee-speed {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee-custom {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee-speed 25s linear infinite;
}

/* Jeda animasi saat di-hover agar mudah dibaca */
.animate-marquee-custom:hover {
  animation-play-state: paused;
}

.subject-table-wrapper {
  margin-top: 2rem;
}

.subject-table-wrapper > * + * {
  margin-top: 3rem;
}

.subject-table-wrapper h4 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 900;
  color: #0f172a;
}

.subject-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  text-align: left;
  font-size: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.subject-table th {
  background: #0f172a;
  padding: 0.75rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.subject-table td {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.75rem;
  transition: background-color 0.2s ease;
}

.subject-table tr:last-child td {
  border-bottom: 0;
}

.subject-table tr:hover td {
  background: rgba(254, 242, 242, 0.5);
}

.badge-acc {
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem;
  background: #ecfdf5;
  padding: 0.25rem 0.5rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.2);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.5rem;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.ukt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.ukt-table th {
  background: #b91c1c;
  color: white;
  padding: 6px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 10px;
}

.ukt-table td {
  padding: 5px 8px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.ukt-table tr:nth-child(even) td {
  background: #fef2f2;
}

.ukt-table tr:hover td {
  background: #fee2e2;
}

.jurusan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.jurusan-table th {
  background: #b91c1c;
  color: white;
  padding: 6px 10px;
  text-align: left;
  font-weight: 700;
}

.jurusan-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.jurusan-table tr:hover td {
  background: #fef2f2;
}

.fakultas-header {
  background: #7f1d1d;
  color: white;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 11px;
}
