/* =========================================
   Reset & Base
========================================= */
html { box-sizing: border-box; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: inherit; }

:root { color-scheme: dark; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
  background-attachment: fixed;
  position: relative;
  z-index: 0; /* safer stacking context */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main, .main { padding-top: 64px; } /* offset fixed header */

/* Improve touch targets */
button, a, input, select, textarea { touch-action: manipulation; }

/* Images responsive */
img { max-width: 100%; height: auto; display: block; }

/* Background glow layer (avoid negative z-index pitfalls) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(59,130,246,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(147,51,234,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(16,185,129,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* =========================================
   Container
========================================= */
.container-custom { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   Header + Navigation (Desktop & Mobile)
========================================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #334155;
  transition: background 0.3s ease;
}
.header-content { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { color: #3b82f6; font-size: 20px; }
.logo-text { font-size: 24px; font-weight: bold; color: #3b82f6; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-link { color: #cbd5e1; text-decoration: none; transition: color 0.3s ease; background: none; border: none; font-size: 16px; font-family: inherit; cursor: pointer; }
.nav-link:hover { color: #ffffff; }

/* Dropdown menu */
.nav-dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 6px; }
.dropdown-icon { font-size: 12px; transition: transform 0.3s ease; }
.nav-dropdown:hover .dropdown-icon { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 41, 59, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: block;
  padding: 12px 20px;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.dropdown-item:first-child { border-radius: 8px 8px 0 0; }
.dropdown-item:last-child { border-radius: 0 0 8px 8px; }
.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #ffffff;
}

.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }

/* --- Mobile Menu Integration --- */
.header.menu-open { background: rgba(15,23,42,0.98); }

@media (max-width: 768px) {
  /* Backdrop overlay under the slide-down menu */
  .header::after {
    content: "";
    position: fixed;
    inset: 64px 0 0 0; /* below the fixed header */
    background: rgba(2, 6, 23, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 999; /* under the menu panel */
  }
  .header.menu-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  /* Turn desktop nav into a mobile panel */
  .nav {
    display: none;                /* hidden until menu open */
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(30, 41, 59, 0.98);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
    flex-direction: column;
    gap: 0;
    padding: 8px 12px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 1001;               /* above overlay & header */
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .header.menu-open .nav {
    display: flex;
    transform: translateY(0);
    opacity: 1; visibility: visible;
  }

  .nav-link {
    display: block;
    padding: 14px 12px;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 16px;
  }
  .nav-link:hover, .nav-link:focus-visible {
    background: #1f2937;
    color: #fff;
  }

  /* Mobile dropdown */
  .nav-dropdown { position: relative; }
  .dropdown-toggle {
    width: 100%;
    text-align: left;
    justify-content: space-between;
  }
  .dropdown-menu {
    position: static;
    transform: none;
    background: rgba(15, 23, 42, 0.5);
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 4px 0;
    padding: 0;
    min-width: auto;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav-dropdown.dropdown-open .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
  }
  .dropdown-item {
    padding: 12px 12px 12px 24px;
    font-size: 15px;
  }

  .mobile-menu-btn { display: block; }

  /* Lock page scroll when menu is open (if you toggle body.menu-open in JS) */
  body.menu-open { overflow: hidden; touch-action: none; }
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #3b82f6; outline-offset: 2px;
}

/* =========================================
   Buttons
========================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px; font-weight: 600;
  text-decoration: none; transition: all 0.3s ease; cursor: pointer; border: none; font-size: 16px;
}
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(59,130,246,0.3); }
.btn-secondary { background: transparent; color: #cbd5e1; border: 2px solid #64748b; }
.btn-secondary:hover { border-color: white; color: white; }
.btn-outline { background: transparent; color: white; border: 2px solid #475569; }
.btn-outline:hover { background: #475569; }
.btn-large { padding: 16px 32px; font-size: 18px; }

/* =========================================
   Hero
========================================= */
.hero {
  min-height: 100vh; display: flex; align-items: center; position: relative;
  overflow: visible; /* ensure no clipping of overlay elements */
  background:
    linear-gradient(135deg, rgba(15,23,42,0.9) 0%, rgba(30,58,138,0.8) 50%, rgba(15,23,42,0.9) 100%),
    radial-gradient(ellipse at top, rgba(59,130,246,0.1) 0%, transparent 70%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(45deg, transparent 30%, rgba(59,130,246,0.05) 50%, transparent 70%),
    linear-gradient(-45deg, transparent 30%, rgba(147,51,234,0.05) 50%, transparent 70%);
  animation: shimmer 8s ease-in-out infinite;
  will-change: opacity;
}
@keyframes shimmer { 0%,100%{opacity:.3} 50%{opacity:.7} }
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: bold; margin-top: 80px; margin-bottom: 32px; line-height: 1.1; }
.gradient-text { background: linear-gradient(to right, #3b82f6, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: clamp(1.2rem, 3vw, 2rem); color: #cbd5e1; margin-bottom: 48px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; flex-direction: column; gap: 16px; justify-content: center; align-items: center; }

/* =========================================
   Sections
========================================= */
.section { padding: 60px 0; }
.section-title { font-size: clamp(2.5rem, 6vw, 6rem); font-weight: bold; text-align: center; margin-bottom: 24px; }
.section-subtitle { font-size: 20px; color: #cbd5e1; text-align: center; max-width: 600px; margin: 0 auto 48px; }

/* =========================================
   Services
========================================= */
.services {
  background:
    linear-gradient(135deg, rgba(30,58,138,0.3) 0%, rgba(51,65,85,0.5) 50%, rgba(30,58,138,0.3) 100%),
    radial-gradient(circle at center, rgba(59,130,246,0.05) 0%, transparent 70%);
  position: relative;
}
.services::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.02) 50%, transparent 100%);
  animation: slide 6s linear infinite; will-change: transform;
}
@keyframes slide { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.service-card,
.pricing-card,
.testimonial-card,
.form,
.contact-card {
  background: linear-gradient(145deg, rgba(51,65,85,0.6) 0%, rgba(71,85,105,0.4) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 32px; border-radius: 16px; border: 1px solid rgba(148,163,184,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.service-card { transition: all 0.3s ease; position: relative; overflow: hidden; }
.service-card::before,
.pricing-card::before,
.testimonial-card::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transition: left 0.5s ease; will-change: transform, opacity;
}
.service-card:hover {
  border-color: rgba(59,130,246,0.6);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(59,130,246,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}
.service-card:hover::before { left: 100%; }
.service-icon { background: #3b82f6; padding: 16px; border-radius: 12px; width: fit-content; display: inline-block; margin-bottom: 24px; font-size: 24px; transition: transform 0.3s ease; }
.service-card:hover .service-icon { transform: scale(1.1); }
.service-card h3 { font-size: 24px; font-weight: bold; margin-bottom: 16px; }
.service-card p { color: #cbd5e1; margin-bottom: 24px; line-height: 1.6; }
.service-features { list-style: none; }
.service-features li { display: flex; align-items: center; gap: 12px; color: #cbd5e1; margin-bottom: 12px; }
.service-features .check-icon { color: #10b981; }

/* Project card image hover effect */
a.service-card:hover img {
  transform: scale(1.05);
}
a.service-card:hover {
  text-decoration: none;
}

/* =========================================
   About
========================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-content h2 { font-size: clamp(2.5rem, 6vw, 6rem); font-weight: bold; margin-bottom: 24px; line-height: 1.1; }
.about-content p { font-size: 20px; color: #cbd5e1; margin-bottom: 48px; }
.about-features { list-style: none; }
.about-feature { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
.about-feature-icon { background: #3b82f6; padding: 8px; border-radius: 50%; color: white; margin-top: 4px; }
.about-feature h3 { font-size: 20px; font-weight: bold; margin-bottom: 8px; }
.about-feature p { color: #cbd5e1; font-size: 16px; }
.stats-card { background: linear-gradient(145deg, rgba(51,65,85,0.6) 0%, rgba(71,85,105,0.4) 100%); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 32px; border-radius: 16px; border: 1px solid rgba(148,163,184,0.2); box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
.stats-grid { display: flex; flex-direction: column; gap: 24px; }
.stat { text-align: center; }
.stat-number { font-size: 48px; font-weight: bold; color: #3b82f6; margin-bottom: 8px; }
.stat-label { color: #cbd5e1; }

/* =========================================
   Proof (vertical layout)
========================================= */
.proof-vertical-layout { display: flex; flex-direction: column; gap: 32px; max-width: 800px; margin: 0 auto; }
.recommendations-card { border: 2px solid #3b82f6 !important; box-shadow: 0 0 20px rgba(59,130,246,0.2) !important; }

/* Optional base for proof grid/cards referenced in media queries */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 32px; }
.proof-card { padding: 32px; border-radius: 16px; border: 1px solid rgba(148,163,184,0.2); }

/* =========================================
   Pricing
========================================= */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin-bottom: 64px; }
.pricing-card { transition: all 0.3s ease; position: relative; overflow: hidden; }
.pricing-card:hover::before { left: 100%; }

/* Most Popular Badge */
.pricing-card-popular {
  border-color: rgba(59,130,246,0.8) !important;
  box-shadow: 0 0 40px rgba(59,130,246,0.4), 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  transform: scale(1.05);
  margin-top: 16px;
}

.pricing-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(37,99,235,0.5), 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
  border: 2px solid rgba(255,255,255,0.2);
}

.pricing-card.popular { border-color: rgba(59,130,246,0.6); box-shadow: 0 0 40px rgba(59,130,246,0.3), 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.popular-badge { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: #3b82f6; color: white; padding: 8px 16px; border-radius: 50px; font-size: 14px; font-weight: 600; }
.pricing-header { text-align: center; margin-bottom: 32px; }
.pricing-icon { background: #3b82f6; padding: 16px; border-radius: 12px; width: fit-content; margin: 0 auto 16px; font-size: 24px; display: inline-block; }
.pricing-title { font-size: 24px; font-weight: bold; margin-bottom: 16px; }
.pricing-price { margin-bottom: 16px; }
.price-amount { font-size: 48px; font-weight: bold; }
.price-period { color: #94a3b8; margin-left: 8px; }
.pricing-description { color: #cbd5e1; font-size: 14px; }
.pricing-features { list-style: none; margin-bottom: 32px; text-align: center; }
.pricing-features li { display: flex; align-items: center; justify-content: center; gap: 12px; color: #cbd5e1; font-size: 14px; margin-bottom: 16px; }
.pricing-features .check-icon { color: #10b981; margin-top: 2px; }

/* =========================================
   Consultation
========================================= */
.consultation-card { text-align: center; max-width: 800px; margin: 0 auto; }
.consultation-card h3 { font-size: 24px; font-weight: bold; margin-bottom: 16px; }
.consultation-card p { color: #cbd5e1; margin-bottom: 24px; }
.consultation-actions { display: flex; flex-direction: column; gap: 16px; justify-content: center; align-items: center; }
.consultation-note { display: flex; align-items: center; gap: 8px; color: #cbd5e1; }
.consultation-note .check-icon { color: #10b981; }

/* =========================================
   Testimonials
========================================= */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.testimonial-card { transition: all 0.3s ease; position: relative; overflow: hidden; }
.testimonial-card:hover { border-color: rgba(59,130,246,0.6); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(59,130,246,0.2), inset 0 1px 0 rgba(255,255,255,0.2); }
.testimonial-card:hover::before { left: 100%; }
.stars { display: flex; gap: 4px; margin-bottom: 16px; }
.star { color: #fbbf24; }
.testimonial-text { color: #cbd5e1; margin-bottom: 24px; line-height: 1.6; font-style: italic; }
.testimonial-author { border-top: 1px solid #475569; padding-top: 16px; }
.author-name { font-weight: 600; margin-bottom: 4px; }
.author-title { color: #94a3b8; font-size: 14px; margin-bottom: 4px; }
.author-company { color: #3b82f6; font-size: 14px; }

/* =========================================
   Contact
========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-info h3 { font-size: 24px; font-weight: bold; margin-bottom: 32px; }
.contact-methods { margin-bottom: 32px; }
.contact-method { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.contact-icon { background: #3b82f6; padding: 12px; border-radius: 12px; color: white; }
.contact-details .contact-label { font-weight: 600; margin-bottom: 4px; }
.contact-details .contact-value { color: #94a3b8; }
.contact-card h4 { font-size: 20px; font-weight: bold; margin-bottom: 16px; }
.contact-card ul { list-style: none; color: #cbd5e1; }
.contact-card li { margin-bottom: 8px; }

/* =========================================
   Forms
========================================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.form-group { margin-bottom: 24px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-input-wrapper { position: relative; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 12px 12px 40px; background: #475569; border: 1px solid #64748b; border-radius: 8px; color: white; transition: border-color 0.3s ease;
}
.form-input::placeholder, .form-textarea::placeholder { color: #94a3b8; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #3b82f6; }
.form-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.form-textarea { resize: vertical; min-height: 100px; padding-left: 12px; }
.form-status { padding: 16px; border-radius: 8px; margin-bottom: 24px; }
.form-status.success { background: rgba(16,185,129,0.1); border: 1px solid #10b981; color: #10b981; }
.form-status.error { background: rgba(239,68,68,0.1); border: 1px solid #ef4444; color: #ef4444; }
.form-status.hidden { display: none; }

/* =========================================
   Footer
========================================= */
.footer { background: #0f172a; border-top: 1px solid #334155; padding: 48px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; margin-bottom: 32px; }
.footer-brand { max-width: 400px; }
.footer-brand .logo { margin-bottom: 24px; }
.footer-description { color: #94a3b8; margin-bottom: 24px; line-height: 1.6; }
.footer-contact { color: #94a3b8; font-size: 14px; }
.footer-contact-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer-contact-icon { width: 16px; }
.footer-section h3 { font-size: 20px; font-weight: bold; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 24px; text-align: center; color: #94a3b8; }

/* =========================================
   Chat Button & Widget (always on top)
========================================= */
.chat-btn {
  position: fixed; bottom: 32px; right: 32px;
  z-index: 2147483647; /* ensure above all */
  background: #3b82f6; color: white; border: none; border-radius: 50%;
  width: 60px; height: 60px; font-size: 24px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(59,130,246,0.3); transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite; will-change: transform;
}
.chat-btn:hover { transform: scale(1.1); background: #2563eb; }

.chat-widget {
  position: fixed; bottom: 100px; right: 32px; width: 380px; height: 500px;
  z-index: 2147483647; /* ensure above all */
  background: linear-gradient(145deg, rgba(51,65,85,0.95) 0%, rgba(71,85,105,0.95) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 16px; border: 1px solid rgba(148,163,184,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(20px) scale(0.95); opacity: 0; visibility: hidden;
  transition: all 0.3s ease; will-change: transform, opacity;
}
.chat-widget.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-header {
  background: rgba(59,130,246,0.1);
  border-bottom: 1px solid rgba(148,163,184,0.2);
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar { width: 40px; height: 40px; background: #3b82f6; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; }
.chat-title h4 { margin: 0; font-size: 16px; font-weight: 600; color: white; }
.chat-status { font-size: 12px; color: #10b981; margin: 0; }
.chat-close { background: none; border: none; color: #94a3b8; font-size: 18px; cursor: pointer; padding: 4px; border-radius: 4px; transition: color 0.3s ease; }
.chat-close:hover { color: white; }

.chat-messages { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-message { display: flex; gap: 12px; align-items: flex-start; }
.chat-message.user-message { flex-direction: row-reverse; }
.message-avatar { width: 32px; height: 32px; background: #3b82f6; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; flex-shrink: 0; }
.user-message .message-avatar { background: #10b981; }
.message-content { max-width: 85%; background: rgba(71,85,105,0.6); padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(148,163,184,0.2); }
.user-message .message-content { background: rgba(59,130,246,0.2); border-color: rgba(59,130,246,0.3); }
.message-content p { margin: 0; color: #e2e8f0; font-size: 14px; line-height: 1.4; }

.chat-input-container { border-top: 1px solid rgba(148,163,184,0.2); padding: 12px 16px; }
.chat-input-wrapper { display: flex; gap: 8px; align-items: center; }
.chat-input { flex: 1; background: #475569; border: 1px solid #64748b; border-radius: 20px; padding: 10px 16px; color: white; font-size: 14px; outline: none; transition: border-color 0.3s ease; }
.chat-input:focus { border-color: #3b82f6; }
.chat-input::placeholder { color: #94a3b8; }
.chat-send-btn { background: #3b82f6; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; transition: background-color 0.3s ease; font-size: 14px; }
.chat-send-btn:hover { background: #2563eb; }

.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 8px 0; }
.typing-dot { width: 6px; height: 6px; background: #94a3b8; border-radius: 50%; animation: typing 1.4s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-10px);opacity:1} }

/* =========================================
   Animations
========================================= */
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =========================================
   Responsive
========================================= */
@media (max-width: 768px) {
  .container-custom { padding: 0 16px; }
  .header-content { height: 56px; }
  .logo-text { font-size: 20px; }

  .hero { padding: 80px 0 40px; min-height: 90vh; }
  .hero h1 { margin-top: 40px; margin-bottom: 24px; }
  .hero p { margin-bottom: 32px; font-size: 18px; }
  .hero-buttons { flex-direction: column; gap: 12px; }

  .btn-large { padding: 14px 28px; font-size: 16px; width: 100%; max-width: 280px; justify-content: center; }

  .section { padding: 40px 0; }
  .section-title { margin-bottom: 16px; font-size: 2.5rem; }
  .section-subtitle { font-size: 18px; margin-bottom: 40px; }

  .services-grid, .pricing-grid, .proof-grid { grid-template-columns: 1fr; gap: 24px; }
  .service-card, .pricing-card, .proof-card { padding: 24px; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-grid > div:first-child { order: 1; }
  .about-grid > div:last-child { order: 2; }

  .stats-grid { flex-direction: column; gap: 20px; }
  .stat-number { font-size: 36px; }

  .contact-grid > div:first-child { order: 2; }
  .contact-grid > div:last-child { order: 1; }

  .form-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .form-group { margin-bottom: 16px; }
  .form-input, .form-select, .form-textarea { font-size: 16px; padding: 14px 14px 14px 40px; }
  .form-icon { left: 14px; }
  .form-textarea { padding-left: 14px; }

  .consultation-card { padding: 24px; }
  .consultation-actions { flex-direction: column; gap: 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .footer-brand { max-width: 100%; }
  .footer-contact { text-align: center; }
  .footer-contact-item { justify-content: center; }

  .chat-btn { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 20px; }

  /* Proof vertical tweaks */
  .proof-vertical-layout { gap: 24px; max-width: 100%; }
  .proof-vertical-layout .service-card blockquote { font-size: 16px; margin: 16px 0; padding-left: 16px; }
  .proof-vertical-layout .service-card .service-features li { font-size: 16px; margin-bottom: 12px; }

  details { padding: 20px; margin-top: 24px; }
  details summary { font-size: 16px; margin-bottom: 12px; }
  details p { font-size: 14px; line-height: 1.5; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container-custom { padding: 0 24px; }
  .hero h1 { font-size: 4rem; }
  .hero p { font-size: 20px; }
  .services-grid, .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-grid .service-card:last-child { grid-column: 1 / -1; max-width: 600px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .about-grid { gap: 48px; }
  .contact-grid { gap: 48px; }
  .form-grid { gap: 20px; }
  .stats-grid { gap: 20px; }
  .consultation-actions { flex-direction: row; gap: 20px; }
}

@media (max-width: 480px) {
  .container-custom { padding: 0 12px; }
  .header-content { height: 52px; }
  .logo-text { font-size: 18px; }
  .logo-icon { font-size: 18px; }

  .hero { padding: 70px 0 30px; }
  .hero h1 { font-size: 2.5rem; margin-top: 20px; margin-bottom: 20px; }
  .hero p { font-size: 16px; margin-bottom: 28px; }

  .section { padding: 32px 0; }
  .section-title { font-size: 2rem; }
  .section-subtitle { font-size: 16px; margin-bottom: 32px; }

  .service-card, .pricing-card, .consultation-card { padding: 20px; }

  .proof-vertical-layout { gap: 20px; }
  .proof-vertical-layout .service-card .service-features { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
  .proof-vertical-layout .service-card .service-features li {
    font-size: 14px; line-height: 1.5; margin-bottom: 12px; align-items: flex-start; max-width: 100%; display: flex; gap: 8px;
  }
  .service-card .service-features li i { margin-top: 2px; flex-shrink: 0; min-width: 16px; }
  .proof-vertical-layout .service-card .service-features li strong { word-wrap: break-word; overflow-wrap: break-word; }
  .proof-vertical-layout .service-card blockquote {
    font-size: 14px; line-height: 1.5; margin: 12px 0; padding-left: 12px; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto;
  }
  .proof-vertical-layout .service-card h3 { font-size: 18px; margin-bottom: 12px; word-wrap: break-word; overflow-wrap: break-word; }
  .proof-vertical-layout .service-card p {
    font-size: 14px; line-height: 1.5; margin-bottom: 16px; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto;
  }

  .btn { padding: 10px 20px; font-size: 14px; }
  .btn-large { padding: 12px 24px; font-size: 15px; }

  .form-input, .form-select, .form-textarea { padding: 12px 12px 12px 38px; font-size: 16px; } /* Prevent iOS zoom */
  .form-icon { left: 12px; }
  .form-textarea { padding-left: 12px; }

  .pricing-card .pricing-title { font-size: 20px; }
  .price-amount { font-size: 36px; }
  .stat-number { font-size: 28px; }
  .stat-label { font-size: 14px; }

  .chat-btn { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 18px; }
  .chat-widget { bottom: 70px; right: 16px; width: calc(100vw - 32px); max-width: 320px; height: 400px; }

  .footer-brand .logo { justify-content: center; }
  .footer-description { text-align: center; font-size: 14px; }
  .footer-section h3 { font-size: 18px; margin-bottom: 12px; }
  .footer-links { font-size: 14px; }
  .footer-bottom { font-size: 14px; padding-top: 20px; }

  details { margin-top: 20px; padding: 16px; }
  details summary { font-size: 14px; font-weight: 600; margin-bottom: 8px; cursor: pointer; }
  details p { font-size: 13px; line-height: 1.4; color: #cbd5e1; }
}

@media (min-width: 769px) {
  .hero-buttons { flex-direction: row; gap: 16px; }
  .consultation-actions { flex-direction: row; gap: 24px; }
}

@media (min-width: 1200px) {
  .container-custom { max-width: 1400px; padding: 0 40px; }
  .hero h1 { font-size: 6rem; }
  .hero p { font-size: 24px; }
  .section-title { font-size: 4rem; }
  .section-subtitle { font-size: 22px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .pricing-grid { gap: 40px; }
  .testimonials-grid { gap: 40px; }
  .about-grid, .contact-grid { gap: 80px; }
}

/* Chat suggestions (quick replies) */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.chat-suggestions .chip {
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(71,85,105,0.45);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: transform .1s ease, background .2s ease;
}
.chat-suggestions .chip:hover { transform: translateY(-1px); background: rgba(71,85,105,0.6); }
.chat-suggestions .chip:active { transform: translateY(0); }

.message-content .rich { font-size: 14px; line-height: 1.5; }
.message-content .rich strong{font-weight:600}
.message-content .rich a{color:#93c5fd;text-decoration:underline}

/* =========================================
   Chatbase Modal
========================================= */
.chatbase-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2147483646;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.chatbase-modal.open {
  display: flex;
}
.chatbase-modal-content {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
.chatbase-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.chatbase-modal-header h3 {
  margin: 0;
  font-size: 24px;
  color: #ffffff;
}
.chatbase-modal-close {
  background: rgba(71, 85, 105, 0.5);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chatbase-modal-close:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #ffffff;
}

/* =========================================
   Growth Package Modal
========================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  padding: 40px 20px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  font-weight: bold;
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: #cbd5e1;
  line-height: 1.6;
}

.modal-features i {
  margin-top: 4px;
  font-size: 14px;
}

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

@media (max-width: 768px) {
  .modal-content {
    padding: 24px;
  }

  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 28px;
  }
}
.chatbase-modal-body {
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-height: 700px;
  position: relative;
  background: #ffffff;
  border-radius: 0 0 16px 16px;
}
.chatbase-modal-body iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 700px !important;
  border: none !important;
  border-radius: 0 0 16px 16px !important;
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile and tablet responsiveness */
@media (max-width: 1024px) {
  .chatbase-modal-content {
    width: 95%;
    max-width: 700px;
  }
  .chatbase-modal-body {
    min-height: 650px;
  }
  .chatbase-modal-body iframe {
    min-height: 650px !important;
  }
}

@media (max-width: 768px) {
  .chatbase-modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 20px;
  }
  .chatbase-modal-header {
    padding: 16px 20px;
  }
  .chatbase-modal-header h3 {
    font-size: 18px;
  }
  .chatbase-modal-close {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .chatbase-modal-body {
    min-height: 600px;
  }
  .chatbase-modal-body iframe {
    min-height: 600px !important;
  }
}

@media (max-width: 480px) {
  .chatbase-modal {
    padding: 10px;
  }
  .chatbase-modal-content {
    width: 100%;
    max-height: 95vh;
    margin: 0;
    border-radius: 12px;
  }
  .chatbase-modal-header {
    padding: 14px 16px;
  }
  .chatbase-modal-header h3 {
    font-size: 16px;
  }
  .chatbase-modal-close {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .chatbase-modal-body {
    min-height: 500px;
    border-radius: 0 0 12px 12px;
  }
  .chatbase-modal-body iframe {
    min-height: 500px !important;
    border-radius: 0 0 12px 12px !important;
  }
}

/* =========================================
   FAQ & Glossary Styles
========================================= */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: rgba(51, 65, 85, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.faq-item:hover {
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(59, 130, 246, 0.3);
}

.faq-item[open] {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(59, 130, 246, 0.4);
}

.faq-question {
  font-size: 1.125em;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.3s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: '+';
  color: #3b82f6;
  font-size: 1.5em;
  font-weight: 600;
  min-width: 24px;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::before {
  content: '−';
  transform: rotate(180deg);
}

.faq-question:hover {
  color: #3b82f6;
}

.faq-answer {
  margin-top: 16px;
  padding-left: 36px;
  color: #cbd5e1;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

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

.glossary-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.glossary-item {
  background: rgba(51, 65, 85, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.glossary-item:hover {
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.glossary-term {
  color: #3b82f6;
  font-size: 1.125em;
  font-weight: 600;
  margin-bottom: 8px;
}

.glossary-definition {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .faq-question {
    font-size: 1em;
  }

  .faq-answer {
    padding-left: 28px;
  }

  .glossary-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}