@import url("https://fonts.googleapis.com/css2?family=Karma:wght@300;400;500;600;700&family=Playfair+Display+SC:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-margin-top: 5rem;
}

:root {
  --fontXL: 4rem;
  --fontL: 2rem;
  --fontB: 1.5rem;
  --fontMM: 1.2rem;
  --fontM: 1rem;
  --fontS: 0.85rem;
  --primary-color: #133e87;
  --secondary-color: #608bc1;
  --third-color: #cbdceb;
  --light-color: #f3f3e0;
  --white-color: #ffffff;
  --primary-transparent: #133e8782;
  --accent-color: #608bc1;
  --gradient-primary: linear-gradient(135deg, #133e87 0%, #608bc1 100%);
  --gradient-secondary: linear-gradient(135deg, #608bc1 0%, #cbdceb 100%);
  --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);
}

body {
  font-family: "Karma", serif;
  line-height: 1.6;
  color: var(--primary-color);
  background: var(--light-color);
}

/* Base typography for general text */
body,
p,
li,
a,
span,
small,
label,
input,
textarea,
button,
figcaption {
  font-family: "Karma", serif;
}

/* Preserve display fonts for primary elements */
h1,
h2,
h3,
h4,
h5,
h6,
.nav-link,
.back-btn,
.hero h1,
.badge,
.footer {
  font-family: "Playfair Display SC", serif;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(19, 62, 135, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-logo i {
  font-size: 1.5rem;
  color: var(--accent-color);
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.nav-link i {
  font-size: 1.2rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
  background: rgba(34, 163, 42, 0.1);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle .bar {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

/* overlay used for off-canvas menu */
#navOverlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 23, 67, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 1100;
}
#navOverlay.show {
  opacity: 1;
  visibility: visible;
}
/* Back Button */
.back-btn {
  position: fixed;
  top: 90px;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--white-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 25px;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  z-index: 100;
  font-weight: 600;
}

.back-btn:hover {
  transform: translateX(-5px);
  box-shadow: var(--shadow-heavy);
  background: var(--primary-color);
  color: var(--white-color);
}
/* Search */
.search-container {
  position: relative;
  max-width: 420px;
  flex: 1;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 24px;
  padding: 8px 12px;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
}
.search-bar button {
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: none;
  max-height: 300px;
  overflow: auto;
  z-index: 1001;
}
.search-results.active {
  display: block;
}
.search-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
}
.search-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Hero */
.hero {
  margin-top: 70px;
  background: linear-gradient(rgba(19, 62, 135, 0.6), rgba(19, 62, 135, 0.3)),
    url("../IMG/Layanan.jpeg") center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 70px 16px;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}
.hero p {
  opacity: 0.95;
}

/* Layout */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 24px;
}
.section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 16px;
}
.section h2 {
  color: var(--primary);
  margin-bottom: 10px;
}

/* ======= Gorgeous Slideshow Gallery ======= */
.gallery {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  position: relative;
}
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--gradient-secondary);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(19, 62, 135, 0.13);
  overflow: hidden;
  padding: 18px 0 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.slide-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}
.slide-img {
  width: 100%;
  max-width: 520px;
  height: 300px;
  object-fit: contain;
  background: #e6eef7;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(19, 62, 135, 0.1);
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}
.slide-img:focus {
  outline: 2px solid var(--accent-color);
}
.slide-img:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 8px 32px rgba(34, 163, 42, 0.13);
}
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0.85;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(19, 62, 135, 0.1);
}
.slide-btn.left {
  left: 12px;
}
.slide-btn.right {
  right: 12px;
}
.slide-btn:hover {
  background: var(--accent-color);
  transform: translateY(-50%) scale(1.08);
}
.slide-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--third-color);
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  display: inline-block;
}
.dot.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px #22a32a33;
}

/* Zoom Overlay */
.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(19, 62, 135, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.zoom-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.zoom-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 18px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.25);
  border: 4px solid var(--white-color);
  animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.close-zoom {
  position: absolute;
  top: 40px;
  right: 60px;
  font-size: 2.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, color 0.2s;
}
.close-zoom:hover {
  background: #fff;
  color: var(--accent-color);
}

@media (max-width: 700px) {
  .slideshow-container {
    max-width: 98vw;
    padding: 8px 0 18px 0;
  }
  .slide-img {
    max-width: 95vw;
    height: 180px;
  }
  .zoom-img {
    max-width: 98vw;
    max-height: 60vh;
  }
  .close-zoom {
    top: 18px;
    right: 18px;
    font-size: 2rem;
    width: 38px;
    height: 38px;
  }
}

/* Desktop image widening for fasilitas pages */
@media (min-width: 1200px) {
  .slideshow-container {
    max-width: 1000px;
    padding: 20px 0 32px 0;
  }
  .slide-img {
    height: 520px;
    max-width: 980px;
    object-fit: cover;
  }

  .location-map {
    height: 360px;
  }

  .info-card .gallery {
    min-height: 420px;
  }
}

/* Aside */
.aside {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.info-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 16px;
}
.info-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--secondary);
  color: #000000;
  font-weight: 700;
  font-size: 1.85rem;
}
.location-map {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  border: none;
}

/* Footer */
.footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 18px;
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-container {
    gap: 10px;
  }
  .main {
    grid-template-columns: 1fr;
  }
  .search-container {
    display: none;
  }

  /* off-canvas menu from the right */
  .nav-menu {
    position: fixed;
    top: 76px;
    right: 12px;
    height: calc(100vh - 92px);
    width: min(360px, 82vw);
    background: linear-gradient(
      180deg,
      rgba(19, 62, 135, 0.98),
      rgba(96, 139, 193, 0.96)
    );
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    transform: translateX(110%);
    transition: transform 320ms cubic-bezier(0.2, 0.9, 0.25, 1);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(6, 23, 67, 0.28);
    z-index: 1150;
    align-items: stretch;
  }
  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }
  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: rgba(11, 42, 102, 0.95);
  }
  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background: rgba(11, 42, 102, 0.95);
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 1.02rem;
  }
}

/* Ultra desktop: 1920 - 2560 */
@media (min-width: 1920px) and (max-width: 2560px) {
  .slideshow-container {
    max-width: 1600px;
    padding: 28px 0 40px 0;
  }
  .slide-img {
    height: 900px;
    max-width: 1500px;
    object-fit: cover;
  }

  .location-map {
    height: 520px;
  }

  .gallery {
    min-height: 700px;
  }
}
