/* =====================================
   VARIABLES & THEMES
   ===================================== */
:root {
  /* --gold-accent: #ffd700; */
  --gold-accent: #0051ff;
}

[data-bs-theme="light"] {
  /* --gold-accent: #b28c00; */
  --gold-accent: #004196;
  --bs-body-bg: #fff;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #2f2f2f;
}

/* =====================================
   BASE STYLES
   ===================================== */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--bs-body-color);
}

/* =====================================
   TYPOGRAPHY
   ===================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--bs-heading-color);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--bs-heading-color);
}

/* =====================================
   NAVIGATION
   ===================================== */
.navbar .nav-link {
  position: relative;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
  border-radius: 50px;
}

.navbar .nav-link.active {
  background-color: var(--gold-accent);
  color: #fff !important;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .nav-link:not(.active):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-text-color) !important;
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .navbar .nav-link:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .navbar .nav-link.active {
  background-color: var(--gold-accent);
  color: #fff !important;
}

/* Scroll to Top Button */
#scrollToTopBtn {
  position: fixed;
  bottom: 12rem;
  right: 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--gold-accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scrollToTopBtn:hover {
  background-color: #003d82;
  transform: translateY(-2px);
}

#scrollToTopBtn i {
  transition: transform 0.3s ease;
}

#scrollToTopBtn:hover i {
  transform: translateY(-2px);
}

/* =====================================
   LAYOUT & CONTAINERS
   ===================================== */
/* Level Section */
.level {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}

.level::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 81, 255, 0.03) 0%, 
    rgba(255, 193, 7, 0.05) 100%);
  z-index: 0;
}

[data-bs-theme="dark"] .level::before {
  background: linear-gradient(135deg, 
    rgba(0, 81, 255, 0.08) 0%, 
    rgba(255, 193, 7, 0.03) 100%);
}

.level .container {
  position: relative;
  z-index: 1;
}

/* Level Cards */
.card-level {
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.4s ease;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.card-level::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0051ff, #ffc107);
  z-index: 2;
}

.card-level .card-icon {
  font-size: 2.5rem;
  color: #0051ff;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #0051ff, #00bcd4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.card-level .card-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.card-level .card-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #0051ff, #ffc107);
  border-radius: 3px;
}

.card-benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.card-benefit-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
  position: relative;
  color: #4a5568;
}

.card-benefit-list li i {
  position: absolute;
  left: 0;
  top: 0.25rem;
  color: #ffc107;
}

.card-level .btn-gold {
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-level .btn-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
  z-index: -1;
}

.card-level .btn-gold:hover::before {
  left: 100%;
}

/* Hover Effects */
.card-level:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
[data-bs-theme="dark"] .card-level {
  background: linear-gradient(145deg, #2d3748, #1a202c);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .card-benefit-list li {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .card-level .card-icon {
  background: linear-gradient(135deg, #4299e1, #9f7aea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* Contact Section */
.kontak {
  background-color: var(--bs-body-bg);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}

.kontak::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 81, 255, 0.05) 0%, 
    rgba(255, 193, 7, 0.03) 100%);
  z-index: 0;
}

.kontak .container {
  position: relative;
  z-index: 1;
}

.card-contact {
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(247, 250, 255, 0.95) 100%);
  border: 1px solid rgba(0, 81, 255, 0.1);
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 81, 255, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0051ff, #ffc107);
  opacity: 0.8;
}

.card-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 81, 255, 0.15);
}

[data-bs-theme="dark"] .kontak::before {
  background: linear-gradient(135deg, 
    rgba(0, 81, 255, 0.1) 0%, 
    rgba(255, 193, 7, 0.05) 100%);
}

[data-bs-theme="dark"] .card-contact {
  background: linear-gradient(145deg, 
    rgba(30, 30, 40, 0.9) 0%, 
    rgba(20, 30, 50, 0.95) 100%);
  border: 1px solid rgba(255, 193, 7, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .card-contact:hover {
  box-shadow: 0 8px 30px rgba(0, 81, 255, 0.25);
}

.container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

/* =====================================
   NAVIGATION
   ===================================== */
.navbar {
  background-color: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-brand {
  color: var(--gold-accent) !important;
  font-weight: 700;
  font-size: 1.5rem;
  background: #fff;
  padding: 0 0.2rem;
  border-radius: 4px;
}

.nav-link {
  font-weight: 500;
  color: var(--bs-body-color) !important;
  transition: color 0.3s ease;
}

.nav-link.active,
.nav-link:hover {
  color: var(--gold-accent) !important;
}

[data-bs-theme="dark"] .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link:focus {
  color: var(--gold-accent) !important;
}

/* =====================================
   COMPONENTS
   ===================================== */

/* Buttons */
.btn-gold {
  background-color: var(--gold-accent);
  border-color: var(--gold-accent);
  color: var(--bs-body-bg);
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 50px;
  padding: 10px 30px;
}

.btn-gold:hover {
  /* background-color: #e6c200;
  border-color: #e6c200; */
  background-color: #0050b8;
  border-color: #004196;
  transform: translateY(-2px);
  color: var(--bs-body-bg);
}

[data-bs-theme="light"] .btn-gold {
  color: #fff;
}

[data-bs-theme="dark"] .btn-gold {
  /* color: #000; */
  color: #fff;
}

[data-bs-theme="dark"] .btn-gold:hover {
  /* color: #000; */
  color: #fff;
}

.btn-outline-gold {
  color: var(--gold-accent);
  border-color: var(--gold-accent);
  transition: all 0.2s ease;
}

.btn-outline-gold:hover {
  background-color: var(--gold-accent);
  color: var(--bs-body-bg);
}

/* Cards */
.product-card {
  transition: all 0.3s ease;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--bs-box-shadow) !important;
}

.product-card .card-img-top {
  transition: transform 0.5s ease;
}

.product-card:hover .card-img-top {
  transform: scale(1.05);
}

/* Dark theme card styles */
[data-bs-theme="dark"] .product-card, [data-bs-theme="dark"] .card-level, [data-bs-theme="dark"] .card-reward, [data-bs-theme="dark"] .card-testimoni, [data-bs-theme="dark"] .card-contact {
  background-color: var(--bs-dark);
  border-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .product-card .card-title, [data-bs-theme="dark"] .card-level, [data-bs-theme="dark"] .card-reward, [data-bs-theme="dark"] .card-testimoni, [data-bs-theme="dark"] .card-contact {
  color: var(--bs-white);
}

[data-bs-theme="dark"] .product-card .card-text {
  color: var(--bs-gray-400) !important;
}

[data-bs-theme="dark"] .product-card:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.3) !important;
}

/* Light theme card styles */
[data-bs-theme="light"] .product-card {
  background-color: #fff;
  border-color: var(--bs-border-color);
}

[data-bs-theme="light"] .product-card .card-title {
  color: var(--bs-dark);
}

[data-bs-theme="light"] .product-card .card-text {
  color: var(--bs-gray-700) !important;
}

/* Swiper Carousel */
.hero-swiper {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.hero-swiper .swiper-slide {
  text-align: center;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.hero-swiper .swiper-slide img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
  color: var(--gold-accent);
  --swiper-navigation-size: 24px;
  padding: 0 15px;
}

.hero-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--gold-accent);
  opacity: 1;
}

/* Running Text */
.running-text-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030; /* Above most content but below modals (1050) */
  background-color: rgba(0, 0, 0, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.running-text-wrapper {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  padding: 8px 0;
}

.running-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 80s linear infinite;
  color: #fff;
}

.running-text:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Add padding to the bottom of the body to prevent content from being hidden behind the fixed running text */
body {
  padding-bottom: 50px;
}

/* Adjust for mobile devices */
@media (max-width: 768px) {
  body {
    padding-bottom: 45px;
  }
}

/* Hero */
.hero {
  padding-top: 76px; /* Add padding to account for fixed navbar */
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
  background-size: cover;
  background-position: center;
  color: white;
  overflow: hidden; /* Prevent any potential overflow */
  display: flex;
  align-items: center;
  min-height: 0; /* Reset any minimum height */
  height: auto;
}

/* Hero content styling */
.hero-content {
  padding: 2rem;
  text-shadow: 1px 1px 3px rgba(17, 0, 0, 0.5);
}
.hero .btn-gold {
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--gold-accent);
  border-radius: 5px;
}

.card {
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.15);
}

.card-icon {
  font-size: 3rem;
  color: var(--gold-accent);
  margin-bottom: 1rem;
}

.card-benefit-list {
  padding-left: 0;
  list-style-type: none;
}

.card-benefit-list li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.card-benefit-list li .bi {
  color: var(--gold-accent);
  margin-right: 10px;
}

.hero {
  height: auto;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
  background-size: cover;
  background-position: center;
  color: white;
}

[data-bs-theme="light"] .hero {
  background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7));
  background-size: cover;
  background-position: center;
  color: var(--bs-body-color);
  min-height: 0;
  height: auto;
}

#theme-toggle {
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--bs-body-color);
  transition: color 0.3s ease;
}

#theme-toggle:hover {
  color: var(--gold-accent);
}

.form-control,
.form-control:focus {
  background-color: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}

.accordion-button {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color);
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  color: var(--gold-accent);
}

.accordion-body {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}

.social-icon {
  color: var(--bs-body-color);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--gold-accent);
}

.nav-pills .nav-link.active {
  background-color: var(--gold-accent);
  color: #fff !important;
}

/* =====================================
   BERITA STYLES
   ===================================== */
.card-berita {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bs-tertiary-bg);
}

.card-berita:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-berita .card-img-top {
  height: 400px;
  object-fit: cover;
  width: 100%;
}

.card-berita .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.card-berita .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--bs-heading-color);
}

.card-berita .card-text {
  color: var(--bs-body-color);
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.card-berita .card-footer {
  background: transparent;
  border-top: 1px solid var(--bs-border-color);
  padding: 1rem 1.5rem;
}

/* Modal Styles */
#beritaModal .modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

#beritaModal .modal-header {
  border-bottom: 1px solid var(--bs-border-color);
  padding: 1.5rem;
  background-color: var(--bs-tertiary-bg);
}

#beritaModal .modal-title {
  font-weight: 700;
  color: var(--bs-heading-color);
}

#beritaModal .modal-body {
  padding: 2rem;
}

#beritaModal .modal-footer {
  border-top: 1px solid var(--bs-border-color);
  padding: 1rem 1.5rem;
  background-color: var(--bs-tertiary-bg);
}

#modalGambar {
  max-height: 400px;
  width: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#modalTanggal {
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

#modalIsi {
  line-height: 1.8;
}

#modalIsi p {
  margin-bottom: 1.2rem;
}

#modalIsi ul, #modalIsi ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

#modalIsi li {
  margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .card-berita .card-img-top {
    height: 180px;
  }
  
  #beritaModal .modal-dialog {
    margin: 0.5rem;
  }
  
  #beritaModal .modal-body {
    padding: 1.25rem;
  }
  
  #modalGambar {
    max-height: 250px;
  }
}

/* Button styles */
.btn-outline-gold {
  color: var(--gold-accent);
  border-color: var(--gold-accent);
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-gold:hover {
  background-color: var(--gold-accent);
  color: #fff;
  border-color: var(--gold-accent);
}

/* Ensure proper spacing for the news section */
#berita {
  padding: 4rem 0;
}

/* Add some spacing between news cards on mobile */
@media (max-width: 767.98px) {
  .col-lg-6.mb-4 {
    margin-bottom: 1.5rem !important;
  }
}
/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 80px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  background-color: #128C7E;
  transform: scale(1.1);
  color: #FFF;
  text-decoration: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-tooltip {
  visibility: hidden;
  width: 120px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
}

.whatsapp-float:hover .whatsapp-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Reward Cards */
.card-reward {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--bs-border-color);
  border-radius: 15px;
  background: var(--bs-body-bg);
}

.reward-img-container {
  width: 100%;
  height: 400px; /* Fixed height for all images */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #fff;
  overflow: hidden;
}

.card-reward img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Ensure cards in the same row have equal height */
.row-equal-height {
  display: flex;
  flex-wrap: wrap;
}

.row-equal-height > [class*='col-'] {
  display: flex;
  flex-direction: column;
}

/* Responsive styles */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 80px;
    right: 40px;
    font-size: 26px;
  }
  
  .whatsapp-tooltip {
    width: 100px;
    font-size: 12px;
    margin-left: -50px;
  }
}