/* ═══════════ GLOBAL RESETS & SMOOTH SCROLL ═══════════ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Smoother scrolling on all platforms */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

::selection {
  background: #1a8fca;
  color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #EFF6FB;
}
::-webkit-scrollbar-thumb {
  background: #1a8fca;
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1576aa;
}

/* ═══════════ NAVBAR ═══════════ */
.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E8783A;
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: #1a8fca !important;
}

/* Nav link default blue for scrolled/sub pages */

/* Navbar scrolled state */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
  color: #000000 !important;
}

#navbar.scrolled .nav-link:hover {
  color: #1a8fca !important;
}

#navbar.scrolled #nav-logo-text {
  color: #1a1a1a !important;
}

#navbar.scrolled .hamburger-line {
  background: #1a1a1a !important;
}

/* Hamburger active state */
#hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background: white !important;
}

#hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 1.75rem;
  background: white !important;
}

/* Mobile menu visible */
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.mobile-menu.open .mobile-link {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu.open .mobile-link:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-menu.open .mobile-link:nth-child(2) {
  transition-delay: 0.15s;
}
.mobile-menu.open .mobile-link:nth-child(3) {
  transition-delay: 0.2s;
}
.mobile-menu.open .mobile-link:nth-child(4) {
  transition-delay: 0.25s;
}
.mobile-menu.open .mobile-link:nth-child(5) {
  transition-delay: 0.3s;
}
.mobile-menu.open .mobile-link:nth-child(6) {
  transition-delay: 0.35s;
}

/* ═══════════ HERO ANIMATIONS ═══════════ */
.hero-fade {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1s ease forwards;
}

.hero-delay-1 {
  animation-delay: 0.3s;
}
.hero-delay-2 {
  animation-delay: 0.6s;
}
.hero-delay-3 {
  animation-delay: 0.9s;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator line */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 1;
    height: 3rem;
  }
  50% {
    opacity: 0.4;
    height: 2rem;
  }
}

/* ═══════════ REVEAL ON SCROLL ═══════════ */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.15s;
}
.reveal-delay-2 {
  transition-delay: 0.3s;
}
.reveal-delay-3 {
  transition-delay: 0.45s;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════ SERVICE CARDS ═══════════ */
.service-card {
  transform: translateY(0);
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease,
    border-color 0.5s ease;
}

.service-card:hover {
  transform: translateY(-10px);
}

/* ═══════════ PORTFOLIO ═══════════ */
.portfolio-item {
  transition: transform 0.5s ease;
}

.portfolio-item:hover {
  transform: translateY(-6px);
}

/* ═══════════ LIGHTBOX ═══════════ */
#lightbox.active {
  opacity: 1;
  pointer-events: all;
}

#lightbox.active #lightbox-img {
  transform: scale(1);
}

/* ═══════════ TESTIMONIAL CAROUSEL ═══════════ */
.testimonial-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  width: 100%;
}

.testimonial-slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  padding-bottom: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.carousel-dot.active {
  background: #E8783A !important;
  transform: scale(1.3);
}

/* ═══════════ COUNTER ANIMATION ═══════════ */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ═══════════ SUBTLE GRAIN / TEXTURE ═══════════ */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ═══════════ PAGE TRANSITIONS ═══════════ */
.page-transition {
  animation: pageFadeIn 0.6s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════ PROJECT DETAIL PAGES ═══════════ */
.project-detail img {
  transition: transform 0.7s ease;
}

.project-detail:hover img {
  transform: scale(1.02);
}

/* Service card link reset */
a.service-card {
  text-decoration: none;
  color: inherit;
}

a.service-card:hover {
  text-decoration: none;
}

/* ═══════════ BACK BUTTON (navbar icon-only) ═══════════ */
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  left: -8px;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(232, 120, 58, 0.4);
  border-radius: 50%;
  color: #E8783A;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.back-btn:hover {
  background: #E8783A;
  border-color: #E8783A;
  color: white;
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(232, 120, 58, 0.3);
}

.back-btn svg {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.back-btn:hover svg {
  transform: translateX(-2px);
}

/* ═══════════ RESPONSIVE TWEAKS ═══════════ */
@media (max-width: 768px) {
  .hero-fade {
    transform: translateY(20px);
  }

  .reveal {
    transform: translateY(30px);
  }

  .reveal-left,
  .reveal-right {
    transform: translateY(30px);
  }

  .reveal-left.visible,
  .reveal-right.visible {
    transform: translateY(0);
  }
}
#logoo {
  background-color: transparent;
  width: 5rem;
  height: 5rem;
}