/* =========================================================
   Relabs DNA Kenya Ltd — Main Stylesheet
========================================================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--brand-white);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--brand-black);
  line-height: 1.25;
}

a { text-decoration: none; color: var(--brand-blue); transition: var(--transition-fast); }
a:hover { color: var(--brand-maroon); }

img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  top: -60px; left: 0;
  background: var(--brand-blue);
  color: #fff;
  padding: 10px 18px;
  z-index: 3000;
}
.skip-link:focus { top: 0; }

section { padding: var(--section-padding) 0; }
.section-sm { padding: var(--section-padding-sm) 0; }
.bg-grey { background: var(--brand-grey); }
.bg-dark-brand { background: var(--brand-black); color: var(--text-on-dark); }

/* =========================================================
   PAGE LOADER
========================================================= */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--brand-white);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.loaded { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo { width: 64px; height: 64px; animation: pulse-loader 1.4s ease-in-out infinite; }
.loader-bar { width: 160px; height: 4px; background: #E5EAF2; border-radius: 4px; margin-top: 16px; overflow: hidden; }
.loader-bar span { display: block; width: 40%; height: 100%; background: var(--gradient-primary); animation: loading-slide 1.2s ease-in-out infinite; border-radius: 4px; }

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
  background: var(--brand-black);
  color: #cfd6e0;
  font-size: 0.85rem;
}
.topbar-link { color: #cfd6e0; }
.topbar-link i { color: var(--brand-green); margin-right: 4px; }
.topbar-link:hover { color: #fff; }
.topbar-social {
  color: #cfd6e0; width: 28px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(255,255,255,0.08); transition: var(--transition-fast);
}
.topbar-social:hover { background: var(--brand-green); color: #fff; }

/* =========================================================
   NAVBAR
========================================================= */
.site-header { z-index: 1030; }
.main-navbar {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 0.65rem 0;
  transition: var(--transition-base);
}
.main-navbar .navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.6rem 1rem !important;
  position: relative;
}
.main-navbar .navbar-nav .nav-link.active,
.main-navbar .navbar-nav .nav-link:hover { color: var(--brand-blue); }
.main-navbar .navbar-nav .nav-link.active::after {
  content: ''; position: absolute; left: 1rem; right: 1rem; bottom: 0.25rem;
  height: 2px; background: var(--brand-green); border-radius: 2px;
}
.btn-icon {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; background: var(--brand-grey);
  color: var(--brand-blue);
}
.btn-icon:hover { background: var(--brand-blue); color: #fff; }

/* =========================================================
   BUTTONS
========================================================= */
.btn { border-radius: var(--radius-pill); font-weight: 600; padding: 0.65rem 1.6rem; transition: var(--transition-base); border: none; }
.btn-brand-blue { background: var(--gradient-primary); color: #fff; }
.btn-brand-blue:hover { background: var(--brand-blue-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-brand-maroon { background: var(--gradient-maroon); color: #fff; }
.btn-brand-maroon:hover { background: var(--brand-maroon-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-brand-green { background: var(--gradient-green); color: #fff; }
.btn-brand-green:hover { background: var(--brand-green-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline-brand { background: transparent; border: 2px solid var(--brand-blue); color: var(--brand-blue); }
.btn-outline-brand:hover { background: var(--brand-blue); color: #fff; }
.btn-white { background: #fff; color: var(--brand-blue); }
.btn-white:hover { background: var(--brand-grey); color: var(--brand-blue-dark); }

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  background: var(--gradient-hero), url('../images/hero/hero-bg.svg') center/cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(63,163,77,0.25), transparent 45%);
}
.hero-content { position: relative; z-index: 2; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 16px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600;
  backdrop-filter: var(--glass-blur);
}
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); color: #fff; font-weight: 800; }
.hero p.lead { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 620px; }
.hero-stats-strip {
  position: relative; z-index: 2; margin-top: 3rem;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-glass);
}
.hero-stats-strip .stat-number { font-size: 2rem; font-weight: 800; color: var(--brand-blue); }
.hero-stats-strip .stat-label { font-size: 0.85rem; color: var(--text-secondary); }
.hero-scroll-cue {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.75); z-index: 2; font-size: 1.5rem;
  animation: bounce-down 2s infinite;
}

/* =========================================================
   SECTION HEADINGS
========================================================= */
.section-eyebrow {
  display: inline-block; color: var(--brand-maroon); font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; font-size: 0.8rem;
  background: rgba(140,29,63,0.08); padding: 5px 14px; border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1rem; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 680px; }

/* =========================================================
   GLASS / FEATURE CARDS
========================================================= */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  transition: var(--transition-base);
}
.glass-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.feature-card {
  background: #fff; border-radius: var(--radius-md); padding: 2rem;
  box-shadow: var(--shadow-sm); border: 1px solid #EEF1F6;
  transition: var(--transition-base); height: 100%;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon {
  width: 62px; height: 62px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary); color: #fff; font-size: 1.6rem; margin-bottom: 1.25rem;
}
.feature-card:nth-child(3n+2) .feature-icon { background: var(--gradient-maroon); }
.feature-card:nth-child(3n+3) .feature-icon { background: var(--gradient-green); }

/* Product Cards */
.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid #EEF1F6; height: 100%;
  transition: var(--transition-base); display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.product-card .product-img { aspect-ratio: 16/10; overflow: hidden; background: var(--brand-grey); }
.product-card .product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.product-card:hover .product-img img { transform: scale(1.08); }
.product-card .product-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.product-card .product-body ul { padding-left: 1.1rem; margin-bottom: 1.25rem; }
.product-card .product-body ul li { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.product-card .btn { margin-top: auto; align-self: flex-start; }

/* Service Cards */
.service-card { text-align: center; padding: 2.25rem 1.5rem; }
.service-card .feature-icon { margin: 0 auto 1.25rem; }

/* Testimonial */
.testimonial-card {
  background: #fff; border-radius: var(--radius-lg); padding: 2.5rem;
  box-shadow: var(--shadow-md); position: relative;
}
.testimonial-card .quote-icon { font-size: 2.5rem; color: var(--brand-blue-light); }
.testimonial-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--brand-blue-light);
}

/* Partner / Client Logo Grid */
.logo-box {
  background: #fff; border-radius: var(--radius-md); padding: 1.75rem 1.25rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); border: 1px solid #EEF1F6; height: 120px;
  transition: var(--transition-base); filter: grayscale(20%);
}
.logo-box:hover { filter: grayscale(0%); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.logo-box img { max-height: 60px; }

.client-chip {
  background: #fff; border: 1px solid #EEF1F6; border-radius: var(--radius-pill);
  padding: 0.9rem 1.5rem; font-weight: 600; color: var(--brand-blue-dark);
  box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition-base);
}
.client-chip:hover { background: var(--brand-blue); color: #fff; transform: translateY(-3px); }
.client-chip i { color: var(--brand-green); }
.client-chip:hover i { color: #fff; }

/* Stats */
.stats-section {
  background: var(--gradient-primary);
  color: #fff; position: relative; overflow: hidden;
}
.stats-section::after {
  content: ''; position: absolute; inset: 0;
  background: url('../images/backgrounds/pattern-dots.svg') center/cover;
  opacity: 0.08;
}
.stat-item { position: relative; z-index: 1; text-align: center; }
.stat-item .num { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; }
.stat-item .lbl { color: rgba(255,255,255,0.85); font-weight: 500; }

/* CTA Banner */
.cta-banner {
  background: var(--gradient-maroon); border-radius: var(--radius-lg);
  padding: 3rem; color: #fff; position: relative; overflow: hidden;
}

/* News */
.news-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #EEF1F6; height: 100%; transition: var(--transition-base); }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.news-card .news-img { aspect-ratio: 16/10; overflow: hidden; }
.news-card .news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .news-body { padding: 1.5rem; }
.news-date { color: var(--brand-maroon); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Downloads */
.download-item {
  background: #fff; border: 1px solid #EEF1F6; border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-sm); transition: var(--transition-base);
}
.download-item:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.download-item .dl-icon { font-size: 2rem; color: var(--brand-maroon); }

/* FAQ Accordion */
.accordion-item { border: 1px solid #EEF1F6; border-radius: var(--radius-md) !important; margin-bottom: 1rem; overflow: hidden; }
.accordion-button { font-weight: 600; color: var(--brand-black); }
.accordion-button:not(.collapsed) { background: var(--brand-blue-light); color: var(--brand-blue-dark); box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: var(--brand-blue); }

/* Forms */
.professional-form { background: #fff; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); border: 1px solid #EEF1F6; }
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.form-control, .form-select {
  border-radius: var(--radius-sm); border: 1.5px solid #E3E8F0; padding: 0.7rem 1rem;
  transition: var(--transition-fast);
}
.form-control:focus, .form-select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(42,92,170,0.12); }

/* Breadcrumb */
.breadcrumb-nav { background: var(--brand-grey); padding: 1rem 0; }
.breadcrumb-item a { color: var(--brand-blue); }
.breadcrumb-item.active { color: var(--text-muted); }

/* Page Header (inner pages) */
.page-header {
  background: var(--gradient-hero), url('../images/backgrounds/page-header-bg.svg') center/cover no-repeat;
  color: #fff; padding: 5.5rem 0 4rem; position: relative;
}
.page-header h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); }
.page-header p { color: rgba(255,255,255,0.85); max-width: 620px; }

/* Team */
.team-card { text-align: center; }
.team-card .team-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1/1; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.team-card .team-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Timeline (About) */
.timeline { position: relative; padding-left: 2rem; border-left: 3px solid var(--brand-blue-light); }
.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.42rem; top: 0.15rem;
  width: 16px; height: 16px; border-radius: 50%; background: var(--brand-blue);
  border: 3px solid #fff; box-shadow: 0 0 0 3px var(--brand-blue-light);
}
.timeline-item .year { font-weight: 800; color: var(--brand-maroon); font-size: 1.1rem; }

/* Values */
.value-card { text-align: center; padding: 2rem 1.25rem; }

/* =========================================================
   FOOTER
========================================================= */
.site-footer { background: #14171C; color: #B7BFCC; }
.footer-logo-box {
  display: inline-flex; align-items: center; background: #fff;
  padding: 10px 18px; border-radius: var(--radius-md);
}
.footer-cta { background: var(--gradient-primary); color: #fff; padding: 2.5rem 0; }
.footer-cta h3 { color: #fff; }
.footer-main { padding: 4rem 0 2rem; }
.footer-about { font-size: 0.92rem; color: #9AA4B4; }
.footer-heading { color: #fff; font-weight: 700; margin-bottom: 1.25rem; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a { color: #9AA4B4; }
.footer-links a:hover { color: var(--brand-green); padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { margin-bottom: 0.85rem; font-size: 0.92rem; display: flex; gap: 10px; align-items: flex-start; }
.footer-contact i { color: var(--brand-green); margin-top: 3px; }
.footer-contact a { color: #B7BFCC; }
.footer-social {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.06);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
}
.footer-social:hover { background: var(--brand-green); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1.25rem 0; font-size: 0.85rem; }
.footer-legal a { color: #9AA4B4; }
.footer-legal a:hover { color: var(--brand-green); }

/* =========================================================
   FLOATING BUTTONS
========================================================= */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 1040;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; box-shadow: 0 6px 20px rgba(37,211,102,0.45);
  animation: pulse-whatsapp 2.4s infinite;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }

.quote-float {
  position: fixed; bottom: 24px; left: 24px; z-index: 1040;
  background: var(--gradient-maroon); color: #fff; padding: 0.85rem 1.25rem;
  border-radius: var(--radius-pill); font-weight: 700; font-size: 0.88rem;
  box-shadow: var(--shadow-lg); display: inline-flex; align-items: center; gap: 6px;
}
.quote-float:hover { color: #fff; transform: translateY(-3px); }

.back-to-top {
  position: fixed; bottom: 92px; right: 24px; z-index: 1039;
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-blue);
  color: #fff; border: none; display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); transition: var(--transition-fast);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--brand-blue-dark); }

/* =========================================================
   MISC
========================================================= */
.text-brand-blue { color: var(--brand-blue) !important; }
.text-brand-maroon { color: var(--brand-maroon) !important; }
.text-brand-green { color: var(--brand-green) !important; }
.bg-brand-blue { background: var(--brand-blue) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.shadow-soft { box-shadow: var(--shadow-md) !important; }

.error-page { min-height: 70vh; display: flex; align-items: center; }
.error-code { font-size: clamp(5rem, 15vw, 10rem); font-weight: 800; color: var(--brand-blue-light); line-height: 1; }

.search-result-item { padding: 1.5rem; border-bottom: 1px solid #EEF1F6; }
.search-result-item h5 a { color: var(--brand-blue); }
.search-highlight { background: #FFF3B0; padding: 0 2px; border-radius: 3px; }

table.table-clean th { color: var(--text-secondary); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
