/* ==========================================================================
   Tema Ilkom — Program Studi Ilmu Komunikasi UAD Aceh
   Pelengkap Tailwind (utility-first). Isi file ini hanya yang sulit/boros
   bila ditulis sebagai kelas utility berulang.
   Palet: brand (biru elektrik) + gold (kuning cerah) — nuansa komunikasi/media.
   ========================================================================== */

:root {
  /* Palet: biru elektrik (utama) + kuning cerah (aksen) — nuansa komunikasi/media */
  --brand-950: #132052;
  --brand-900: #1e2f87;
  --brand-700: #1d3ad4;
  --brand-600: #2549e8;
  --gold-500: #facc15;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 1rem;
}

/* ---------- Tipografi konten (Quill / halaman statis) --------------------- */
.prose-content { color: #334155; line-height: 1.8; }
.prose-content > * + * { margin-top: .95em; }
.prose-content h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.prose-content h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.015em; color: var(--ink); margin-top: 1.7em; }
.prose-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-top: 1.4em; }
.prose-content h4 { font-size: 1rem; font-weight: 700; color: var(--ink); }
.prose-content a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }
.prose-content a:hover { color: var(--brand-700); }
.prose-content ul { list-style: disc; padding-left: 1.4em; }
.prose-content ol { list-style: decimal; padding-left: 1.4em; }
.prose-content li { margin: .35em 0; }
.prose-content li::marker { color: var(--brand-600); }
.prose-content blockquote {
  border-left: 4px solid var(--gold-500);
  background: #f8fafc;
  padding: .75em 1.1em;
  border-radius: 0 .75rem .75rem 0;
  color: #475569;
  font-style: italic;
}
.prose-content img { border-radius: .85rem; max-width: 100%; height: auto; margin: 1.4em 0; }
.prose-content table { width: 100%; border-collapse: collapse; font-size: .9em; }
.prose-content th, .prose-content td { border: 1px solid var(--line); padding: .5em .7em; text-align: left; }
.prose-content th { background: #f1f5f9; font-weight: 700; color: var(--ink); }
.prose-content pre { background: #0f172a; color: #e2e8f0; padding: 1em; border-radius: .7rem; overflow: auto; font-size: .85em; }
.prose-content code { background: #f1f5f9; padding: .15em .4em; border-radius: .3em; font-size: .88em; }
.prose-content pre code { background: transparent; padding: 0; }
.prose-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---------- Marquee pengumuman ------------------------------------------- */
.marquee-track { display: inline-flex; gap: 3rem; white-space: nowrap; animation: marquee 32s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Section: hero gambar ---------------------------------------- */
.sec-hero {
  position: relative;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  background-color: var(--brand-900);
}
.sec-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(19, 32, 82, .95) 0%, rgba(30, 47, 135, .88) 45%, rgba(37, 73, 232, .38) 100%);
}
.sec-hero > .inner { position: relative; z-index: 1; width: 100%; }

/* Tekstur garis diagonal halus untuk hero warna */
.sec-hero-warna {
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(250, 204, 21, .30), transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(96, 137, 255, .45), transparent 46%),
    linear-gradient(135deg, #132052 0%, #1e2f87 45%, #2549e8 100%);
}
.sec-hero-warna::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px);
  pointer-events: none;
}

/* ---------- Kartu section ----------------------------------------------- */
.sec-kartu {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sec-kartu:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 16px 32px -20px rgba(19, 32, 82, .35); }

.sec-ikon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: .85rem;
  background: #eff4ff;  /* biru sangat muda */
  font-size: 1.35rem;
  line-height: 1;
}

/* ---------- Profil kartu (dosen/struktur) ------------------------------- */
.sec-profil-foto {
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  object-fit: cover;
  margin-inline: auto;
  border: 3px solid #eff4ff;
  box-shadow: 0 10px 24px -14px rgba(19, 32, 82, .5);
}
.sec-profil-kosong {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
}

/* ---------- Statistik --------------------------------------------------- */
.sec-statistik { position: relative; overflow: hidden; background: var(--brand-950); }
.sec-statistik::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 10%, rgba(250,204,21,.20), transparent 45%),
                    radial-gradient(circle at 85% 90%, rgba(37,73,232,.65), transparent 52%);
}

/* ---------- Timeline ---------------------------------------------------- */
.sec-timeline { position: relative; padding-left: 1.75rem; border-left: 2px solid #cbd5e1; }
.sec-timeline-item { position: relative; padding-bottom: 1.75rem; }
.sec-timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem - 7px);
  top: .3rem;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px #fff;
}

/* ---------- Galeri ------------------------------------------------------ */
.galeri-grid { display: grid; gap: .9rem; }
.galeri-grid.kolom-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.galeri-grid.kolom-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.galeri-grid.kolom-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .galeri-grid.kolom-3, .galeri-grid.kolom-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .galeri-grid.kolom-2, .galeri-grid.kolom-3, .galeri-grid.kolom-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.galeri-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: .85rem;
  background: #f1f5f9;
  aspect-ratio: 4 / 3;
}
.galeri-grid.layout-masonry .galeri-item { aspect-ratio: auto; }
.galeri-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.galeri-item:hover img { transform: scale(1.05); }
.galeri-keterangan {
  position: absolute;
  inset: auto 0 0 0;
  padding: .55rem .7rem;
  font-size: .72rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(19, 32, 82, .85));
  opacity: 0;
  transition: opacity .2s ease;
}
.galeri-item:hover .galeri-keterangan { opacity: 1; }

/* ---------- Artikel ----------------------------------------------------- */
.artikel-isi { line-height: 1.85; }
.artikel-isi > * + * { margin-top: 1em; }
.artikel-isi h2 { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin-top: 1.8em; }
.artikel-isi h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-top: 1.5em; }
.artikel-isi ul { list-style: disc; padding-left: 1.4em; }
.artikel-isi ol { list-style: decimal; padding-left: 1.4em; }
.artikel-isi a { color: var(--brand-600); text-decoration: underline; }
.artikel-isi blockquote {
  border-left: 4px solid var(--gold-500);
  padding-left: 1rem;
  color: #475569;
  font-style: italic;
}

/* ---------- Kartu berita ------------------------------------------------ */
.kartu-berita { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .18s ease, transform .18s ease; }
.kartu-berita:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -24px rgba(19, 32, 82, .5); }
.kartu-berita-foto { aspect-ratio: 16 / 10; background: #eff4ff; overflow: hidden; }
.kartu-berita-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.kartu-berita:hover .kartu-berita-foto img { transform: scale(1.04); }

/* ---------- Chips / pills ---------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 9999px;
  background: #eff4ff;
  color: var(--brand-700);
  font-size: .7rem;
  font-weight: 700;
  padding: .22rem .6rem;
  letter-spacing: .01em;
}

/* ---------- Tabel dalam konten halaman --------------------------------- */
.tabel-kurikulum { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tabel-kurikulum thead { background: var(--brand-900); color: #fff; }
.tabel-kurikulum th, .tabel-kurikulum td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabel-kurikulum tbody tr:nth-child(even) { background: #f8fafc; }
.tabel-kurikulum tfoot { background: #eff4ff; font-weight: 700; color: var(--brand-900); }

/* ---------- Pagination -------------------------------------------------- */
.pager { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: 2.5rem; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 .65rem;
  border-radius: .65rem; border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: #475569; background: #fff;
}
.pager a:hover { border-color: var(--brand-600); color: var(--brand-700); }
.pager .aktif { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* ---------- Aksesibilitas ---------------------------------------------- */
:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

/* Gambar tata letak dari editor (kelas dari _article_image_css.html) tetap
   dipakai; di layar kecil semua gambar menjadi lebar penuh. */
@media (max-width: 640px) {
  .artikel-isi img[class*="ukuran-"],
  .prose-content img[class*="ukuran-"] { width: 100% !important; float: none !important; margin-inline: 0 !important; }
}

/* ---------- Section berlatar gambar (teks tetap terbaca) ----------------- */
.sec-berlatar-gambar {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
}
.sec-berlatar-gambar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 32, 82, .90) 0%, rgba(30, 47, 135, .82) 60%, rgba(19, 32, 82, .92) 100%);
  z-index: 0;
}
@media (max-width: 900px) {
  /* background-attachment fixed tidak nyaman di ponsel */
  .sec-berlatar-gambar { background-attachment: scroll; }
}
.sec-berlatar-gambar .sec-kartu {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(255, 255, 255, .30);
}

/* ---------- Pita gambar (galeri ringkas) --------------------------------- */
.pita-gambar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.pita-gambar img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .6rem; }
@media (max-width: 900px) { .pita-gambar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Hero bergambar: pastikan teks di atas overlay ---------------- */
.sec-hero.min-h-\[34vh\], .sec-hero.min-h-\[32vh\] { align-items: center; }

/* ---------- CTA dengan gambar latar --------------------------------------
   Overlay dibuat gradasi agar foto tetap terlihat, tetapi teks putih tetap
   terbaca (kontras terjaga). Tanpa gambar, section memakai gradasi warna. */
.cta-overlay-gambar {
  background:
    linear-gradient(100deg, rgba(19, 32, 82, .92) 0%, rgba(19, 32, 82, .72) 45%, rgba(37, 73, 232, .45) 100%);
}
.cta-overlay-gambar::after {
  /* lapisan gelap ekstra di belakang teks agar kontras tetap tinggi */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(19, 32, 82, .55) 0%, rgba(19, 32, 82, .10) 70%);
}
