:root {
  --bg-dark-premium: #030a16;
  --bg-card-dark: rgba(9, 24, 48, 0.6);
  --border-card: rgba(255, 255, 255, 0.08);
  --accent-blue: #0d6efd;
  --accent-cyan: #00f2fe;
  --text-muted-custom: #a0aec0;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-dark-premium);
  color: #ffffff;
  overflow-x: hidden;
}

/* Hero Section Gradient Background */
.hero-section {
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(13, 110, 253, 0.15),
      transparent 40%
    ),
    radial-gradient(
      circle at 20% 50%,
      rgba(0, 242, 254, 0.05),
      transparent 50%
    ),
    var(--bg-dark-premium);
  padding-top: 100px;
  padding-bottom: 60px;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(13, 110, 253, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Custom Badges & Text */
.text-cyan {
  color: var(--accent-cyan);
}

.text-muted-custom {
  color: var(--text-muted-custom);
}

.btn-outline-custom {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: transparent;
}
.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Date Badge for News */
.date-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(13, 110, 253, 0.9);
  backdrop-filter: blur(5px);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  z-index: 10;
}

/* Light mode variables */
body.light-mode {
  --bg-dark-premium: #f8fafc;
  --bg-card-dark: rgba(255, 255, 255, 0.9);
  --border-card: rgba(2, 6, 23, 0.06);
  --accent-blue: #0d6efd;
  --accent-cyan: #0ea5e9;
  --text-muted-custom: #6b7280;
  color: #0b1220;
  background-color: var(--bg-dark-premium);
}

/* Navbar: start transparent over hero, become fixed/opaque on scroll */
.navbar-sticky {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: transparent;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    position 0.1s;
}

.navbar-sticky.scrolled {
  position: fixed;
  background: rgba(2, 6, 23, 0.6);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.3);
}

/* When light-mode is active adjust navbar look */
body.light-mode .navbar-sticky.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}

/* News card image and content layout so footers align */
.news-card-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
  display: block;
}

.card-content-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Ensure glass cards layout supports sticky footers */
.glass-card {
  display: flex;
  flex-direction: column;
}

.glass-card > img,
.glass-card img.object-fit-cover {
  flex: 0 0 auto;
}

.card-content-col {
  flex: 1 1 auto;
}

.card-footer {
  padding-top: 0.5rem;
}

.card-content-col .read-more {
  margin-top: auto;
}

/* Gallery */
.galeri-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.galeri-item {
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.galeri-item img {
  display: block;
  width: 100%;
  height: 200px;
}

.galeri-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  top: auto;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.45));
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-gallery {
  width: min(100%, 540px);
  height: 420px;
}

.hero-img {
  position: absolute;
  overflow: hidden;
  border-radius: 30px;
  animation: floatY 8s ease-in-out infinite;
  transform: translateY(0) rotate(var(--rotate));
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-img:hover img {
  transform: scale(1.03);
}

.hero-img-1 {
  --rotate: -2deg;
  top: 0;
  left: 0;
  width: 60%;
  height: 58%;
  animation-delay: 0s;
}

.hero-img-2 {
  --rotate: 2deg;
  top: 8%;
  right: 0;
  width: 50%;
  height: 55%;
  animation-delay: 1.2s;
}

.hero-img-3 {
  --rotate: -1deg;
  bottom: 0;
  left: 18%;
  width: 65%;
  height: 55%;
  animation-delay: 2.3s;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0) rotate(var(--rotate));
  }
  50% {
    transform: translateY(-10px) rotate(var(--rotate));
  }
}

body.light-mode .galeri-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.9)
  );
  color: #0b1220;
}

/* Ensure text colors flip appropriately in light mode */
body.light-mode .text-white {
  color: #0b1220 !important;
}
body.light-mode .text-muted-custom {
  color: var(--text-muted-custom) !important;
}
body.light-mode .btn-outline-custom {
  border-color: rgba(2, 6, 23, 0.06);
  color: #0b1220;
}
body.light-mode .badge {
  color: inherit;
}
body.light-mode .glass-card {
  background: var(--bg-card-dark);
  border-color: var(--border-card);
}
.card-meta {
  color: var(--text-muted-custom);
}
body.light-mode .navbar .nav-link {
  color: rgba(11, 18, 32, 0.85);
}
body.light-mode .navbar .navbar-brand span,
body.light-mode .navbar .navbar-brand small {
  color: #0b1220;
}
body.light-mode .btn-primary {
  color: #fff;
}

.card-meta {
  opacity: 0.9;
}

/* Page layout for gallery/news pages */
body.page-body {
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.14), transparent 32%),
    linear-gradient(135deg, #030a16 0%, #071426 100%);
  color: #f8fafc;
}

.page-hero {
  padding: 120px 0 70px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.2), transparent 70%);
  pointer-events: none;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.16);
  color: #8fd2ff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-hero-card,
.page-card,
.sidebar-card {
  background: rgba(9, 24, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.page-hero-card img,
.page-card img,
.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero-card {
  min-height: 330px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.page-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.28);
}

.page-card img {
  height: 230px;
}

.page-card-body {
  padding: 1.2rem 1.2rem 1.4rem;
}

.page-card-meta {
  color: #7dd3fc;
  font-size: 0.85rem;
  font-weight: 600;
}

.detail-link {
  color: #8fd2ff;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.detail-link:hover {
  color: #ffffff;
}

.page-detail {
  padding-top: 110px;
}

.detail-image {
  border-radius: 24px;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-info {
  padding: 0.25rem 0.2rem 0.5rem;
}

.sidebar-card {
  padding: 1.25rem;
  position: sticky;
  top: 92px;
}

.news-list {
  display: grid;
  gap: 0.75rem;
}

.news-item {
  display: block;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.quote-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.16), rgba(0, 242, 254, 0.12));
  border: 1px solid rgba(143, 210, 255, 0.2);
  color: #e6f3ff;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive layout */
@media (max-width: 992px) {
  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding-top: 100px;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-card {
    min-height: 250px;
  }

  .detail-image {
    min-height: 260px;
  }
}

body.light-mode .page-hero-card,
body.light-mode .page-card,
body.light-mode .sidebar-card {
  background: rgba(255, 255, 255, 0.92);
  color: #0b1220;
  border-color: rgba(2, 6, 23, 0.08);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.08);
}

body.light-mode .page-card-meta,
body.light-mode .detail-link,
body.light-mode .section-tag {
  color: #0d6efd;
}

body.light-mode .text-muted-custom {
  color: #6b7280 !important;
}

body.light-mode .quote-box {
  color: #0f172a;
}

/* Footer Customization */
footer {
  /* background-color: #020710; */
  border-top: 1px solid var(--border-card);
}
