/* ============================================================
   MatrixNets – Custom CSS
   Complements Tailwind CDN with custom animations & components
============================================================ */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Hero Slider ---------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: #0b1120;
  min-height: 460px;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  transform: scale(1.03);
  z-index: 1;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.slide.active .slide-content {
  opacity: 1;
  transform: translateY(0);
}

/* Slider dots */
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  outline: none;
  padding: 0;
}

.slider-dot:hover {
  background: rgba(255,255,255,0.7);
}

.slider-dot.active {
  background: #3b82f6;
  width: 32px;
  border-radius: 6px;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.6);
}

#slider-prev, #slider-next {
  z-index: 20;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

#slider-prev:hover, #slider-next:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.1);
}

/* ---------- Desktop Floating Action Buttons ---------- */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.fab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 48px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s, max-width 0.3s;
  white-space: nowrap;
  overflow: hidden;
  max-width: 48px;
}
.fab-btn span { opacity: 0; transition: opacity 0.2s; }
.fab-container:hover .fab-btn { max-width: 200px; }
.fab-container:hover .fab-btn span { opacity: 1; }

.fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.fab-call      { background: linear-gradient(135deg, #16a34a, #15803d); }
.fab-whatsapp  { background: linear-gradient(135deg, #25d366, #128c7e); }
.fab-inquiry   { background: linear-gradient(135deg, #1a56db, #1e40af); }

/* ---------- Mobile Full-Width Fixed Bottom Bar ---------- */
.mobile-bottom-bar {
  height: 54px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-bar a {
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Cards ---------- */
.service-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(26,86,219,0.12);
  border-color: #bfdbfe;
}

.service-card .icon-wrap {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: background 0.3s, transform 0.3s;
}
.service-card:hover .icon-wrap {
  background: linear-gradient(135deg, #1a56db, #3b82f6);
  transform: scale(1.05);
}
.service-card:hover .icon-wrap i { color: #fff !important; }

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid #f1f5f9;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.testimonial-card::before {
  content: '\201C';
  font-size: 84px;
  line-height: 1;
  color: #e2e8f0;
  font-family: Georgia, serif;
  position: absolute;
  top: 12px;
  left: 20px;
  pointer-events: none;
}

/* ---------- Gallery Lightbox ---------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
  background: #0f172a;
}
.gallery-item img {
  transition: transform 0.5s ease;
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.3) 50%, transparent 100%);
  opacity: 0.85;
  transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 20px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ---------- Section Animations ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- FAQ Accordion ---------- */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-content.open { max-height: 350px; }

.faq-icon { transition: transform 0.3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ---------- Stats Counter ---------- */
.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  display: inline-block;
}

/* ---------- CTA Strip ---------- */
.cta-strip {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 50%, #1a56db 100%);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Hamburger Animation ---------- */
.menu-open .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Scroll to top ---------- */
#scroll-top {
  position: fixed;
  bottom: 24px; left: 20px;
  width: 44px; height: 44px;
  background: #1a56db;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, bottom 0.3s;
  box-shadow: 0 4px 16px rgba(26,86,219,0.3);
  z-index: 998;
  text-decoration: none;
}
#scroll-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
#scroll-top:hover { transform: translateY(-3px); background: #1e40af; }

/* ---------- Breadcrumb ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,0.7); }
.breadcrumb li a { color: rgba(255,255,255,0.9); text-decoration: none; }
.breadcrumb li a:hover { color: #fff; }
.breadcrumb li + li::before { content: '/'; color: rgba(255,255,255,0.4); }

/* ---------- Page Banner ---------- */
.page-banner {
  background: linear-gradient(135deg, #111827 0%, #1e3a5f 100%);
  padding: 60px 0 40px;
  min-height: 200px;
  display: flex; align-items: center;
}

/* ---------- Process Steps ---------- */
.process-step {
  position: relative;
  padding-left: 72px;
}
.process-step .step-num {
  position: absolute; left: 0; top: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a56db, #3b82f6);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(26,86,219,0.3);
}

/* ---------- Mobile Layout & Utilities ---------- */
@media (max-width: 767px) {
  body {
    padding-bottom: 54px; /* Space for fixed bottom bar */
  }
  #scroll-top {
    bottom: 68px !important; /* Keep scroll button above mobile bottom bar */
    left: 16px;
    width: 40px;
    height: 40px;
  }
}
