/* ================================================
   TECH247 - Complete Stylesheet
   ================================================ */

:root {
  --primary-color: #295bff;;
  --secondary-color: #0ea5e9;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --dark-bg: #1a1a1a;
  --light-bg: #f9fafb;
  --text-dark: #1f2937;
  --text-light: #000000;
  --border-color: #e5e7eb;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ================================================
   GLOBAL STYLES
   ================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #fff;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  color: var(--dark-bg);
}

h2 {
  font-size: 2.2rem;
  color: var(--dark-bg);
  text-align: center;
  margin-bottom: 3rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

/* ================================================
   CONTAINER & LAYOUT
   ================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-light {
  background-color: var(--light-bg);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.col {
  flex: 1;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
}

.btn-accent:hover {
  background-color: #d97706;
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* ================================================
   CARDS
   ================================================ */

.card {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: var(--light-bg);
  border-radius: 10px;
  color: var(--primary-color);
  margin-left: auto;
  margin-right: auto;
}

.card-icon i {
  font-size: 2.5rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card-text {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ================================================
   HEADER / NAVIGATION
   ================================================ */

header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

.logo span {
  color: var(--secondary-color);
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-menu a {
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.nav-menu a.active {
  color: var(--primary-color) !important;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 5px;
  font-weight: 700;
  background: rgba(41, 91, 255, 0.08);
  border-radius: 4px 4px 0 0;
}

/* Book Now Button in Nav */
.btn-book-now {
  background: var(--primary-color);
  color: white !important;
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-book-now:hover {
  background: #1a45cc;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(41, 91, 255, 0.4);
}

.toggle-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* ================================================
   HERO SECTION
   ================================================ */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 120px 0 80px;
  text-align: center;
  overflow: hidden;
}

/* Video Background Container */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Video Overlay for text contrast */
.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(41, 91, 255, 0.85) 0%, rgba(14, 165, 233, 0.75) 100%);
  z-index: 1;
}

/* Ensure hero content sits above video */
.hero .container {
  position: relative;
  z-index: 2;
}

/* Fallback for browsers that don't support video autoplay */
@supports not (background: video()) {
  .hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  }
}

/* Optimize video loading */
.hero-video {
  preload: auto;
}

.hero h1 {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.hero .subheadline {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

.hero .trust-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 15px 25px;
  border-radius: 50px;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================
   FORM STYLES
   ================================================ */

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="phone"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ================================================
   FOOTER
   ================================================ */

/* ── Footer (dark theme) ─────────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(180deg, #0a1628 0%, #060d1a 100%);
  border-top: 1px solid rgba(41,91,255,0.15);
  color: #64748b;
}

.footer-main { padding: 4rem 0 3rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
}

/* Brand */
.footer-logo {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
  display: inline-block;
  text-decoration: none;
}
.footer-logo .logo-tech { color: #e2e8f0; }
.footer-logo .logo-247  { color: #295bff; }

.footer-tagline {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 240px;
}

.footer-social { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(41,91,255,0.08);
  border: 1px solid rgba(41,91,255,0.2);
  border-radius: 8px;
  color: #64748b;
  font-size: 0.82rem;
  transition: all 0.2s;
  text-decoration: none;
}
.footer-social a:hover {
  background: rgba(41,91,255,0.22);
  border-color: #295bff;
  color: #93c5fd;
  transform: translateY(-2px);
}

/* Columns */
.footer-heading {
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.footer-heading i { color: #295bff; font-size: 0.7rem; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-links a i { font-size: 0.55rem; color: #295bff; opacity: 0.5; transition: opacity 0.2s; }
.footer-links a:hover { color: #93c5fd; padding-left: 3px; }
.footer-links a:hover i { opacity: 1; }

/* Contact list */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #64748b;
}
.footer-contact-list i {
  color: #295bff;
  font-size: 0.82rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.footer-contact-list a { color: #64748b; text-decoration: none; transition: color 0.2s; }
.footer-contact-list a:hover { color: #93c5fd; }

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #295bff;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.footer-cta:hover { background: #1a44d4; transform: translateY(-1px); color: #fff; }

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.1rem 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.footer-copy { color: #475569; font-size: 0.78rem; }
.footer-copy i { color: #295bff; margin-right: 0.2rem; }

.footer-legal { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.footer-legal a { color: #475569; text-decoration: none; font-size: 0.78rem; transition: color 0.2s; }
.footer-legal a:hover { color: #93c5fd; }
.footer-legal .sep { color: #334155; font-size: 0.65rem; }

/* Responsive */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-tagline { max-width: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-main { padding: 2.5rem 0 2rem; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* ================================================
   TESTIMONIALS
   ================================================ */

.testimonial {
  background-color: white;
  padding: 30px;
  border-left: 5px solid var(--secondary-color);
  border-radius: 5px;
  margin-bottom: 20px;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-color);
}

.testimonial-rating {
  color: #fbbf24;
  margin-bottom: 10px;
}

.star {
  color: #fbbf24;
}

/* ================================================
   FEATURES / WHY CHOOSE US
   ================================================ */

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.feature-item {
  display: flex;
  gap: 20px;
}

.feature-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background-color: var(--light-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.feature-icon i {
  font-size: 1.3rem;
}

.feature-content h4 {
  margin-bottom: 8px;
  color: var(--text-dark);
}

.feature-content p {
  margin: 0;
  font-size: 0.95rem;
}

/* ================================================
   PRICING TABLES
   ================================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.pricing-card {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
}

.pricing-card.featured {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.pricing-card.featured .badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.price {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 20px 0 10px;
  font-weight: 700;
}

.price-period {
  color: var(--text-light);
  font-size: 1rem;
}

.features-list {
  list-style: none;
  margin: 30px 0;
  text-align: left;
}

.features-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.features-list li:before {
  content: "✓";
  color: var(--success-color);
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.2rem;
}

/* ================================================
   PORTFOLIO / PROJECTS
   ================================================ */

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-dark);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 1;
}

.portfolio-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--light-bg);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 64, 175, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.portfolio-category {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ================================================
   PROCESS / STEPS
   ================================================ */

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin: 50px 0;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  color: var(--text-dark);
  margin-bottom: 15px;
}

.step p {
  color: var(--text-light);
}

/* ================================================
   FAQ
   ================================================ */

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.faq-question {
  padding: 20px;
  background-color: var(--light-bg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: all 0.3s ease;
  user-select: none;
}

.faq-question:hover {
  background-color: #f0f4f8;
  color: var(--primary-color);
}

.faq-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-light);
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 500px;
}

/* ================================================
   STATS
   ================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin: 40px 0;
  text-align: center;
}

.stat-item h3 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.stat-item p {
  color: var(--text-light);
  margin: 0;
}

/* ================================================
   ALERTS / SUCCESS MESSAGES
   ================================================ */

.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-info {
  background-color: #dbeafe;
  color: #0c2d6b;
  border: 1px solid #93c5fd;
}

/* ================================================
   FLOATING WIDGETS
   ================================================ */

.floating-widgets {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  color: white;
}

.float-button:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.whatsapp-button {
  background-color: #25d366;
}

.whatsapp-button:hover {
  background-color: #1fa85c;
}

.call-button {
  background-color: #0ea5e9;
}

.call-button:hover {
  background-color: #0284c7;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .hero {
    padding: 80px 0 50px;
  }

  .hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subheadline {
    font-size: 1.1rem;
  }

  /* Portfolio responsive */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* Case Studies - stack on mobile */
  .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .container > div[style*="grid-template-columns"] > div:first-child {
    order: -1;
  }

  .nav-menu {
    gap: 20px;
    display: none;
  }

  .toggle-menu {
      display: block;
  }

  .nav-menu.mobile-active {
      display: flex;
      flex-direction: column;
      position: absolute;
      top: 60px;
      left: -15px;
      right: -15px;
      background-color: white;
      padding: 20px;
      box-shadow: var(--shadow);
      gap: 10px;
      z-index: 999;
  }

  /* Make inline grids stack on mobile */
  div[style*="grid-template-columns"] {
      grid-template-columns: 1fr !important;
      gap: 30px !important;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .section {
    padding: 50px 0;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .floating-widgets {
    bottom: 10px;
    right: 10px;
    flex-direction: row;
    gap: 5px;
  }

  .float-button {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .container {
        padding: 0 10px;
    }

    .hero {
        padding: 60px 0 40px;
    }

    .hero-video-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero .subheadline {
        font-size: 0.95rem;
    }

    .section {
        padding: 40px 0;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-grid {
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 1.8rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pricing-card {
        padding: 25px 20px;
    }

    .price {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .btn-block {
        width: 100%;
        margin-bottom: 10px;
    }

    .card {
        padding: 25px;
    }

    .feature-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .testimonial {
        padding: 25px;
    }

    .floating-widgets {
        bottom: 5px;
        right: 5px;
    }

    .float-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Additional mobile optimizations */
    .navbar {
        padding: 10px 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .toggle-menu {
        font-size: 1.3rem;
    }

    .nav-menu.mobile-active {
        padding: 15px;
        gap: 8px;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 8px;
    }

    .hero-buttons {
        gap: 8px;
    }

    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Grid adjustments for inline styles */
    div[style*="grid-template-columns"] {
        gap: 25px !important;
    }

    div[style*="grid-template-columns"] > div {
        padding: 20px;
    }

    /* Ensure no overflow */
    * {
        box-sizing: border-box;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex;
    }
}

/* ================================================
   MODERN HOMEPAGE (index.php)
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600&display=swap');

.hero-modern,
.hero-modern h1,
.section-head h2,
.service-card h3,
.feature-card h3,
.pricing-card h3 {
  font-family: 'Space Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-modern p,
.section-head p,
.service-card p,
.feature-card p,
.testimonial-card p,
.portfolio-card p,
.pricing-card li,
.contact-card label,
.contact-card input,
.contact-card textarea,
.contact-card select {
  font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-modern {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 10% 10%, #e8f0ff 0%, #ffffff 45%, #f6f7fb 100%);
  padding: 90px 0 110px;
}

.hero-modern::before,
.hero-modern::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  opacity: 0.2;
  filter: blur(40px);
  z-index: 0;
}

.hero-modern::before {
  background: #295bff;
  top: -120px;
  right: 10%;
}

.hero-modern::after {
  background: #0ea5e9;
  bottom: -160px;
  left: -80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy .eyebrow {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #1e3a8a;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-size: 3.1rem;
  margin-bottom: 18px;
  color: #0f172a;
}

.hero-copy .subheadline {
  font-size: 1.1rem;
  color: #4b5563;
  max-width: 620px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 24px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.proof-item {
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
}

.proof-number {
  display: block;
  font-weight: 700;
  color: #1e40af;
  font-size: 1.05rem;
}

.proof-label {
  display: block;
  color: #6b7280;
  font-size: 0.85rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-panel {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #f9fafb;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 420px;
  animation: floatPanel 6s ease-in-out infinite;
}

.hero-panel-title {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 20px;
}

.hero-panel-metrics {
  display: grid;
  gap: 14px;
}

.metric {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
}

.metric-label {
  font-size: 0.85rem;
  color: #cbd5f5;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 4px;
}

.hero-panel-cta {
  margin-top: 22px;
  font-weight: 600;
  color: #93c5fd;
}

@keyframes floatPanel {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  margin-bottom: 12px;
}

.section-head p {
  color: #6b7280;
  max-width: 720px;
  margin: 0 auto;
}

.service-grid,
.feature-grid,
.testimonial-grid,
.portfolio-grid,
.pricing-grid,
.faq-grid {
  display: grid;
  gap: 24px;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.service-card,
.feature-card,
.portfolio-card,
.pricing-card,
.testimonial-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.feature-card:hover,
.portfolio-card:hover,
.pricing-card:hover,
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.text-link::after {
  content: "->";
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.testimonial-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.testimonial-card {
  background: #f9fafb;
  border-left: 4px solid #295bff;
}

.testimonial-card footer {
  margin-top: 14px;
  color: #475569;
  font-weight: 600;
}

.portfolio-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.pricing-card {
  position: relative;
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
}

.pricing-card .price span {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 10px;
  color: #4b5563;
}

.pricing-card.featured {
  border: 2px solid #295bff;
  box-shadow: 0 24px 60px rgba(41, 91, 255, 0.2);
}

.pricing-card .badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #295bff;
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.contact-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #e5e7eb;
}

.contact-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-weight: 600;
  color: #1f2937;
}

.contact-card input,
.contact-card textarea,
.contact-card select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.contact-card textarea {
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 10px;
}

.faq-grid details {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.faq-grid summary {
  font-weight: 600;
  cursor: pointer;
}

.faq-grid p {
  margin-top: 10px;
  color: #6b7280;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 640px) {
  .hero-modern {
    padding: 70px 0 90px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-panel {
    max-width: 100%;
  }
}

/* ================================================
   DARK MODE
   Apply to all pages via data-theme on <html>.
   Early-load inline script in header.php prevents
   any flash of wrong theme on page load.
   ================================================ */

html[data-theme="dark"] {
  --light-bg:     #1e293b;
  --text-dark:    #f1f5f9;
  --text-light:   #94a3b8;
  --border-color: #334155;
  --shadow:       0 4px 15px rgba(0,0,0,.4);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.55);
  color-scheme: dark;
}

/* ── Core ── */
html[data-theme="dark"] body {
  background: #0f172a;
  color: #e2e8f0;
}

/* ── Smooth transitions — enabled via JS after first paint to avoid FOUC ── */
html.theme-ready body,
html.theme-ready header,
html.theme-ready .section-light,
html.theme-ready .card,
html.theme-ready .article-card,
html.theme-ready .news-card,
html.theme-ready .seg-card,
html.theme-ready .solution-card,
html.theme-ready .tier-card,
html.theme-ready .why-item,
html.theme-ready .faq-item,
html.theme-ready .faq-question,
html.theme-ready .testimonial,
html.theme-ready .testimonial-card,
html.theme-ready input,
html.theme-ready select,
html.theme-ready textarea {
  transition: background-color .3s ease, color .2s ease, border-color .2s ease;
}

/* ── Header ── */
html[data-theme="dark"] header {
  background: #0f172a;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
  border-bottom: 1px solid #1e293b;
}
html[data-theme="dark"] .nav-menu a   { color: #cbd5e1; }
html[data-theme="dark"] .toggle-menu  { color: #cbd5e1; }

/* ── Sections ── */
html[data-theme="dark"] .section-light { background: #1a2233; }

/* ── Named card / component classes ── */
html[data-theme="dark"] .card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .seg-card,
html[data-theme="dark"] .solution-card,
html[data-theme="dark"] .tier-card,
html[data-theme="dark"] .why-item,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .pricing-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .testimonial,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .portfolio-card,
html[data-theme="dark"] .faq-grid details {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* ── Headings ── */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .testimonial-text { color: #f1f5f9; }

/* ── Inline hardcoded white / near-white backgrounds ── */
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background-color:white"],
html[data-theme="dark"] [style*="background-color: white"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background:#f9fafb"],
html[data-theme="dark"] [style*="background:#fafafa"] {
  background: #1e293b !important;
}

/* ── Inline text colors ── */
html[data-theme="dark"] [style*="color:#374151"],
html[data-theme="dark"] [style*="color: #374151"],
html[data-theme="dark"] [style*="color:#1f2937"],
html[data-theme="dark"] [style*="color:#111827"],
html[data-theme="dark"] [style*="color:#0f172a"] { color: #f1f5f9 !important; }
html[data-theme="dark"] [style*="color:#6b7280"],
html[data-theme="dark"] [style*="color: #6b7280"],
html[data-theme="dark"] [style*="color:#4b5563"],
html[data-theme="dark"] [style*="color:#475569"] { color: #94a3b8 !important; }

/* ── Inline border colours ── */
html[data-theme="dark"] [style*="border-top:1px solid #f0f0f0"],
html[data-theme="dark"] [style*="border-top: 1px solid #f0f0f0"],
html[data-theme="dark"] [style*="border-bottom:1px solid #f0f0f0"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #f0f0f0"] {
  border-color: #334155 !important;
}

/* ── Forms ── */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #64748b; }
html[data-theme="dark"] .persona-select-wrap         { background: #1e293b; }
html[data-theme="dark"] .persona-select-wrap select  { background: #1e293b; color: #e2e8f0; }

/* ── Search dropdown ── */
html[data-theme="dark"] .search-dropdown        { background: #1e293b; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
html[data-theme="dark"] .search-dropdown input  { background: #1e293b; color: #e2e8f0; border-color: #334155; }
html[data-theme="dark"] .search-result-item     { color: #e2e8f0; border-color: #2d3d55; }
html[data-theme="dark"] .search-result-item:hover { background: #0f172a; }
html[data-theme="dark"] .search-hint,
html[data-theme="dark"] .search-no-results,
html[data-theme="dark"] .search-result-count    { color: #64748b; }

/* ── Mobile nav ── */
html[data-theme="dark"] .nav-menu.mobile-active { background: #0f172a; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
html[data-theme="dark"] .nav-menu li            { border-color: #1e293b; }

/* ── FAQ component ── */
html[data-theme="dark"] .faq-question       { background: #0f172a; color: #e2e8f0; }
html[data-theme="dark"] .faq-question:hover { background: #1e293b; color: var(--primary-color); }
html[data-theme="dark"] .faq-answer         { color: #94a3b8; }

/* ── Insights topic tabs ── */
html[data-theme="dark"] .ins-tab       { background: #1e293b; border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .ins-tab:hover { border-color: var(--primary-color); color: var(--primary-color); }
html[data-theme="dark"] .ins-tab--on   { background: var(--primary-color); color: white; border-color: var(--primary-color); }
html[data-theme="dark"] .ins-tab--on:hover { background: var(--primary-color); color: white; }

/* ── News share copy button ── */
html[data-theme="dark"] .share-btn[style*="background:#f3f4f6"] {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

/* ── Portfolio filter buttons ── */
html[data-theme="dark"] .filter-btn        { background: #1e293b; color: #e2e8f0; border-color: #334155; }
html[data-theme="dark"] .filter-btn.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* ── Alert messages ── */
html[data-theme="dark"] .alert-success { background: #064e3b; color: #a7f3d0; border-color: #059669; }
html[data-theme="dark"] .alert-error   { background: #7f1d1d; color: #fca5a5; border-color: #ef4444; }
html[data-theme="dark"] .alert-info    { background: #1e3a5f; color: #93c5fd; border-color: #3b82f6; }

/* ── Theme toggle button (in nav) ── */
#themeToggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 1.1rem;
  color: var(--text-dark);
  border-radius: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#themeToggle:hover                       { background: rgba(0,0,0,.07); }
html[data-theme="dark"] #themeToggle     { color: #94a3b8; }
html[data-theme="dark"] #themeToggle:hover { background: rgba(255,255,255,.08); }

/* ── Fintech page — additional dark mode fixes ── */

/* background-color:#f0f9ff (Standard pricing card, M-Pesa info box) —
   uses 'background-color:' property so the background: overrides above miss it */
html[data-theme="dark"] [style*="background-color:#f0f9ff"],
html[data-theme="dark"] [style*="background-color: #f0f9ff"],
html[data-theme="dark"] [style*="background:#f0f9ff"],
html[data-theme="dark"] [style*="background: #f0f9ff"]   { background: #1e293b !important; }

/* Decision hub section gradient */
html[data-theme="dark"] [style*="linear-gradient(180deg,#f0f9ff"] { background: #0f172a !important; }

/* Light green amount confirmation box (STK demo) */
html[data-theme="dark"] [style*="background:#f0fdf4"],
html[data-theme="dark"] [style*="background: #f0fdf4"]   { background: #0d2e1f !important; border-color: #166534 !important; }

/* .hub-card is a CSS class (not inline style) so needs explicit dark rule */
html[data-theme="dark"] .hub-card          { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .hub-card:hover    { border-color: var(--primary-color); }
html[data-theme="dark"] .hub-card--live    { background: #271f07; border-color: #f59e0b; }
html[data-theme="dark"] .hub-card--live:hover { border-color: #d97706; }
html[data-theme="dark"] .hub-badge         { background: #3d2b00; color: #fde68a; }
html[data-theme="dark"] .hub-title         { color: #f1f5f9; }
html[data-theme="dark"] .hub-desc          { color: #94a3b8; }
html[data-theme="dark"] .hub-link          { color: var(--primary-color); }
