/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e8edf5;
  --brand-blue: #0055dd;
  --brand-cyan: #0099cc;
  --brand-gradient: linear-gradient(135deg, #0055dd, #0099cc);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-glow: rgba(0, 85, 221, 0.3);
  --nav-height: 72px;
  --max-width: 1280px;
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: auto;
  background: #ffffff;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.15s ease;
}
body.page-leaving { opacity: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); line-height: 1.7; }

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header p { max-width: 640px; margin: 16px auto 0; font-size: 1.05rem; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin-bottom: 12px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font);
}
.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,85,221,0.30); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}
.btn-outline:hover { border-color: var(--brand-blue); color: var(--brand-cyan); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 4px 24px rgba(0,85,221,0.10);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(0,85,221,0.12), rgba(0,153,204,0.12));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.card h3 { margin-bottom: 12px; }
.card-border-left {
  border-left: 3px solid var(--brand-blue);
  padding-left: 20px;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: #ffffff;
  box-shadow: 0 1px 16px rgba(0,0,0,0.08);
  border-bottom: 1px solid #e5e7eb;
  transition: var(--transition);
}
.navbar .nav-links a {
  color: #374151;
}
.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: #111827;
  background: rgba(0,0,0,0.05);
}
.navbar .nav-toggle span {
  background: #111827;
}
@supports not (backdrop-filter: blur(1px)) {
  .nav-mobile { background: rgba(248, 250, 252, 0.99); }
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 52px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: #000000;
  background: rgba(0,0,0,0.06);
}
.nav-cta {
  background: var(--brand-gradient) !important;
  color: #fff !important;
  padding: 8px 20px !important;
}
.nav-cta:hover { opacity: 0.88; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111827;
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(248,250,252,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-mobile a:hover { color: var(--text-primary); background: rgba(0,0,0,0.06); }
.nav-mobile .nav-cta {
  margin-top: 8px;
  background: var(--brand-gradient) !important;
  color: #fff !important;
  text-align: center;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(1);
  z-index: 0;
}
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,85,221,0.10) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-content h1 { margin-bottom: 24px; }
.hero-content p { font-size: 1.15rem; max-width: 580px; margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* Page hero (non-home) */
.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,85,221,0.06), rgba(0,153,204,0.03));
  z-index: 0;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { font-size: 1.1rem; max-width: 640px; }

/* Page hero with background image */
.page-hero.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-hero.has-bg::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4));
}
.page-hero.has-bg .container h1,
.page-hero.has-bg .container p {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.page-hero.has-bg .gradient-text {
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
}
.page-hero.has-bg .section-label {
  color: rgba(255,255,255,0.9);
}

/* =========================================
   DIVIDER / SEPARATOR
   ========================================= */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 0;
}

/* =========================================
   TABS
   ========================================= */
.tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}
.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--brand-cyan);
  border-bottom-color: var(--brand-cyan);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.tab-panel-inner h2 { margin-bottom: 16px; }
.tab-panel-inner p { margin-bottom: 24px; }
.capability-list { list-style: none; }
.capability-list li {
  padding: 8px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
}
.capability-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  flex-shrink: 0;
}
.capability-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
  margin: 24px 0 12px;
}
.tab-image {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  object-fit: cover;
  height: 320px;
}

/* =========================================
   LOGO WALL
   ========================================= */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.logo-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  min-height: 120px;
}
.logo-item img {
  max-height: 100px;
  width: 80%;
  max-width: 100%;
  object-fit: contain;
}
.logo-item:hover { border-color: var(--border-glow); box-shadow: 0 2px 12px rgba(0,85,221,0.08); }
.logo-item-dark img { mix-blend-mode: multiply; }

/* =========================================
   CTA BANNER
   ========================================= */
.cta-banner {
  background: linear-gradient(135deg, rgba(0,85,221,0.08), rgba(0,153,204,0.05));
  border: 1px solid rgba(0,85,221,0.18);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
}
.cta-banner h2 { margin-bottom: 16px; }
.cta-banner p { margin-bottom: 32px; font-size: 1.05rem; }
.cta-banner .btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =========================================
   STEPS / PROCESS
   ========================================= */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: var(--transition);
}
.step-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.step-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}
.step-card h3 { margin-bottom: 10px; }

/* =========================================
   PRODUCT SHOWCASE (Technologies page)
   ========================================= */
.prod-category-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
  margin-bottom: 20px;
}
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.prod-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.prod-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 4px 20px rgba(0,85,221,0.10);
  transform: translateY(-2px);
}
.prod-img-wrap {
  width: 100%;
  height: 180px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.prod-card:hover .prod-img-wrap img { transform: scale(1.04); }
.prod-info {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
}
.prod-brand {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-blue);
  margin-bottom: 4px;
}
.prod-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
@media (max-width: 1024px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .prod-grid { grid-template-columns: 1fr; }
}

/* =========================================
   TAGS (Technologies page)
   ========================================= */
.tag-group { margin-bottom: 48px; }
.tag-group h3 { margin-bottom: 20px; color: var(--brand-cyan); font-size: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.tag:hover { border-color: var(--brand-blue); color: var(--text-primary); }

/* =========================================
   NEWS CARDS
   ========================================= */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.news-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.news-card-img { width: 100%; height: 200px; object-fit: cover; }
.news-card-body { padding: 24px; }
.news-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.news-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.news-card p { font-size: 0.9rem; }
.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--brand-cyan);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}
.news-card-link:hover { gap: 10px; }

/* =========================================
   CONTACT
   ========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.contact-card h3 { margin-bottom: 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-cyan); }
.contact-card p { font-size: 1rem; color: var(--text-primary); margin-bottom: 4px; }
.contact-card a { color: var(--brand-cyan); }
.contact-card a:hover { color: var(--brand-blue); }
.map-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 32px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo {
  display: inline-flex;
}
.footer-brand p { margin-top: 12px; font-size: 0.9rem; max-width: 280px; }
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--brand-cyan); }
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }

/* =========================================
   STAT CARDS
   ========================================= */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 0.875rem; color: var(--text-muted); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .grid-4, .steps-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tab-panel-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4, .steps-grid, .stats-grid { grid-template-columns: 1fr; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cta-banner { padding: 40px 24px; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0; }
  .tabs-nav::-webkit-scrollbar { height: 0; }
  .tab-panel-inner { gap: 32px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}