/* ==========================================================================
   DigiSpace Custom Design System & Utilities — Rebuild v3.0
   ========================================================================== */

:root {
  /* Backgrounds */
  --bg-primary:     #FFFFFF;
  --bg-secondary:   #F7F3FF;   /* Very light purple tint */
  --bg-dark:        #1A0533;   /* Deep purple-black for hero + dark sections */
  --bg-card:        #FFFFFF;

  /* Purple Brand */
  --purple-900:     #1A0533;   /* Darkest — hero background */
  --purple-800:     #2D0A5A;   /* Dark sections */
  --purple-700:     #4A0E8F;   /* Primary brand purple */
  --purple-600:     #6B21A8;   /* Buttons, CTAs */
  --purple-500:     #7C3AED;   /* Hover states */
  --purple-400:     #9333EA;   /* Gradient mid */
  --purple-300:     #A855F7;   /* Lighter accent */
  --purple-100:     #EDE9FE;   /* Very light — badges, chips */
  --purple-50:      #FAF5FF;   /* Near-white purple tint */

  /* Gradients */
  --gradient-hero:  linear-gradient(135deg, #1A0533 0%, #2D0A5A 50%, #4A0E8F 100%);
  --gradient-cta:   linear-gradient(135deg, #6B21A8 0%, #9333EA 50%, #C026D3 100%);
  --gradient-text:  linear-gradient(135deg, #7C3AED 0%, #C026D3 100%);
  --gradient-card:  linear-gradient(145deg, #FAF5FF 0%, #EDE9FE 100%);

  /* Text */
  --text-primary:   #0F0A1A;
  --text-secondary: #4B5563;
  --text-light:     #FFFFFF;
  --text-muted:     #9CA3AF;
  --text-purple:    #6B21A8;

  /* UI */
  --border-light:   #E9D5FF;
  --border-purple:  #C4B5FD;
  --shadow-sm:      0 2px 8px rgba(107, 33, 168, 0.08);
  --shadow-md:      0 4px 24px rgba(107, 33, 168, 0.12);
  --shadow-lg:      0 8px 48px rgba(107, 33, 168, 0.18);
}

/* Typography Base Rules */
h1 { font: 800 clamp(2.2rem, 6vw, 4.5rem)/1.15 'Space Grotesk', sans-serif; }
h2 { font: 700 clamp(1.65rem, 4vw, 2.75rem)/1.2 'Space Grotesk', sans-serif; }
h3 { font: 700 clamp(1.15rem, 2.5vw, 1.6rem)/1.35 'Space Grotesk', sans-serif; }
body { font: 400 clamp(0.85rem, 1.5vw, 1rem)/1.75 'Inter', sans-serif; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--purple-300);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple-600);
}

/* --------------------------------------------------------------------------
   Layout and Design System Utilities
   -------------------------------------------------------------------------- */

/* Gradient text utility */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Primary CTA button */
.btn-primary {
  background: var(--gradient-cta);
  color: white !important;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font: 600 1rem 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.3);
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  opacity: 0.95;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.45);
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: white !important;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 12px 28px;
  font: 500 1rem 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-ghost:hover { 
  border-color: white; 
  background: rgba(255,255,255,0.08); 
  transform: translateY(-1px);
}

/* Purple section button (light bg sections) */
.btn-purple {
  background: var(--purple-600);
  color: white !important;
  border-radius: 50px;
  padding: 14px 32px;
  font: 600 1rem 'Space Grotesk', sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(107, 33, 168, 0.2);
}
.btn-purple:hover { 
  background: var(--purple-500); 
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(107, 33, 168, 0.3);
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Service tab system (Overriding utility classes for solid state styling) */
.tab-btn { 
  background-color: #ffffff !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-light) !important;
  transition: all 0.2s ease; 
}
.tab-btn:hover {
  background-color: var(--purple-50) !important;
  color: var(--purple-700) !important;
}
.tab-btn.active { 
  background-color: var(--purple-600) !important; 
  color: #ffffff !important; 
  border-color: var(--purple-600) !important;
  box-shadow: 0 4px 12px rgba(107, 33, 168, 0.25);
}
.tab-content { 
  display: none; 
}
.tab-content.active { 
  display: block; 
  animation: tabFadeIn 0.3s ease-in-out;
}

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

/* Floating Action Buttons Container (Left bottom) */
.floating-actions-left {
  position: fixed;
  bottom: 84px; /* Above the news marquee */
  left: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Base button style */
.float-btn {
  width: 44px; /* Smaller size */
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.float-btn:hover {
  transform: scale(1.1);
}

/* WhatsApp specific style with attention-grabbing animation */
.wa-float-btn {
  background-color: #25D366;
  animation: wa-wiggle 3s infinite ease-in-out;
}
@keyframes wa-wiggle {
  0%, 100% { transform: scale(1) rotate(0deg); box-shadow: 0 4px 14px rgba(37,211,102,0.4); }
  45% { transform: scale(1.08) rotate(0deg); }
  50% { transform: scale(1.08) rotate(-8deg); }
  55% { transform: scale(1.08) rotate(8deg); }
  60% { transform: scale(1.08) rotate(-8deg); }
  65% { transform: scale(1.08) rotate(8deg); }
  70% { transform: scale(1.08) rotate(0deg); box-shadow: 0 4px 20px rgba(37,211,102,0.6); }
}

/* Call specific style */
.call-float-btn {
  background-color: #6B21A8;
  color: white !important;
}
.call-float-btn:hover {
  background-color: #7C3AED;
}

/* Back to Top (Right bottom) */
.back-to-top-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #E9D5FF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(107, 33, 168, 0.08);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  cursor: pointer;
}
.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top-btn:hover {
  background-color: #FAF5FF;
  border-color: #C4B5FD;
  transform: scale(1.1);
}

/* Sticky header scroll effect - Strict overrides */
.site-header { 
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s; 
}
.site-header.scrolled { 
  background: rgba(255, 255, 255, 0.98) !important; 
  box-shadow: 0 2px 24px rgba(107,33,168,0.1); 
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Nav Link Color Shifts (Tailwind text-white override) */
.logo-text { color: #ffffff !important; transition: color 0.3s; }
.nav-link { color: rgba(255, 255, 255, 0.85) !important; transition: color 0.3s; }
.nav-link:hover { color: #ffffff !important; }
.header-phone { color: #ffffff !important; transition: color 0.3s; }
.header-phone:hover { color: var(--purple-300) !important; }
.hamburger-icon { stroke: #ffffff !important; transition: stroke 0.3s; }

/* Apply dark colors when header is scrolled */
.site-header.scrolled .logo-text { color: var(--purple-900) !important; }
.site-header.scrolled .nav-link { color: var(--text-secondary) !important; }
.site-header.scrolled .nav-link:hover { color: var(--purple-700) !important; }
.site-header.scrolled .header-phone { color: var(--text-primary) !important; }
.site-header.scrolled .header-phone:hover { color: var(--purple-600) !important; }
.site-header.scrolled .hamburger-icon { stroke: var(--purple-900) !important; }

/* Custom UI enhancements */
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Accordion height and transition styling */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}
.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background-color: #ffffff;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.accordion-item:hover {
  border-color: var(--border-purple);
  box-shadow: var(--shadow-sm);
}
.accordion-item.active {
  border-color: var(--purple-400);
  box-shadow: var(--shadow-md);
}
.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}

/* Badge/Chips */
.badge-chip {
  background: var(--purple-100);
  color: var(--purple-700);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  border: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   Breaking News Banner & Marquee Animation
   -------------------------------------------------------------------------- */
@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.animate-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Hero Carousel Slider
   -------------------------------------------------------------------------- */
.hero-slide {
  opacity: 0;
  z-index: 10;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-slide.active {
  opacity: 1;
  z-index: 20;
}

.slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}
.slide-dot.active {
  background-color: #ffffff;
  width: 28px;
  border-radius: 5px;
}
