@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Declare animatable angle property for the crawling gradient border */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  
  --accent-indigo: #4f46e5;
  --accent-indigo-light: #e0e7ff;
  --accent-emerald: #059669;
  --accent-emerald-light: #d1fae5;
  --accent-cyan: #0284c7;
  --accent-cyan-light: #e0f2fe;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Soft, modern shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* Global Reset & Base Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky header */
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sticky Header Custom Shadows & Scroll states */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}
.sticky-header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-color);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: rgba(255, 255, 255, 0.98);
}

/* Dropdown Menu Style - Premium White Card */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 580px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.dropdown-trigger:hover .dropdown-menu,
.dropdown-trigger:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: start;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-1px);
}

/* Active Nav Links Style */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-indigo);
  transition: width 0.2s ease;
}
.nav-link.active {
  color: var(--text-primary) !important;
}
.nav-link.active::after {
  width: 100%;
}

/* Accordion Logic for Mobile Menu */
.mobile-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-accordion-btn.active svg {
  transform: rotate(180deg);
}

/* Keyboard Focus States */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
  outline: 2px solid var(--accent-indigo) !important;
  outline-offset: 2px;
}

/* Primary and Secondary Button System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #ffffff;
  background-color: var(--text-primary);
  border: 1px solid var(--text-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px; /* Mobile Tap Target Size */
}

.btn-primary:hover {
  background-color: var(--accent-indigo);
  border-color: var(--accent-indigo);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  background-color: transparent;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-secondary);
  transform: translateY(-1px);
}

/* Floating WhatsApp / Quick Inquiry Button */
.whatsapp-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 45;
  background-color: #25d366;
  color: white;
  border-radius: 9999px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.whatsapp-floating:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-xl);
  background-color: #20ba5a;
}

/* Service & Solution Cards design */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

/* Stepper / Timeline Component Styles */
.timeline-wrapper {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.timeline-line {
  position: absolute;
  top: 2rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}
.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  flex: 1;
  padding: 0 1rem;
}
.timeline-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.timeline-step:hover .timeline-circle {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}
.timeline-number {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--text-primary);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Custom Contact Form Fields & Select Stylings */
.form-input-container {
  position: relative;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  height: 44px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-input:focus {
  background-color: var(--bg-primary);
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Custom Select styling to replace browser default */
.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.select-wrapper select {
  width: 100%;
  height: 44px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}
.select-wrapper select:focus {
  background-color: var(--bg-primary);
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 1rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

/* Validation styling */
.input-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}
.error-message {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Honeypot Spam Protection Field */
.field-honey {
  display: none !important;
  position: absolute;
  left: -9999px;
}

/* Interactive Hero Dashboard Widget */
.hero-dashboard {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-b: 1px solid var(--bg-tertiary);
  padding-bottom: 0.75rem;
}

.chart-bar-container {
  display: flex;
  align-items: flex-end;
  height: 100px;
  gap: 8px;
  padding-top: 10px;
}

.chart-bar {
  flex: 1;
  background-color: var(--bg-tertiary);
  border-radius: 4px 4px 0 0;
  transition: all 0.6s ease;
  position: relative;
}

.chart-bar:hover {
  background-color: var(--accent-indigo);
}

.chart-bar.emerald {
  background-color: var(--accent-emerald-light);
}
.chart-bar.emerald:hover {
  background-color: var(--accent-emerald);
}

.chart-bar.cyan {
  background-color: var(--accent-cyan-light);
}
.chart-bar.cyan:hover {
  background-color: var(--accent-cyan);
}

.chart-bar.active {
  background-color: var(--accent-indigo);
}

/* Mini GIS Map Widget */
.gis-map {
  background-color: #f1f5f9;
  border-radius: var(--radius-md);
  height: 120px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.gis-grid {
  position: absolute;
  inset: 0;
  background-size: 15px 15px;
  background-image: linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
}

.gis-pin {
  position: absolute;
  top: 40%;
  left: 60%;
  width: 10px;
  height: 10px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
}
.gis-pin-pulse {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 2px solid var(--accent-emerald);
  border-radius: 50%;
  animation: pulse-dot 2s infinite ease-out;
}

.gis-pin-two {
  position: absolute;
  top: 70%;
  left: 30%;
  width: 10px;
  height: 10px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
}

.gis-coords {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background-color: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 9px;
  font-weight: 500;
}

/* Scroll indicator animation */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.scroll-cue:hover {
  opacity: 1;
}
.scroll-cue-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-primary);
  border-radius: 12px;
  position: relative;
}
.scroll-cue-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--text-primary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel-slide 1.5s infinite ease-in-out;
}

@keyframes scroll-wheel-slide {
  0% {
    top: 6px;
    opacity: 1;
  }
  50% {
    top: 20px;
    opacity: 0;
  }
  100% {
    top: 6px;
    opacity: 1;
  }
}

/* General Layout helpers */
.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
@media (min-width: 768px) {
  .section-padding {
    padding-top: 6.25rem;
    padding-bottom: 6.25rem;
  }
}

/* Mobile Draw Menu */
#mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
#mobile-drawer.open {
  right: 0;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Responsive updates */
@media (max-width: 767px) {
  .timeline-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
  .timeline-line {
    top: 0;
    left: 2rem;
    width: 2px;
    height: 100%;
  }
  .timeline-step {
    flex-direction: row;
    align-items: start;
    text-align: left;
    padding: 0;
  }
  .timeline-circle {
    margin-right: 1.5rem;
    flex-shrink: 0;
  }
}

/* Opaque White Card Base with Transparent Border Hover Clipping (2px Thickness) */
.interactive-card {
  border: 2px solid var(--border-color); /* Constant 2px thickness to prevent layout shifts */
  background-color: var(--bg-primary);
  background-clip: padding-box;
  transition: border-color 0.25s ease, background-image 0.25s ease;
}

/* Default general card hover: Rotating Conic Gradient */
.interactive-card:hover {
  border-color: transparent;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), 
                    conic-gradient(from var(--angle), var(--accent-indigo), var(--bg-primary) 25%, var(--bg-primary) 75%, var(--accent-indigo));
  background-clip: padding-box, border-box;
  background-origin: border-box;
  animation: rotate-border-gradient 2s linear infinite;
}

/* Indigo Card Hover: Crawling Indigo border segment (Remaining border blends into white background) */
.interactive-card-indigo:hover {
  border-color: transparent;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), 
                    conic-gradient(from var(--angle), var(--accent-indigo), var(--bg-primary) 25%, var(--bg-primary) 75%, var(--accent-indigo));
  background-clip: padding-box, border-box;
  background-origin: border-box;
  animation: rotate-border-gradient 2s linear infinite;
}

/* Emerald Card Hover: Crawling Emerald border segment (Remaining border blends into white background) */
.interactive-card-emerald:hover {
  border-color: transparent;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), 
                    conic-gradient(from var(--angle), var(--accent-emerald), var(--bg-primary) 25%, var(--bg-primary) 75%, var(--accent-emerald));
  background-clip: padding-box, border-box;
  background-origin: border-box;
  animation: rotate-border-gradient 2s linear infinite;
}

/* Cyan Card Hover: Crawling Cyan border segment (Remaining border blends into white background) */
.interactive-card-cyan:hover {
  border-color: transparent;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), 
                    conic-gradient(from var(--angle), var(--accent-cyan), var(--bg-primary) 25%, var(--bg-primary) 75%, var(--accent-cyan));
  background-clip: padding-box, border-box;
  background-origin: border-box;
  animation: rotate-border-gradient 2s linear infinite;
}

@keyframes rotate-border-gradient {
  to {
    --angle: 360deg;
  }
}

::selection {
  background: var(--accent-indigo);
  color: #fff;
}

/* Primary Solid Buttons - Gradient Border Hover */
.btn-gsap-gradient {
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 2px solid transparent !important; /* Constant width to prevent layout shifts */
  background-image: linear-gradient(#0f172a, #0f172a), 
                    linear-gradient(to right, transparent, transparent); /* Standard transparent border */
  background-clip: padding-box, border-box;
  background-origin: border-box;
  transition: transform 0.2s ease !important;
}
.btn-gsap-gradient:hover {
  background-image: linear-gradient(#0f172a, #0f172a), 
                    linear-gradient(135deg, #4f46e5, #0284c7, #059669);
}
.btn-gsap-gradient .btn-arrow {
  transition: transform 0.25s ease !important;
}
.btn-gsap-gradient:hover .btn-arrow {
  transform: translateX(4px) !important;
}

/* Outline Buttons - Gradient Border Hover */
.btn-outline-gsap-gradient {
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 2px solid transparent !important; /* Always transparent border to allow gradient display */
  background-image: linear-gradient(#ffffff, #ffffff), 
                    linear-gradient(#e2e8f0, #e2e8f0); /* Default light border */
  background-clip: padding-box, border-box;
  background-origin: border-box;
  transition: color 0.3s ease, background-image 0.3s ease !important;
}

/* Outline Buttons with dark borders */
.border-slate-900.btn-outline-gsap-gradient {
  background-image: linear-gradient(#ffffff, #ffffff), 
                    linear-gradient(#0f172a, #0f172a);
}

.btn-outline-gsap-gradient:hover,
.border-slate-900.btn-outline-gsap-gradient:hover {
  background-image: linear-gradient(#ffffff, #ffffff), 
                    linear-gradient(135deg, #4f46e5, #0284c7, #059669);
  color: #0f172a !important; /* Keep text high-contrast dark */
}

/* Skewed Blaze Glisten Shine Sweep Effect */
.btn-blaze-effect {
  position: absolute;
  top: 0;
  left: -150%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  ) !important;
  transform: skewX(-25deg);
  z-index: 2; /* Sits above the gradient background */
  pointer-events: none;
  transition: left 0s ease; /* Instantly snaps back to left on hover out */
}

/* Blaze Sweep on Hover */
.btn-gsap-gradient:hover .btn-blaze-effect,
.btn-outline-gsap-gradient:hover .btn-blaze-effect {
  left: 150%;
  transition: left 0.85s cubic-bezier(0.19, 1, 0.22, 1) !important;
}
