/* ═══════════════════════════════════════
   Smart President - Main Stylesheet
   ═══════════════════════════════════════ */

/* ───── Scroll Animator ───── */
[data-animate] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-timing-function: var(--sa-easing, cubic-bezier(0.22, 1, 0.36, 1));
  transition-duration: var(--sa-duration, 600ms);
  transition-delay: var(--sa-delay, 0ms);
  will-change: opacity, transform;
}
[data-animate="fadeIn"] { transform: none; }
[data-animate="fadeUp"] { transform: translateY(40px); }
[data-animate="fadeDown"] { transform: translateY(-40px); }
[data-animate="scaleIn"] { transform: scale(0.85); }
[data-animate="slideLeft"] { transform: translateX(60px); }
[data-animate="slideRight"] { transform: translateX(-60px); }
[data-animate].sa-animated {
  opacity: 1 !important;
  transform: none !important;
}

/* Stagger delays */
[data-animate-stagger] > [data-animate]:nth-child(1) { --sa-delay: 0ms; }
[data-animate-stagger] > [data-animate]:nth-child(2) { --sa-delay: 80ms; }
[data-animate-stagger] > [data-animate]:nth-child(3) { --sa-delay: 160ms; }
[data-animate-stagger] > [data-animate]:nth-child(4) { --sa-delay: 240ms; }
[data-animate-stagger] > [data-animate]:nth-child(5) { --sa-delay: 320ms; }
[data-animate-stagger] > [data-animate]:nth-child(6) { --sa-delay: 400ms; }
[data-animate-stagger] > [data-animate]:nth-child(7) { --sa-delay: 480ms; }
[data-animate-stagger] > [data-animate]:nth-child(8) { --sa-delay: 560ms; }
[data-animate-stagger] > [data-animate]:nth-child(9) { --sa-delay: 640ms; }
[data-animate-stagger] > [data-animate]:nth-child(10) { --sa-delay: 720ms; }

/* ───── Scrollbar ───── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f8f9fa; }
::-webkit-scrollbar-thumb { background: #213966; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #1a2d50; }

/* ───── Section Title ───── */
.section-title-line {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #213966, #2d5094);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ───── Hero Blur ───── */
.hero-blur-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px) brightness(0.4) saturate(1.1);
  -webkit-backdrop-filter: blur(3px) brightness(0.4) saturate(1.1);
}

/* ───── Clients ───── */
.client-logo-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  transition: all 0.3s ease;
  filter: grayscale(100%) opacity(0.6);
}
.client-logo-card:hover {
  filter: grayscale(0%) opacity(1);
  border-color: #2d5094;
  box-shadow: 0 4px 20px rgba(33, 57, 102, 0.1);
  transform: translateY(-2px);
}

/* ───── Scroll Animation ───── */
@keyframes scrollX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-scroll-x {
  animation: scrollX 35s linear infinite;
}
.animate-scroll-x:hover {
  animation-play-state: paused;
}

/* ───── Glass ───── */
.glass-light {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ───── FAQ ───── */
.faq-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}
.faq-card:hover {
  border-color: #2d5094;
}
.faq-card.faq-open {
  border-color: #2d5094;
  box-shadow: 0 4px 12px rgba(33, 57, 102, 0.08);
}
.faq-chevron {
  transform: rotate(0deg);
}
.faq-card.faq-open .faq-chevron {
  transform: rotate(180deg);
}

/* ───── CTA ───── */
.cta-gradient {
  background: linear-gradient(135deg, #152240 0%, #213966 50%, #2d5094 100%);
}

/* ───── Glow ───── */
@keyframes subtleGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(33, 57, 102, 0.25); }
  50% { box-shadow: 0 0 40px rgba(33, 57, 102, 0.4); }
}
.animate-subtle-glow {
  animation: subtleGlow 2.5s ease-in-out infinite;
}

/* ───── Header Scroll States ───── */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #f1f5f9;
}
.header-scrolled .nav-link {
  color: #475569 !important;
}
.header-scrolled .nav-link:hover {
  background: #f0f3fa !important;
  color: #213966 !important;
}
.header-scrolled #logo-text {
  color: #1e293b !important;
}
.header-scrolled #logo-sub {
  color: #213966 !important;
}
.header-scrolled #mobile-menu-btn {
  color: #1e293b !important;
}

/* ───── Timeline Slider (daralarkan-style) ───── */
.tl-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 3rem 1rem 2rem;
  cursor: grab;
  scroll-snap-type: x proximity;
}
.tl-track::-webkit-scrollbar { display: none; }

.tl-slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  opacity: 0.3;
  filter: blur(4px) grayscale(40%);
  transform: scale(0.82);
  user-select: none;
}
.tl-slide-active {
  opacity: 1;
  filter: blur(0px) grayscale(0%) !important;
  transform: scale(1) !important;
}
.tl-slide-near {
  opacity: 0.55;
  filter: blur(1.5px) grayscale(20%);
  transform: scale(0.9);
}
.tl-slide-far {
  opacity: 0.25;
  filter: blur(4px) grayscale(50%);
  transform: scale(0.78);
}

.tl-slide:hover {
  opacity: 0.75 !important;
  filter: blur(1px) grayscale(10%) !important;
  transform: scale(0.95) !important;
}
.tl-slide.tl-slide-active:hover {
  opacity: 1 !important;
  filter: blur(0) grayscale(0%) !important;
  transform: scale(1.02) !important;
}

/* Timeline Slide Card */
.tl-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tl-slide-active .tl-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(33, 57, 102, 0.15);
}

/* Accent line on card */
.tl-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 0%;
  background: linear-gradient(to bottom, #ed661d, #ff8848, #ed661d);
  border-radius: 0 3px 3px 0;
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}
.tl-slide-active .tl-card::before {
  height: 100%;
}

/* Card Icon */
.tl-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: rgba(201, 163, 78, 0.12);
  border: 1px solid rgba(201, 163, 78, 0.2);
  color: #ed661d;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tl-slide-active .tl-card-icon {
  background: linear-gradient(135deg, rgba(201, 163, 78, 0.2), rgba(240, 215, 140, 0.15));
  box-shadow: 0 0 20px rgba(201, 163, 78, 0.2);
}

/* Card Title */
.tl-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
  transition: color 0.6s ease;
}
.tl-slide-active .tl-card-title {
  color: #ffffff;
}

/* Card Description */
.tl-card-desc {
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.6s ease;
}
.tl-slide-active .tl-card-desc {
  color: rgba(255, 255, 255, 0.75);
}

/* ───── Light Card Variant (Services) ───── */
.tl-card-light {
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.88) 100%);
  border: 1px solid rgba(33, 57, 102, 0.08);
  min-height: 240px;
}
.tl-slide-active .tl-card-light {
  background: linear-gradient(145deg, #ffffff 0%, rgba(240, 243, 250, 0.95) 100%);
  border-color: rgba(33, 57, 102, 0.15);
  box-shadow: 0 20px 60px rgba(33, 57, 102, 0.12), 0 0 30px rgba(33, 57, 102, 0.06);
}
.tl-card-light::before {
  background: linear-gradient(to bottom, #213966, #2d5094, #213966);
}

.tl-card-light .tl-card-icon {
  background: rgba(33, 57, 102, 0.08);
  border-color: rgba(33, 57, 102, 0.12);
  color: #213966;
}
.tl-slide-active .tl-card-light .tl-card-icon {
  background: linear-gradient(135deg, #213966, #2d5094);
  color: white;
  box-shadow: 0 4px 20px rgba(33, 57, 102, 0.3);
}

.tl-card-light .tl-card-title {
  color: rgba(33, 57, 102, 0.7);
}
.tl-slide-active .tl-card-light .tl-card-title {
  color: #213966;
}

.tl-card-light .tl-card-desc {
  color: rgba(33, 57, 102, 0.45);
}
.tl-slide-active .tl-card-light .tl-card-desc {
  color: rgba(33, 57, 102, 0.7);
}

/* ───── Navigation Buttons ───── */
.tl-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}
.tl-nav-btn:hover:not(:disabled) {
  background: rgba(201, 163, 78, 0.2);
  border-color: rgba(201, 163, 78, 0.4);
  color: #ed661d;
  transform: translateY(-50%) scale(1.1);
}
.tl-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}
.tl-nav-prev { right: 0.75rem; }
.tl-nav-next { left: 0.75rem; }

/* Light nav buttons */
.tl-nav-light .tl-nav-btn {
  background: rgba(33, 57, 102, 0.06);
  border-color: rgba(33, 57, 102, 0.1);
  color: rgba(33, 57, 102, 0.5);
}
.tl-nav-light .tl-nav-btn:hover:not(:disabled) {
  background: rgba(33, 57, 102, 0.12);
  border-color: rgba(33, 57, 102, 0.25);
  color: #213966;
}

/* ───── Progress Bar ───── */
.tl-progress-container {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 0.5rem auto 0.5rem;
  overflow: hidden;
}
.tl-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ed661d, #f0d78c);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light progress */
.tl-progress-light .tl-progress-container {
  background: rgba(33, 57, 102, 0.1);
}
.tl-progress-light .tl-progress-bar {
  background: linear-gradient(90deg, #213966, #2d5094);
}

/* ───── Hint Text ───── */
.tl-hint-text {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.25rem;
  letter-spacing: 0.03em;
}
.tl-hint-light {
  color: rgba(33, 57, 102, 0.35);
}

/* ───── Portfolio Item ───── */
.portfolio-item {
  transition: transform 0.3s ease;
}
.portfolio-item:hover {
  transform: translateY(-4px);
}

/* ───── Mobile Menu ───── */
#mobile-menu {
  transform: translateX(100%);
}
#mobile-menu.menu-open {
  transform: translateX(0);
}

/* ───── Scroll to Top Button ───── */
#scroll-top.visible {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ───── Smooth Scroll ───── */
html {
  scroll-behavior: smooth;
}

/* ───── Selection ───── */
::selection {
  background: rgba(33, 57, 102, 0.15);
  color: #213966;
}
