:root {
  --primary: #2563eb;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --dark: #0f172a;
  --text: #1f2933;
  --muted: #6b7280;
  --bg: #f3f4f6;
  --radius-lg: 20px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== NAVBAR ========== */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(248, 250, 252, 0.9);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.3);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Logo teks (kalau dipakai) */
.logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #93c5fd, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

/* Logo gambar (logo.png) */
.logo-img,
.nav-left img {
  width: 32px;
  height: 32px;
  max-width: 32px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.school-name {
  display: flex;
  flex-direction: column;
}

.school-name span:first-child {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.school-name span:last-child {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--muted);
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.25s ease;
}

.nav-menu a:hover {
  color: var(--dark);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.6);
}

.nav-toggle {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ========== HERO / BERANDA ========== */

.hero {
  max-width: 1120px;
  margin: 1.3rem auto 2rem;
  padding: 1.5rem 1rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.hero-left {
  padding: 0.5rem 0;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.hero-pill span.badge {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: white;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(148, 163, 184, 0.6);
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.hero-title span.highlight {
  background: linear-gradient(120deg, #2563eb, #4f46e5, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 1.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.btn-primary,
.btn-ghost {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.75);
}

.btn-ghost {
  border: 1px solid #e5e7eb;
  background: white;
  color: var(--text);
}

.btn-ghost:hover {
  background: #e5e7eb;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat span:first-child {
  font-weight: 700;
  color: var(--dark);
  font-size: 1.1rem;
}

.hero-stat span:last-child {
  color: var(--muted);
}

.hero-right {
  position: relative;
}

.hero-card {
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  background: radial-gradient(circle at top left, #e0f2fe, #eef2ff, #fef3c7);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-card-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.hero-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  font-size: 0.78rem;
}

.hero-card-item {
  padding: 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-card-item span.label {
  font-size: 0.7rem;
  color: var(--muted);
}

.hero-card-item span.value {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.85rem;
}

.hero-badge-floating {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 120px;
  height: 120px;
  border-radius: 40px;
  background: radial-gradient(circle at 30% 10%, #bfdbfe, #4f46e5);
  opacity: 0.8;
  filter: blur(2px);
}

/* ========== GENERIC SECTION ========== */

section {
  padding: 2rem 1rem;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.4rem;
}

.section-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 600;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 560px;
}

/* ========== PROFIL ========== */

#profil .content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: flex-start;
}

#profil .card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  color: var(--muted);
}

#profil .card strong {
  color: var(--dark);
}

.profil-list {
  list-style: none;
  margin-top: 0.8rem;
}

.profil-list li {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.profil-list li::before {
  content: "•";
  color: var(--primary);
  margin-top: 0.05rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  font-size: 0.8rem;
}

.info-item {
  background: white;
  border-radius: 14px;
  padding: 0.7rem;
  border: 1px solid #e5e7eb;
}

.info-item span.label {
  font-size: 0.7rem;
  color: var(--muted);
}

.info-item span.value {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

/* ========== KEUNGGULAN ========== */

#keunggulan .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.25);
  font-size: 0.85rem;
}

.feature-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.feature-card span.icon {
  font-size: 1.3rem;
  display: inline-block;
  margin-bottom: 0.3rem;
}

/* ========== PROGRAM ========== */

#program {
  background: white;
}

#program .cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  font-size: 0.85rem;
}

.program-card {
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.program-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--dark);
}

.program-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.tag {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 0.7rem;
  color: #4b5563;
  margin-right: 0.2rem;
  margin-top: 0.1rem;
}

/* ========== BERITA (3 KARTU DI BERANDA) ========== */

#berita .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  font-size: 0.85rem;
}

.news-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
}

.news-image {
  height: 120px;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5, #f97316);
}

.news-body {
  padding: 0.8rem 0.9rem 0.9rem;
}

.news-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.news-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.news-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ========== GALERI ========== */

#galeri .grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  height: 90px;
}

/* ========== LAYANAN DIGITAL ========== */

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.quick-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.85rem;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quick-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.quick-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.quick-card a {
  align-self: flex-start;
}

/* ========== KONTAK ========== */

#kontak {
  background: #0f172a;
  color: #e5e7eb;
}

#kontak .section-title {
  color: white;
}

#kontak .section-subtitle {
  color: #9ca3af;
}

.kontak-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.kontak-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.8);
  font-size: 0.85rem;
}

.kontak-row {
  margin-bottom: 0.6rem;
}

.kontak-row span.label {
  font-size: 0.75rem;
  color: #9ca3af;
}

.kontak-row span.value {
  font-size: 0.9rem;
  font-weight: 500;
}

.kontak-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 220px;
  background: #020617;
  border: 1px solid #1f2937;
}

/* ========== FOOTER ========== */

footer {
  padding: 0.8rem 1rem 1.3rem;
  background: #020617;
  color: #9ca3af;
  font-size: 0.75rem;
}

footer .inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

/* ========== HALAMAN BERITA PENUH (berita.php) ========== */

.news-list {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.news-main {
  display: grid;
  gap: 1rem;
}

.news-item {
  background: white;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.3);
}

.news-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--dark);
}

.news-item .meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.news-item p {
  font-size: 0.85rem;
  color: var(--muted);
}

.news-sidebar {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.25);
  font-size: 0.85rem;
}

.news-sidebar h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.news-sidebar ul {
  list-style: none;
  padding-left: 0;
}

.news-sidebar li {
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.news-sidebar a {
  color: var(--primary);
}

/* ========== HALAMAN GURU – KARTU DENGAN FOTO (guru.php) ========== */

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.teacher-card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.35);
  padding: 1rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
  border: 1px solid #e5e7eb;
}

.teacher-photo-wrapper {
  margin-bottom: 0.6rem;
}

.teacher-photo {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  box-shadow: 0 6px 16px rgba(148,163,184,0.8);
}

.teacher-photo-fallback {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 10%, #93c5fd, #1d4ed8);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(37,99,235,0.8);
}

.teacher-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: #0f172a;
}

.teacher-role {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.1rem;
  margin-bottom: 0.4rem;
}

.teacher-meta {
  font-size: 0.78rem;
  color: #4b5563;
  margin-bottom: 0.2rem;
}

.teacher-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-right: 0.2rem;
}

/* badge mapel dipakai di beberapa tempat */
.badge-mapel {
  display: inline-flex;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 0.75rem;
}

/* TABEL GURU (kalau masih dipakai di admin/guru.php lama) */
.teacher-table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

.teacher-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.teacher-table thead {
  background: #eff6ff;
}

.teacher-table th,
.teacher-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

/* ========== EFEK BLUR SAAT MENU MOBILE TERBUKA ========== */

body.menu-open main,
body.menu-open footer {
  filter: blur(4px);
  pointer-events: none;
  transition: filter 0.2s ease;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  #profil .content {
    grid-template-columns: minmax(0, 1fr);
  }

  #keunggulan .grid,
  #program .cards,
  #berita .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #galeri .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kontak-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .teacher-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-menu {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    padding: 0.7rem 1rem 0.9rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    border-bottom: 1px solid #e5e7eb;
    display: none;
    z-index: 40;
  }

  .nav-menu.open {
    display: flex;
  }

  /* Menu mobile rata kiri & full lebar */
  .nav-menu a {
    width: 100%;
    text-align: left;
    padding: 0.25rem 0;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  #keunggulan .grid,
  #program .cards,
  #berita .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #galeri .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    margin-top: 1rem;
  }

  .teacher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .teacher-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ===== GALERI SLIDER (Suasana Kegiatan Madrasah) ===== */
/* GALERI – tinggi dibatasi agar tidak terlalu besar */
.gallery-slider{
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0f172a;
  height: 300px;                     /* BATAS TINGGI DESKTOP */
  box-shadow: 0 18px 40px rgba(15,23,42,.25);
  border: 1px solid rgba(229,231,235,.9);
}


.gallery-slider .slide{
  position:absolute;
  inset:0;
  opacity:0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 1.2s ease;
}

.gallery-slider .slide.active{
  opacity:1;
  transform: scale(1);
}

/* GAMBAR GALERI – tampil utuh, tidak kepotong */
.gallery-slider img{
  width: 100%;
  height: 100%;
  object-fit: contain;               /* PENTING: gambar UTUH */
  display: block;
  padding: 14px;                     /* biar tidak nempel */
  background: transparent;
  filter: none;
}


.gallery-slider::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(2,6,23,.05), rgba(2,6,23,.55));
  pointer-events:none;
}

.gbtn{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:44px;height:44px;border-radius:999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(15,23,42,.35);
  backdrop-filter: blur(10px);
  color:#fff;
  font-size: 28px;
  line-height: 0;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition: transform .15s ease, background .15s ease;
  z-index:3;
}
.gbtn:hover{background: rgba(15,23,42,.55); transform: translateY(-50%) scale(1.04);}
.gbtn.prev{left:10px;}
.gbtn.next{right:10px;}

.gallery-dots{
  display:flex;
  gap:6px;
  justify-content:center;
  margin-top:10px;
  flex-wrap:wrap;
}
.gallery-dots button{
  width:8px;height:8px;border-radius:999px;border:0;
  background:#cbd5e1;
  opacity:.7;
  cursor:pointer;
}
.gallery-dots button.active{
  width:22px;
  opacity:1;
  background: linear-gradient(90deg,#2563eb,#f59e0b);
}

@media(max-width:520px){
  .gbtn{width:40px;height:40px;font-size:26px;}
}

/* RESPONSIVE GALERI */
@media (max-width: 900px){
  .gallery-slider{
    height: 240px;
  }
}

@media (max-width: 520px){
  .gallery-slider{
    height: 200px;
  }
  .gallery-slider img{
    padding: 10px;
  }
}

/* ===== 3 BERITA TERBARU DI BERANDA ===== */
.home-news-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-news-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 14px 32px rgba(148,163,184,.25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-news-card:hover{
  transform: translateY(-4px);
  box-shadow:0 18px 40px rgba(148,163,184,.38);
}

/* Thumbnail: kecil + gambar utuh */
.home-news-thumb{
  height: 130px;
  background:#f8fafc;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid #e5e7eb;
}
.home-news-thumb img{
  width:100%;
  height:100%;
  object-fit: contain;  /* tampil utuh */
  padding: 10px;
}
.home-news-thumb-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  color:#6b7280;
  background: linear-gradient(135deg,#1d4ed8,#4f46e5,#f97316);
  opacity:.85;
}

.home-news-body{ padding: 12px; }
.home-news-meta{ font-size:.75rem; color:#6b7280; margin-bottom:6px; }
.home-news-title{ font-size:.95rem; font-weight:700; color:#0f172a; line-height:1.25; margin-bottom:6px; }
.home-news-desc{ font-size:.83rem; color:#4b5563; line-height:1.6; }

.home-news-btn{
  margin-top:10px;
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:linear-gradient(135deg,#2563eb,#4f46e5);
  color:#fff;
  font-weight:800;
  font-size:.82rem;
}

@media(max-width:900px){
  .home-news-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media(max-width:520px){
  .home-news-grid{ grid-template-columns: minmax(0,1fr); }
  .home-news-thumb{ height: 160px; }
}


