/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Smooth Scrolling & Basic Styling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky navbar */
}

body {
  font-family: 'Inter', sans-serif;
  color: #1F2937;
  background-color: #FFFFFF;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
}

/* Custom premium scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F7FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2FA79A;
}

/* Dynamic Navbar Transitions */
#navbar {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

/* Glassmorphism Styles */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-card-dark {
  background: rgba(31, 41, 55, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Islamic Geometric Pattern overlays */
.islamic-pattern {
  background-image: radial-gradient(#2fa79a 0.5px, transparent 0.5px), radial-gradient(#2fa79a 0.5px, #ffffff 0.5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  opacity: 0.04;
}

/* Floating Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float-delayed {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(10px) scale(1.02); }
  100% { transform: translateY(0px) scale(1); }
}

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

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite;
}

/* Gradient text utility */
.text-gradient-teal {
  background: linear-gradient(135deg, #2FA79A 0%, #15803d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom achievements timeline connector */
.timeline-line {
  background: linear-gradient(180deg, rgba(47, 167, 154, 0.1) 0%, #2FA79A 15%, #E6C55A 85%, rgba(230, 197, 90, 0.1) 100%);
}

/* Lightbox Modal custom stylings */
#lightbox {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* Swiper custom styles */
.swiper-pagination-bullet-active {
  background: #2FA79A !important;
  width: 24px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease;
}

/* Custom micro-animations for grid hover states */
.premium-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(47, 167, 154, 0.1), 0 10px 10px -5px rgba(47, 167, 154, 0.04);
}

/* Active navigation link indicator */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2FA79A;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Ripple Button Effect styles */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Mobile Centering & Overflow Prevention */
/* Using #page-wrapper instead of html/body overflow-x which is unreliable on Android Chrome */
#page-wrapper {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Prevent decorative/absolute elements from expanding page width */
img, video, iframe, canvas, svg {
  max-width: 100%;
}

/* Ensure sections stay within bounds */
section, header, footer, nav {
  max-width: 100%;
}

/* Calendar Timeline Styles */
.calendar-timeline-line {
  background: linear-gradient(180deg, 
    rgba(47, 167, 154, 0.15) 0%, 
    #2FA79A 8%, 
    #E6C55A 50%, 
    #10B981 85%, 
    rgba(16, 185, 129, 0.15) 100%
  );
}

.calendar-node {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-progress {
  animation: progress-fill 1.5s ease-out forwards;
}

@keyframes progress-fill {
  from { width: 0%; }
}

/* Calendar sticky nav shadow on scroll */
#calendar-nav {
  transition: box-shadow 0.3s ease;
}

@media (max-width: 767px) {
  #home blockquote {
    text-align: left;
    border-left: 4px solid #E6C55A;
    border-top: none;
    padding-left: 1rem;
    padding-top: 0;
    width: 100%;
  }

  /* Keep description text left-aligned on mobile */
  #home p {
    text-align: left;
    width: 100%;
  }

  /* Contain floating badge card on About section */
  #profil [data-aos="fade-left"] {
    overflow: hidden;
    padding-bottom: 2rem;
  }
}

/* ===== Mobile Menu Animations ===== */

/* Overlay fade */
#mobile-overlay {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#mobile-overlay.mobile-overlay-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#mobile-overlay.mobile-overlay-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Menu drawer slide-down */
#mobile-menu {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
}
#mobile-menu.mobile-menu-hidden {
  opacity: 0;
  transform: translateY(-12px);
  visibility: hidden;
  pointer-events: none;
}
#mobile-menu.mobile-menu-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* Informasi dropdown chevron rotation */
#informasi-chevron.rotated {
  transform: rotate(180deg);
}

/* Mobile nav-link hover effect */
.mobile-nav-link {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* ===== Skeleton Loader ===== */
@keyframes skeleton-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

.skeleton-item {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* ===== Back-to-Top Button ===== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2FA79A;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(47, 167, 154, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  pointer-events: none;
  border: none;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  background: #238277;
  box-shadow: 0 6px 20px rgba(47, 167, 154, 0.4);
}

/* ===== iOS Parallax Fix ===== */
/* bg-fixed doesn't work on iOS Safari, fall back to regular scroll */
@supports (-webkit-touch-callout: none) {
  .bg-fixed {
    background-attachment: scroll !important;
  }
}

/* ===== Error State ===== */
.error-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #9CA3AF;
}

.error-state i {
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

