/* ================================================================
   KwikestCRM — main.css
   Global styles shared across ALL pages.
   Sections:
     1. Custom Properties (Design Tokens)
     2. Global Reset & Base
     3. Typography
     4. Buttons
     5. Navbar
     6. Footer
     7. Scroll-to-Top
     8. Cookie Banner
     9. Section Utilities
    10. Animations & Keyframes
    11. Responsive Overrides
================================================================ */


/* ----------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
---------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --primary:        #4f46e5;
  --primary-dark:   #3730a3;
  --primary-light:  #818cf8;
  --primary-xlight: #e0e7ff;
  --secondary:      #06b6d4;
  --secondary-dark: #0891b2;
  --accent-green:   #10b981;
  --accent-amber:   #f59e0b;
  --accent-pink:    #ec4899;
  --accent-orange:  #f97316;

  /* Neutral Colors */
  --dark:           #0f172a;
  --dark-secondary: #1e293b;
  --dark-tertiary:  #334155;
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;
  --white:          #ffffff;
  --surface:        #f8fafc;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --gradient-primary-brand: linear-gradient(135deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 50%, rgb(255, 255, 255) 100%);
  --gradient-hero:    linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
  --gradient-dark:    linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-card:    linear-gradient(135deg,
                        rgba(79, 70, 229, 0.08) 0%,
                        rgba(6, 182, 212, 0.08) 100%);

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 40px rgba(0,0,0,.10), 0 4px 16px rgba(0,0,0,.06);
  --shadow-xl:      0 20px 60px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);
  --shadow-primary: 0 8px 32px rgba(79, 70, 229, .25);

  /* Border Radius */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-main:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}


/* ----------------------------------------------------------------
   2. GLOBAL RESET & BASE
---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  margin: 0;
  padding: 0;
}


/* ----------------------------------------------------------------
   3. TYPOGRAPHY
---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-xlight);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-label.light {
  background: rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, .9);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-title.light {
  color: var(--white);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.section-subtitle.light {
  color: rgba(255, 255, 255, .75);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ----------------------------------------------------------------
   4. BUTTONS
---------------------------------------------------------------- */
.btn {
  font-family: var(--font-main);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Ripple overlay on hover */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: var(--transition);
}
.btn:hover::after {
  background: rgba(255, 255, 255, .08);
}
.btn:active {
  transform: scale(.98);
}

/* Primary */
.btn-primary-custom {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 14px 28px;
  font-size: .95rem;
  box-shadow: var(--shadow-primary);
}
.btn-primary-custom:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(79, 70, 229, .35);
}

/* Outline */
.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  padding: 13px 27px;
  font-size: .95rem;
  border: 2px solid var(--primary);
}
.btn-outline-custom:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* White (for dark backgrounds) */
.btn-white {
  background: var(--white);
  color: var(--primary);
  padding: 14px 28px;
  font-size: .95rem;
  box-shadow: var(--shadow-lg);
}
.btn-white:hover {
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Ghost White */
.btn-ghost-white {
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  padding: 13px 27px;
  font-size: .95rem;
  border: 2px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(8px);
}
.btn-ghost-white:hover {
  background: rgba(255, 255, 255, .2);
  color: var(--white);
  border-color: rgba(255, 255, 255, .5);
  transform: translateY(-2px);
}

/* Size modifier */
.btn-lg-custom {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}


/* ----------------------------------------------------------------
   5. NAVBAR
---------------------------------------------------------------- */
#mainNav {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  padding: 0;
  transition: var(--transition);
  z-index: 9999;
}

#mainNav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
}

/* Brand */
.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(-gradient-primary-brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Nav links */
.navbar-nav .nav-link {
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-primary) !important;
  padding: 28px 14px !important;
  position: relative;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
}

/* Underline indicator */
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  border-radius: 2px;
  transition: transform .3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

/* Login link */
.nav-login {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-primary) !important;
  padding: 8px 16px !important;
}
.nav-login:hover { color: var(--primary) !important; }

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-top: 8px;
  min-width: 230px;
  animation: dropdownFade .2s ease;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}
.dropdown-item i {
  width: 18px;
  color: var(--primary);
  flex-shrink: 0;
}
.dropdown-item:hover {
  background: var(--primary-xlight);
  color: var(--primary);
}


/* ----------------------------------------------------------------
   6. FOOTER
---------------------------------------------------------------- */
#footer {
  background: var(--dark);
  color: rgba(255, 255, 255, .7);
}

.footer-brand { margin-bottom: 1.25rem; }

.footer-tagline {
  font-size: .875rem;
  color: rgba(255, 255, 255, .5);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .6);
  font-size: .9rem;
  transition: var(--transition);
}
.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-heading {
  font-size: .8rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.25rem;
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: rgba(255, 255, 255, .55);
  font-size: .875rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover {
  color: var(--white);
  gap: 10px;
}

/* Contact Strip */
.footer-contact-strip {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 24px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-contact-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.footer-contact-label {
  font-size: .7rem;
  color: rgba(255, 255, 255, .4);
  margin-bottom: 2px;
}

.footer-contact-value {
  color: rgba(255, 255, 255, .8);
  font-size: .875rem;
  font-weight: 600;
  transition: var(--transition);
}
a.footer-contact-value:hover {
  color: var(--primary-light);
}

/* Divider & Bottom */
.footer-divider {
  border-color: rgba(255, 255, 255, .08);
  margin: 36px 0 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-text {
  font-size: .8rem;
  color: rgba(255, 255, 255, .4);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  font-size: .8rem;
  color: rgba(255, 255, 255, .4);
  transition: var(--transition);
}
.footer-bottom-links a:hover { color: var(--white); }


/* ----------------------------------------------------------------
   7. SCROLL-TO-TOP BUTTON
---------------------------------------------------------------- */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9990;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-primary);
}
.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, .4);
}


/* ----------------------------------------------------------------
   8. COOKIE BANNER
---------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-secondary);
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 16px 24px;
  z-index: 9998;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }

.cookie-text {
  flex: 1;
  font-size: .85rem;
  color: rgba(255, 255, 255, .7);
  min-width: 200px;
}
.cookie-text a { color: var(--primary-light); }


/* ----------------------------------------------------------------
   9. SECTION UTILITIES
---------------------------------------------------------------- */
.section-padding    { padding: 100px 0; }
.section-padding-sm { padding:  64px 0; }

/* Icon box colors (reused across pages) */
.fi-indigo  { background: #e0e7ff; color: var(--primary); }
.fi-cyan    { background: #cffafe; color: var(--secondary-dark); }
.fi-green   { background: #d1fae5; color: var(--accent-green); }
.fi-amber   { background: #fef3c7; color: #d97706; }
.fi-pink    { background: #fce7f3; color: var(--accent-pink); }
.fi-orange  { background: #ffedd5; color: var(--accent-orange); }
.fi-purple  { background: #f3e8ff; color: #9333ea; }
.fi-teal    { background: #ccfbf1; color: #0d9488; }
.fi-red     { background: #fee2e2; color: #ef4444; }
.fi-blue    { background: #dbeafe; color: #3b82f6; }

/* Progress bar */
.progress-bar-custom {
  height: 6px;
  border-radius: 100px;
  background: var(--primary-xlight);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--gradient-primary);
  transition: width 1.5s ease;
}

/* Lazy image fade-in */
.lazy-img          { opacity: 0; transition: opacity .5s ease; }
.lazy-img.loaded   { opacity: 1; }

/* AOS pointer fix */
[data-aos]          { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }


/* ----------------------------------------------------------------
   10. ANIMATIONS & KEYFRAMES
---------------------------------------------------------------- */
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}

@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(20px, -20px) scale(1.05); }
}

@keyframes scroll-brands {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ----------------------------------------------------------------
   11. RESPONSIVE OVERRIDES
---------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .section-padding { padding: 72px 0; }

  .navbar-nav .nav-link {
    padding: 12px 16px !important;
  }
  .navbar-nav .nav-link::after { display: none; }

  .footer-contact-strip { padding: 16px 20px; }
}

@media (max-width: 767.98px) {
  .section-padding { padding: 56px 0; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links { justify-content: center; }

  .scroll-top-btn {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 575.98px) {
  .btn-lg-custom {
    padding: 14px 24px;
    font-size: .9rem;
  }
}