/* ================================================
   JARVIS.iTECH — Custom Styles
   Complementing Tailwind CSS v4
   ================================================ */

/* ---- Theme Transition Control ---- */
.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none !important;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0052cc, #00b4ff);
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
  background: #0f1f35;
}

/* ---- Selection ---- */
::selection {
  background: rgba(0, 82, 204, 0.2);
  color: inherit;
}

/* ================================================
   KEYFRAME ANIMATIONS
   ================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes float-delayed {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 82, 204, 0.2);
  }

  50% {
    box-shadow: 0 0 40px rgba(0, 82, 204, 0.4);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes blob {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(120px) rotate(0deg);
  }

  to {
    transform: rotate(360deg) translateX(120px) rotate(-360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

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

/* ================================================
   SCROLL ANIMATION UTILITIES
   ================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animate-left {
  transform: translateX(-40px);
}

.animate-on-scroll.animate-right {
  transform: translateX(40px);
}

.animate-on-scroll.animate-scale {
  transform: scale(0.9);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
.stagger-1 {
  transition-delay: 100ms;
}

.stagger-2 {
  transition-delay: 200ms;
}

.stagger-3 {
  transition-delay: 300ms;
}

.stagger-4 {
  transition-delay: 400ms;
}

.stagger-5 {
  transition-delay: 500ms;
}

.stagger-6 {
  transition-delay: 600ms;
}

.stagger-7 {
  transition-delay: 700ms;
}

/* ================================================
   GLASSMORPHISM
   ================================================ */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.dark .glass {
  background: rgba(10, 22, 40, 0.85);
  border-bottom: 1px solid rgba(30, 48, 80, 0.5);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
  background: rgba(20, 34, 56, 0.5);
  border: 1px solid rgba(30, 48, 80, 0.6);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 82, 204, 0.12);
  border-color: rgba(0, 82, 204, 0.2);
}

.dark .glass-card:hover {
  box-shadow: 0 20px 60px rgba(59, 139, 255, 0.12);
  border-color: rgba(59, 139, 255, 0.25);
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero-pattern {
  position: relative;
  overflow: hidden;
}

.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0, 82, 204, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 180, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0, 82, 204, 0.04) 0%, transparent 50%);
  z-index: 0;
}

.dark .hero-pattern::before {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0, 82, 204, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 180, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0, 82, 204, 0.08) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 82, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 82, 204, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.dark .hero-grid {
  background-image:
    linear-gradient(rgba(59, 139, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 139, 255, 0.04) 1px, transparent 1px);
}

.floating-element {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.floating-element:nth-child(2) {
  animation: float-delayed 8s ease-in-out infinite;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  animation: float 10s ease-in-out infinite;
  animation-delay: 4s;
}

.hero-visual-blob {
  animation: blob 8s ease-in-out infinite;
  transition: all 0.5s ease;
}

.hero-orbit {
  animation: orbit 20s linear infinite;
}

.hero-orbit-reverse {
  animation: orbit 15s linear infinite reverse;
}

/* ================================================
   GRADIENT TEXT
   ================================================ */
.gradient-text {
  background: linear-gradient(135deg, #0052cc, #00b4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .gradient-text {
  background: linear-gradient(135deg, #3b8bff, #5ccfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn-gradient {
  background: linear-gradient(135deg, #0052cc, #00b4ff);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #003d99, #0066e6);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 82, 204, 0.35);
}

.btn-gradient:hover::before {
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: #0052cc;
  border: 2px solid #0052cc;
  transition: all 0.3s ease;
}

.dark .btn-outline {
  color: #3b8bff;
  border-color: #3b8bff;
}

.btn-outline:hover {
  background: #0052cc;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 82, 204, 0.25);
}

.dark .btn-outline:hover {
  background: #3b8bff;
  color: #0a1628;
}

/* ================================================
   NAV LINK
   ================================================ */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0052cc, #00b4ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
  color: #0052cc;
}

.dark .nav-link:hover,
.dark .nav-link.active {
  color: #3b8bff;
}

/* ================================================
   SERVICE CARD
   ================================================ */
.service-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0052cc, #00b4ff);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-card .service-icon {
  transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* ================================================
   PORTFOLIO
   ================================================ */
.portfolio-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-card .portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 82, 204, 0.92) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-card img {
  transition: transform 0.6s ease;
}

.portfolio-card:hover img {
  transform: scale(1.08);
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  border: none;
  background: transparent;
}

.filter-tab.active {
  background: linear-gradient(135deg, #0052cc, #00b4ff);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
}

.filter-tab:not(.active):hover {
  background: rgba(0, 82, 204, 0.08);
}

.dark .filter-tab:not(.active):hover {
  background: rgba(59, 139, 255, 0.1);
}

/* Portfolio Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #fff;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s ease;
}

.dark .modal-content {
  background: #142238;
}

.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

/* ================================================
   TESTIMONIAL SLIDER
   ================================================ */
.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card {
  min-width: 100%;
  padding: 0 12px;
}

@media (min-width: 768px) {
  .testimonial-card {
    min-width: 50%;
  }
}

@media (min-width: 1024px) {
  .testimonial-card {
    min-width: 33.333%;
  }
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 82, 204, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.testimonial-dot.active {
  background: #0052cc;
  width: 30px;
  border-radius: 5px;
}

.dark .testimonial-dot {
  background: rgba(59, 139, 255, 0.2);
}

.dark .testimonial-dot.active {
  background: #3b8bff;
}

/* ================================================
   FORM STYLES
   ================================================ */
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background: #fff;
  color: #0a1628;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: #0052cc;
  box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
}

.dark .form-input {
  background: rgba(20, 34, 56, 0.6);
  border-color: #1e3050;
  color: #e8edf5;
}

.dark .form-input:focus {
  border-color: #3b8bff;
  box-shadow: 0 0 0 4px rgba(59, 139, 255, 0.12);
}

.form-input::placeholder {
  color: #a0aec0;
}

.dark .form-input::placeholder {
  color: #6b82a8;
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.checkbox-custom {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.checkbox-custom:checked {
  background: linear-gradient(135deg, #0052cc, #00b4ff);
  border-color: transparent;
}

.checkbox-custom:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dark .checkbox-custom {
  border-color: #2a4060;
  background: rgba(20, 34, 56, 0.6);
}

.service-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.service-tag:has(.checkbox-custom:checked) {
  border-color: #0052cc;
  background: rgba(0, 82, 204, 0.05);
}

.dark .service-tag {
  border-color: #1e3050;
}

.dark .service-tag:has(.checkbox-custom:checked) {
  border-color: #3b8bff;
  background: rgba(59, 139, 255, 0.08);
}

/* ================================================
   MOBILE MENU
   ================================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 60;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  padding: 80px 32px 32px;
}

.dark .mobile-menu {
  background: #0a1628;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.mobile-menu.open {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ================================================
   BACK TO TOP
   ================================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052cc, #00b4ff);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 82, 204, 0.4);
}

/* ================================================
   TOAST NOTIFICATION
   ================================================ */
.toast {
  position: fixed;
  top: 100px;
  right: 30px;
  padding: 16px 24px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  z-index: 100;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.dark .toast {
  background: #162032;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ================================================
   SECTION DIVIDER
   ================================================ */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0052cc, #00b4ff);
  border-radius: 2px;
}

/* ================================================
   SECTION PATTERNS
   ================================================ */
.pattern-dots {
  background-image: radial-gradient(circle, rgba(0, 82, 204, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

.dark .pattern-dots {
  background-image: radial-gradient(circle, rgba(59, 139, 255, 0.04) 1px, transparent 1px);
}

/* ================================================
   STAR RATING
   ================================================ */
.star-filled {
  color: #f59e0b;
}

.star-empty {
  color: #d1d5db;
}

.dark .star-empty {
  color: #374151;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .filter-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ================================================
   MISC UTILITIES
   ================================================ */
.counter {
  font-variant-numeric: tabular-nums;
}

.skeleton {
  background: linear-gradient(90deg, rgba(0, 82, 204, 0.05) 25%, rgba(0, 82, 204, 0.1) 50%, rgba(0, 82, 204, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Animate spin for loading */
.animate-spin {
  animation: spin-slow 1s linear infinite;
}