/* ========================================
   RSU Jati Husada - Website Publik CSS
   Tema: Modern Biru-Putih
   ======================================== */

:root {
  --primary:    #0056b3;
  --primary-dk: #003d80;
  --primary-lt: #e8f0fb;
  --accent:     #17a2b8;
  --white:      #ffffff;
  --gray-light: #f4f7fc;
  --gray:       #6c757d;
  --text:       #212529;
  --shadow:     0 4px 24px rgba(0,86,179,.10);
  --radius:     12px;
  --transition: .25s ease;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); background: var(--white); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Dropdown Navbar ── */
.navbar-main .dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  padding: .5rem 0;
  margin-top: .5rem;
}
.navbar-main .dropdown-item {
  padding: .55rem 1.25rem;
  font-size: .9rem;
  font-weight: 500;
  color: #333;
  transition: background var(--transition);
}
.navbar-main .dropdown-item:hover { background: var(--primary-lt); color: var(--primary); }
.navbar-main .dropdown-toggle::after { border-top-color: rgba(255,255,255,.8); }

/* ── Navbar ── */
.navbar-main {
  background: var(--primary);
  padding: .75rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  position: sticky; top: 0; z-index: 1030;
}
.navbar-main .navbar-brand { color: var(--white) !important; font-weight: 700; font-size: 1.3rem; }
.navbar-main .navbar-brand small { display: block; font-size: .7rem; font-weight: 400; opacity: .85; }
.navbar-main .nav-link { color: rgba(255,255,255,.88) !important; font-weight: 500; padding: .5rem 1rem !important; border-radius: 6px; transition: background var(--transition); }
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active { background: rgba(255,255,255,.18); color: var(--white) !important; }
.navbar-main .navbar-toggler { border-color: rgba(255,255,255,.4); }
.navbar-main .navbar-toggler-icon { filter: invert(1); }

/* ── Hero Carousel ── */
.hero-carousel { position: relative; }
.hero-slide {
  min-height: 480px;
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 60%, var(--accent) 100%);
  display: flex; align-items: center;
}
.hero-slide img.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .25;
}
.hero-content { position: relative; z-index: 2; color: var(--white); }
.hero-content h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
.hero-content p { font-size: 1.1rem; opacity: .9; }
.carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }

/* ── Section ── */
.section { padding: 5rem 0; }
.section-light { background: var(--gray-light); }
.section-title { font-weight: 700; color: var(--primary-dk); margin-bottom: .5rem; }
.section-subtitle { color: var(--gray); margin-bottom: 2.5rem; }
.section-title::after {
  content: ''; display: block; width: 50px; height: 4px;
  background: var(--accent); border-radius: 2px; margin-top: .5rem;
}

/* ── Cards ── */
.card-rs {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
  height: 100%;
}
.card-rs:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,86,179,.18); }
.card-rs .card-img-top { height: 200px; object-fit: cover; }
.card-rs .card-body { padding: 1.25rem; }
.card-rs .card-category {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  color: var(--accent); letter-spacing: .05em;
}
.card-rs .card-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.4; }
.card-rs .card-text { font-size: .9rem; color: var(--gray); }

/* ── Stat Cards ── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.stat-card .stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .stat-label  { color: var(--gray); font-size: .9rem; margin-top: .25rem; }

/* ── Mitra Kami (logo marquee) ── */
.mitra-marquee-wrap {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
}
.mitra-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: mitraScroll 28s linear infinite;
}
.mitra-marquee-wrap:hover .mitra-marquee-track { animation-play-state: paused; }
.mitra-logo-item {
  flex: 0 0 auto;
  width: 180px;
  height: 130px;
  margin: 0 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.mitra-logo-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.mitra-logo-item img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(35%);
  transition: filter var(--transition), transform var(--transition);
}
.mitra-logo-item:hover img { filter: grayscale(0%); transform: scale(1.06); }
@keyframes mitraScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 768px) {
  .mitra-logo-item { width: 130px; height: 95px; margin: 0 .75rem; padding: .65rem; }
  .mitra-marquee-track { animation-duration: 18s; }
}
@media (prefers-reduced-motion: reduce) {
  .mitra-marquee-track { animation: none; }
  .mitra-marquee-wrap { overflow-x: auto; }
}

/* ── Service Icons ── */
.service-icon-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  border-bottom: 4px solid transparent;
}
.service-icon-box:hover { transform: translateY(-4px); border-bottom-color: var(--primary); }
.service-icon-box .icon {
  width: 72px; height: 72px;
  background: var(--primary-lt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.8rem; color: var(--primary);
}
.service-icon-box h6 { font-weight: 700; color: var(--text); }
.service-icon-box p { font-size: .85rem; color: var(--gray); margin: 0; }

/* ── Jadwal Dokter ── */
.jadwal-table th { background: var(--primary); color: var(--white); font-weight: 600; }
.jadwal-table .hari-badge {
  background: var(--primary-lt); color: var(--primary);
  padding: .25rem .75rem; border-radius: 20px; font-weight: 600; font-size: .85rem;
}

/* ── Kamar Facility ── */
.kamar-card {
  border: none; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.kamar-card:hover { transform: translateY(-4px); }
.kamar-card .kamar-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white); padding: 1.5rem; text-align: center;
}
.kamar-card .kamar-header h4 { font-weight: 700; margin: 0; }
.kamar-card .kamar-header .tarif { font-size: 1.5rem; font-weight: 800; margin-top: .5rem; }
.kamar-card .kamar-body { padding: 1.5rem; }
.kamar-card .kamar-body ul { list-style: none; padding: 0; margin: 0; }
.kamar-card .kamar-body ul li { padding: .35rem 0; color: var(--gray); }
.kamar-card .kamar-body ul li i { color: var(--primary); margin-right: .5rem; }
.tersedia-badge {
  display: inline-block; padding: .3rem .8rem;
  border-radius: 20px; font-size: .8rem; font-weight: 600;
}
.tersedia-badge.ada { background: #d4edda; color: #155724; }
.tersedia-badge.penuh { background: #f8d7da; color: #721c24; }

/* ── Kontak Form ── */
.kontak-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2rem;
}
.kontak-info-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.kontak-info-item .info-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

/* ── Article Detail ── */
.article-hero {
  background: linear-gradient(to bottom, var(--primary-dk), var(--primary));
  color: var(--white); padding: 4rem 0 3rem;
}
.article-body { font-size: 1.05rem; line-height: 1.85; color: #333; }
.article-body h2, .article-body h3 { color: var(--primary-dk); margin-top: 2rem; }
.article-body img { border-radius: 8px; margin: 1rem 0; }
.article-thumbnail { border-radius: var(--radius); width: 100%; max-height: 400px; object-fit: cover; }

/* ── Breadcrumb ── */
.breadcrumb-rs { background: var(--primary-lt); padding: .75rem 0; border-bottom: 1px solid #dce8f7; }
.breadcrumb-rs .breadcrumb { margin: 0; }
.breadcrumb-rs .breadcrumb-item a { color: var(--primary); }
.breadcrumb-rs .breadcrumb-item.active { color: var(--gray); }

/* ── Footer ── */
.footer {
  background: var(--primary-dk);
  color: rgba(255,255,255,.85);
  padding: 3rem 0 0;
}
.footer h5 { color: var(--white); font-weight: 700; margin-bottom: 1.25rem; }
.footer a { color: rgba(255,255,255,.75); }
.footer a:hover { color: var(--white); }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: .5rem; }
.footer-bottom {
  background: rgba(0,0,0,.2); padding: 1rem 0;
  text-align: center; font-size: .85rem; margin-top: 2.5rem;
}
.footer-social a {
  display: inline-flex; width: 36px; height: 36px;
  background: rgba(255,255,255,.12); border-radius: 50%;
  align-items: center; justify-content: center;
  color: var(--white) !important; margin: 0 4px;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--accent); }

/* ── Buttons ── */
.btn-primary-rs {
  background: var(--primary); color: var(--white);
  border: none; border-radius: 8px; padding: .6rem 1.5rem;
  font-weight: 600; transition: all var(--transition);
}
.btn-primary-rs:hover { background: var(--primary-dk); color: var(--white); transform: translateY(-1px); }
.btn-outline-rs {
  border: 2px solid var(--primary); color: var(--primary);
  border-radius: 8px; padding: .6rem 1.5rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-outline-rs:hover { background: var(--primary); color: var(--white); }

/* ── FAQ Accordion ── */
.accordion-item { border: none; margin-bottom: .5rem; box-shadow: var(--shadow); border-radius: var(--radius) !important; overflow: hidden; }
.accordion-button { font-weight: 600; }
.accordion-button:not(.collapsed) { background: var(--primary-lt); color: var(--primary); }

/* ── Promosi Banner ── */
.promo-badge { position: absolute; top: 12px; right: 12px; background: var(--accent); color: var(--white); padding: .2rem .7rem; border-radius: 20px; font-size: .75rem; font-weight: 700; }

/* ── Utilities ── */
.text-primary-rs { color: var(--primary) !important; }
.bg-primary-rs   { background: var(--primary) !important; }
.bg-light-rs     { background: var(--gray-light) !important; }
.rounded-rs      { border-radius: var(--radius) !important; }
.shadow-rs       { box-shadow: var(--shadow) !important; }
.fw-700          { font-weight: 700; }

/* WhatsApp Floating Button */
.wa-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; z-index: 1000;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  text-decoration: none;
  animation: waPulse 2.2s infinite;
  transition: transform var(--transition), background var(--transition);
}
.wa-float:hover { background: #1ebe57; color: #fff; transform: scale(1.08); text-decoration: none; }
@keyframes waPulse {
  0%   { box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 0 rgba(37,211,102,.55); }
  70%  { box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 0 rgba(37,211,102,0); }
}

/* Scroll top btn */
#scrollTop {
  position: fixed; bottom: 1.5rem; right: 5.5rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  border: none; font-size: 1.2rem;
  display: none; z-index: 999;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  transition: opacity var(--transition);
}
#scrollTop.show { display: flex; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-slide { min-height: 320px; }
  .section { padding: 3rem 0; }
  .stat-card .stat-number { font-size: 1.8rem; }
  .wa-float {
    width: 50px; height: 50px; font-size: 1.5rem;
    bottom: 1rem; right: 1rem;
  }
  #scrollTop {
    width: 40px; height: 40px; font-size: 1.05rem;
    bottom: 1rem; right: 4.5rem;
  }
}

/* ── Peta Lokasi embed ── */
#peta-lokasi iframe {
  width: 100% !important;
  height: 400px !important;
  border: 0;
  display: block;
}

/* ── Link kartu hover ── */
.mitra-link-card {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mitra-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13) !important;
  border-color: var(--primary) !important;
  text-decoration: none;
}
