/* ==========================================
   EXPLORE KALTIM - Main Stylesheet
   ========================================== */

/* ==========================================
   BASE STYLES
   ========================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
}

::selection {
  background-color: #0ea5e9;
  color: white;
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #e7e5e4;
}

::-webkit-scrollbar-thumb {
  background: #047857;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #065f46;
}

/* ==========================================
   PAGE LOADER
   ========================================== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  color: rgba(255, 255, 255, 0.9);
  font-family: "Montserrat", sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes progress {
  0% {
    width: 0%;
    transform: translateX(0);
  }
  50% {
    width: 100%;
    transform: translateX(0);
  }
  100% {
    width: 100%;
    transform: translateX(100%);
  }
}

/* ==========================================
   GLASS EFFECTS
   ========================================== */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(6, 78, 59, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  color: white;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px rgba(6, 78, 59, 0.4);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px -5px rgba(6, 78, 59, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: white;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: white;
  color: #064e3b;
  border-color: white;
  transform: translateY(-3px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: transparent;
  color: #064e3b;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  border: 2px solid #064e3b;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background: #064e3b;
  color: white;
  transform: translateY(-3px);
}

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(6, 78, 59, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
  position: relative;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: white;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  top: 64px;
  background: #ffffff;
  backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .mobile-menu {
    top: 80px;
  }
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Hamburger */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

.hamburger-line-short {
  width: 16px;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 64px; /* Account for navbar on mobile */
  padding-bottom: 2rem;
}

@media (min-width: 640px) {
  .hero-section {
    padding-top: 80px;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 78, 59, 0.7) 0%,
    rgba(6, 78, 59, 0.4) 50%,
    rgba(6, 78, 59, 0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1rem;
}

/* Wave Separator */
.wave-separator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

/* ==========================================
   DESTINATION CARDS
   ========================================== */
.destination-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: white;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.destination-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.25);
}

.destination-card .card-image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.destination-card:hover .card-image {
  transform: scale(1.1);
}

.destination-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    transparent 100%
  );
  opacity: 0.6;
  transition: opacity 0.3s;
}

.destination-card:hover .card-overlay {
  opacity: 0.85;
}

/* ==========================================
   FILTER PILLS
   ========================================== */
.filter-pill {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  background: white;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-pill:hover {
  border-color: #10b981;
  color: #047857;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.filter-pill.active {
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 25px -5px rgba(6, 78, 59, 0.4);
}

/* ==========================================
   TESTIMONIAL CARDS
   ========================================== */
.testimonial-card {
  padding: 2rem;
  border-radius: 1.5rem;
  background: white;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

/* ==========================================
   INPUT FIELDS
   ========================================== */
.input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: white;
  border: 2px solid #e5e7eb;
  color: #1f2937;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.input-field::placeholder {
  color: #9ca3af;
}

/* ==========================================
   GALLERY
   ========================================== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-item:hover img {
  transform: scale(1.15);
}

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ==========================================
   LIGHTBOX
   ========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* ==========================================
   VIDEO MODAL
   ========================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.video-modal-content {
  width: 100%;
  max-width: 1000px;
  margin: 0 1rem;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
}

.video-modal-content iframe {
  width: 100%;
  height: 100%;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(6, 78, 59, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 40px rgba(6, 78, 59, 0.5);
}

/* ==========================================
   GRADIENT TEXT
   ========================================== */
.text-gradient {
  background: linear-gradient(135deg, #065f46 0%, #059669 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-light {
  background: linear-gradient(135deg, #ffffff 0%, #bae6fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-element {
  animation: float 6s ease-in-out infinite;
}

.float-element-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(14, 165, 233, 0);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ==========================================
   GRAIN OVERLAY
   ========================================== */
.grain-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

/* ==========================================
   SECTION STYLES
   ========================================== */
.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.2;
}

.section-subtitle {
  font-family: "Poppins", sans-serif;
  color: #6b7280;
  line-height: 1.7;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
  html {
    scroll-padding-top: 70px;
  }

  .navbar {
    padding: 0;
  }

  .navbar .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 0;
    padding-bottom: 1rem;
  }

  .hero-content {
    padding: 0 1rem;
    padding-top: 1rem;
  }

  .hero-content h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    margin-bottom: 1rem !important;
  }

  .hero-content p {
    font-size: 0.875rem !important;
    line-height: 1.5;
    margin-bottom: 1.5rem !important;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
  }

  .btn-secondary span:first-child {
    width: 2.25rem;
    height: 2.25rem;
  }

  /* Stats Grid Mobile */
  .hero-content .grid {
    gap: 0.5rem;
  }

  .hero-content .grid > div {
    padding: 0.625rem;
  }

  .hero-content .grid .text-2xl,
  .hero-content .grid .text-3xl {
    font-size: 1.25rem !important;
  }

  .hero-content .grid .text-xs,
  .hero-content .grid .text-sm {
    font-size: 0.65rem;
  }

  /* CTA Buttons */
  .hero-content .flex.flex-col {
    gap: 0.75rem;
    margin-bottom: 1rem !important;
  }

  /* Mobile Menu Fixes */
  .mobile-menu {
    top: 64px;
  }

  #mobile-menu-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .hamburger-line {
    width: 20px;
  }

  .hamburger-line-short {
    width: 14px;
  }
}

/* Medium Mobile Devices (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .hero-content h1 {
    font-size: 2.75rem !important;
  }

  .hero-content p {
    font-size: 1rem !important;
  }
}

/* Tablet and larger mobile (768px) */
@media (max-width: 768px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
}

/* Large screens (1024px+) */
@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ==========================================
   STAT COUNTER ANIMATION
   ========================================== */
.stat-number {
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

/* ==========================================
   SMOOTH REVEAL ANIMATIONS
   ========================================== */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* Contact Card Hover */
.contact-card {
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateX(5px);
}
