/* ==========================================================================
   IHSAN COMMUNICATIONS - Custom Stylesheet
   Day Mode, Micro-Interactions, Floating Social Dock & Responsive Enhancements
   ========================================================================== */

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

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --safaricom-green: #009A44;
  --safaricom-green-dark: #007A35;
  --safaricom-green-light: #E8F7EE;
  --safaricom-lime: #84BD00;
  --ihsan-red: #E2231A;
  --ihsan-red-dark: #B71C1C;
  --ihsan-red-light: #FDE8E8;
  --brand-slate: #1E293B;
  --bg-day: #F8FAFC;
}

body {
  font-family: var(--font-sans);
  background-color: #FAFCFE;
  color: #1E293B;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Day Mode Glassmorphism */
.glass-day {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

/* Subtle Gradient Backgrounds */
.bg-mesh-day {
  background-color: #FAFCFE;
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 154, 68, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(226, 35, 26, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(132, 189, 0, 0.06) 0px, transparent 60%);
}

.bg-radial-hero {
  background: radial-gradient(circle at 80% 20%, rgba(0, 154, 68, 0.08) 0%, rgba(248, 250, 252, 0) 65%),
              radial-gradient(circle at 10% 80%, rgba(226, 35, 26, 0.06) 0%, rgba(248, 250, 252, 0) 50%);
}

/* Badge Pulse Animation */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 154, 68, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(0, 154, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 154, 68, 0);
  }
}

.pulse-indicator {
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Float Animations */
@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float-slow {
  animation: float-slow 4s ease-in-out infinite;
}

@keyframes float-reverse {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(8px);
  }
}

.animate-float-reverse {
  animation: float-reverse 4.5s ease-in-out infinite;
}

/* Card Hover Elevation */
.card-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 154, 68, 0.1);
}

/* Floating Right-Side Social Bar */
.floating-social-bar {
  position: fixed;
  right: 18px;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-items-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: right center;
}

/* Hidden / Minimized State for Social Dock */
.floating-social-bar.is-hidden .social-items-group {
  opacity: 0;
  pointer-events: none;
  transform: translateX(65px) scale(0.85);
  max-height: 0;
  gap: 0;
  margin: 0;
  overflow: hidden;
}

.floating-social-bar.is-hidden {
  right: 14px;
}

.social-toggle-item {
  cursor: pointer;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.floating-social-bar.is-hidden .social-toggle-item {
  background: #009A44 !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 22px rgba(0, 154, 68, 0.5) !important;
  animation: socialPulse 3s ease-in-out infinite;
}

@keyframes socialPulse {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(0, 154, 68, 0.45);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 26px rgba(0, 154, 68, 0.7);
    transform: scale(1.08);
  }
}

.floating-social-bar.is-hidden .social-toggle-item:hover {
  background: #007a36 !important;
  transform: scale(1.15) !important;
}

.social-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.8);
  color: #334155;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-item:hover {
  transform: translateX(-5px) scale(1.08);
}

.social-item .social-tooltip {
  position: absolute;
  right: 56px;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-item .social-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent #0F172A;
}

.social-item:hover .social-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Brand specific social hover states */
.social-item.social-whatsapp:hover {
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.social-item.social-telegram:hover {
  background: #229ED9;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(34, 158, 217, 0.35);
}

.social-item.social-facebook:hover {
  background: #1877F2;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.35);
}

.social-item.social-tiktok:hover {
  background: #000000;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.social-item.social-instagram:hover {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(221, 42, 123, 0.35);
}

.social-item.social-linkedin:hover {
  background: #0A66C2;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(10, 102, 194, 0.35);
}

.social-item.social-phone:hover {
  background: #009A44;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(0, 154, 68, 0.35);
}

/* Responsive Floating Dock (Always Vertically Centered on Right Side) */
@media (max-width: 768px) {
  .floating-social-bar {
    right: 10px;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    gap: 8px;
  }
  .social-items-group {
    gap: 8px;
  }
  .social-item {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .social-item .social-tooltip {
    display: none;
  }
  .floating-social-bar.is-hidden .social-items-group {
    opacity: 0;
    pointer-events: none;
    transform: translateX(65px) scale(0.85);
    max-height: 0;
    gap: 0;
    overflow: hidden;
  }
}

/* Decorative Gradient Text */
.text-gradient-safaricom {
  background: linear-gradient(135deg, #009A44 0%, #00682D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-ihsan {
  background: linear-gradient(135deg, #E2231A 0%, #A81008 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Day Mode Soft Badges */
.badge-safaricom {
  background-color: #E8F7EE;
  color: #00853E;
  border: 1px solid rgba(0, 154, 68, 0.2);
}

.badge-ihsan {
  background-color: #FEECEB;
  color: #D32F2F;
  border: 1px solid rgba(226, 35, 26, 0.2);
}

/* Buttons */
.btn-safaricom {
  background: linear-gradient(135deg, #009A44 0%, #00853E 100%);
  color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 154, 68, 0.25);
}
.btn-safaricom:hover {
  background: linear-gradient(135deg, #00853E 0%, #00682D 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 154, 68, 0.35);
}

.btn-ihsan {
  background: linear-gradient(135deg, #E2231A 0%, #C91C14 100%);
  color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(226, 35, 26, 0.25);
}
.btn-ihsan:hover {
  background: linear-gradient(135deg, #C91C14 0%, #9B110B 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(226, 35, 26, 0.35);
}

/* Toast Notification */
#toast-notification {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Utility: Cross-Browser Hide Scrollbar (for horizontal scrolling pills)
   ========================================================================== */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Quick Links Pill Micro-Interactions */
.quick-link-chip {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.quick-link-chip:hover {
  transform: translateY(-1px);
}
.quick-link-chip:active {
  transform: scale(0.96);
}
