/* ==========================================================================
   Apex IT Consulting — design system
   ========================================================================== */

:root {
  --color-navy-900: #0a1830;
  --color-navy-800: #0f2140;
  --color-navy-700: #16305a;
  --color-blue-600: #2f6fed;
  --color-blue-500: #4f8bff;
  --color-cyan-400: #22d3ee;
  --color-ink: #101828;
  --color-body: #3f4c63;
  --color-muted: #6b7690;
  --color-border: #e4e8f1;
  --color-surface: #ffffff;
  --color-surface-alt: #f6f8fc;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 10px 30px -12px rgba(16, 24, 48, 0.18);
  --shadow-card: 0 2px 10px rgba(16, 24, 48, 0.06);
  --gradient-brand: linear-gradient(135deg, var(--color-navy-900) 0%, var(--color-navy-700) 55%, var(--color-blue-600) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-blue-600), var(--color-cyan-400));
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-body);
  background: var(--color-surface);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

main { min-height: 60vh; }

h1, h2, h3, h4, h5, h6 {
  color: var(--color-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a { color: var(--color-blue-600); text-decoration: none; }
a:hover { color: var(--color-navy-700); }

.text-muted-custom { color: var(--color-muted) !important; }

.container-xl { max-width: 1240px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: 0.65rem 1.5rem; transition: all .18s ease; }
.btn-brand {
  background: var(--gradient-accent);
  border: none;
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(47, 111, 237, .55);
}
.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -6px rgba(47, 111, 237, .65); color: #fff; }
.btn-outline-brand {
  border: 1.5px solid rgba(255,255,255,.55);
  color: #fff;
  background: transparent;
}
.btn-outline-brand:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost-navy { border: 1.5px solid var(--color-navy-700); color: var(--color-navy-800); background: transparent; }
.btn-ghost-navy:hover { background: var(--color-navy-800); color: #fff; }
.btn-sm-pill { border-radius: 999px; padding: .35rem 1rem; font-weight: 600; font-size: .85rem; }

/* ---------- Navbar ---------- */
.site-header { background: rgba(10, 24, 48, 0.96); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar-brand { color: #fff; font-weight: 800; letter-spacing: -0.02em; font-size: 1.3rem; display: flex; align-items: center; gap: .55rem; }
.site-header .brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--gradient-accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .95rem;
}
.site-header .nav-link { color: rgba(255,255,255,.82) !important; font-weight: 600; padding: .5rem 1rem !important; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: #fff !important; }
.site-header .dropdown-menu { border: none; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: .5rem; }
.site-header .dropdown-item { border-radius: var(--radius-sm); padding: .55rem .75rem; font-weight: 500; }
.site-header .dropdown-item:hover { background: var(--color-surface-alt); }

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-brand);
  color: #fff;
  padding: 6rem 0 7rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 15% 20%, rgba(79,139,255,.35), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(34,211,238,.25), transparent 45%);
}
.hero-content { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #cfe0ff;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.1; }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 640px; }
.hero-stats { display: flex; gap: 2.25rem; flex-wrap: wrap; margin-top: 2.5rem; }
.hero-stats .stat-num { font-size: 1.9rem; font-weight: 800; color: #fff; }
.hero-stats .stat-label { font-size: .85rem; color: rgba(255,255,255,.65); }
.hero-graphic {
  position: relative; z-index: 1; border-radius: var(--radius-lg);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  padding: 1.75rem; backdrop-filter: blur(4px);
}
.hero-graphic .mini-card { background: rgba(255,255,255,.08); border-radius: var(--radius-md); padding: 1rem 1.1rem; border: 1px solid rgba(255,255,255,.12); }

.page-hero {
  background: var(--gradient-brand);
  color: #fff;
  padding: 4.25rem 0 4.5rem;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 90% 10%, rgba(34,211,238,.25), transparent 45%);
}
.page-hero h1 { color: #fff; position: relative; z-index: 1; }
.page-hero p { color: rgba(255,255,255,.82); position: relative; z-index: 1; max-width: 700px; }
.page-hero .breadcrumb-link { color: rgba(255,255,255,.65); font-weight: 600; font-size: .9rem; }
.page-hero .breadcrumb-link a { color: rgba(255,255,255,.85); }

/* ---------- Section spacing ---------- */
.section { padding: 5rem 0; }
.section-sm { padding: 3.25rem 0; }
.section-alt { background: var(--color-surface-alt); }
.section-eyebrow {
  display: inline-block; color: var(--color-blue-600); font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .75rem; }
.section-intro { color: var(--color-muted); font-size: 1.05rem; max-width: 640px; }

/* ---------- Cards ---------- */
.card-elevated {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.card-elevated:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

.icon-tile {
  width: 54px; height: 54px; border-radius: var(--radius-md);
  background: var(--gradient-accent);
  display: flex; align-items: center; justify-content: center; color: #fff;
  margin-bottom: 1.1rem;
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile-navy { background: var(--color-navy-800); }

.service-card { padding: 2rem; }
.service-card h3 { font-size: 1.2rem; }
.service-card .feature-list { list-style: none; padding: 0; margin: 1rem 0 0; font-size: .92rem; color: var(--color-muted); }
.service-card .feature-list li { display: flex; gap: .5rem; padding: .25rem 0; align-items: flex-start; }
.service-card .feature-list svg { flex: none; width: 16px; height: 16px; margin-top: .2rem; color: var(--color-blue-600); }

.testimonial-card { padding: 2rem; }
.testimonial-card .stars { color: #f5a623; letter-spacing: .1rem; }
.testimonial-card .quote { font-size: 1.02rem; color: var(--color-ink); font-style: italic; }
.avatar-circle {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.blog-card img, .blog-card .cover-fallback { border-radius: var(--radius-lg) var(--radius-lg) 0 0; height: 190px; object-fit: cover; width: 100%; }
.cover-fallback { background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); }
.blog-card .card-body { padding: 1.5rem; }
.badge-category { background: rgba(47,111,237,.1); color: var(--color-blue-600); font-weight: 700; border-radius: 999px; padding: .3rem .75rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }

.team-card { padding: 1.75rem; text-align: center; }
.team-photo {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 1rem;
  background: var(--gradient-brand); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.6rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--gradient-brand); color: #fff; border-radius: var(--radius-lg);
  padding: 3rem; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 20%, rgba(34,211,238,.3), transparent 50%);
}
.cta-band * { position: relative; z-index: 1; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); padding: .65rem .9rem;
}
.form-control:focus, .form-select:focus { border-color: var(--color-blue-500); box-shadow: 0 0 0 .2rem rgba(47,111,237,.15); }
.form-label { font-weight: 600; color: var(--color-ink); font-size: .92rem; }
.form-card { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 2.25rem; border: 1px solid var(--color-border); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-navy-900); color: rgba(255,255,255,.7); padding: 4rem 0 1.5rem; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1.1rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-brand { color: #fff; font-weight: 800; font-size: 1.25rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 3rem; padding-top: 1.5rem; font-size: .85rem; }
.social-icon {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center; margin-right: .5rem;
}
.social-icon:hover { background: var(--color-blue-600); }
.social-icon svg { width: 16px; height: 16px; }

/* ---------- Cookie / consent ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1080;
  background: var(--color-navy-900); color: rgba(255,255,255,.85);
  padding: 1rem 1.25rem; display: none;
}
.cookie-banner.show { display: block; }

/* ---------- Live chat widget ---------- */
.chat-launcher {
  position: fixed; bottom: 24px; right: 24px; z-index: 1070;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gradient-accent); color: #fff; border: none;
  box-shadow: 0 12px 28px -8px rgba(47,111,237,.6);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.chat-window {
  position: fixed; bottom: 96px; right: 24px; z-index: 1070;
  width: 340px; max-width: calc(100vw - 32px); height: 460px; max-height: calc(100vh - 140px);
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border);
}
.chat-window.show { display: flex; }
.chat-window .chat-header { background: var(--gradient-brand); color: #fff; padding: 1rem 1.25rem; }
.chat-window .chat-body { flex: 1; overflow-y: auto; padding: 1rem; background: var(--color-surface-alt); }
.chat-window .chat-footer { border-top: 1px solid var(--color-border); padding: .65rem; display: flex; gap: .5rem; }
.chat-bubble { max-width: 80%; padding: .55rem .85rem; border-radius: 14px; margin-bottom: .6rem; font-size: .9rem; line-height: 1.35; }
.chat-bubble.from-visitor { background: var(--color-blue-600); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.from-admin { background: #fff; border: 1px solid var(--color-border); border-bottom-left-radius: 4px; }

/* ---------- Utility ---------- */
.gradient-text { background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.divider-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; opacity: .5; }

@media (max-width: 767.98px) {
  .hero { padding: 4rem 0 4.5rem; text-align: center; }
  .hero-stats { justify-content: center; }
  .section { padding: 3.25rem 0; }
}
