/* ============================================
   agentic AI (aAI) — Core Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-secondary: #06b6d4;
  --color-secondary-light: #22d3ee;
  --color-accent: #f59e0b;
  --color-accent-light: #fbbf24;

  /* Dark Theme (Default) */
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(99, 102, 241, 0.15);
  --nav-bg: rgba(15, 15, 26, 0.9);
  --hero-overlay: rgba(15, 15, 26, 0.7);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --gradient-primary: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #f59e0b 100%);
  --gradient-card: linear-gradient(180deg, rgba(99, 102, 241, 0.08), transparent);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-strong: rgba(0, 0, 0, 0.05);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: rgba(99, 102, 241, 0.2);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --hero-overlay: rgba(255, 255, 255, 0.8);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.1);
  --gradient-card: linear-gradient(180deg, rgba(99, 102, 241, 0.05), transparent);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-secondary-light);
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.75rem;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- Container & Grid --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Section Spacing --- */
.section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
}

/* --- Glassmorphism Cards --- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-family: inherit;
  line-height: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  background: var(--bg-glass-strong);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--text-primary);
}

.navbar-brand .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary-light);
  background: var(--bg-glass-strong);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Language Switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.6rem;
  height: 36px;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  margin-left: 0.4rem;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.15));
  border: 1.5px solid rgba(99,102,241,0.3);
  color: var(--color-secondary);
}

.lang-switch:hover {
  transform: scale(1.08);
  border-color: var(--color-primary);
  box-shadow: 0 0 14px rgba(99,102,241,0.35);
  color: var(--color-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 1rem;
  }
}

/* --- Particle Background (CSS-only) --- */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float linear infinite;
}

.particle:nth-child(1) { left: 10%; width: 3px; height: 3px; animation-duration: 12s; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; width: 5px; height: 5px; animation-duration: 16s; animation-delay: 1s; }
.particle:nth-child(3) { left: 40%; width: 3px; height: 3px; animation-duration: 14s; animation-delay: 2s; }
.particle:nth-child(4) { left: 55%; width: 6px; height: 6px; animation-duration: 18s; animation-delay: 0.5s; }
.particle:nth-child(5) { left: 70%; width: 4px; height: 4px; animation-duration: 13s; animation-delay: 1.5s; }
.particle:nth-child(6) { left: 85%; width: 3px; height: 3px; animation-duration: 15s; animation-delay: 2.5s; }
.particle:nth-child(7) { left: 15%; width: 5px; height: 5px; animation-duration: 17s; animation-delay: 3s; }
.particle:nth-child(8) { left: 50%; width: 3px; height: 3px; animation-duration: 11s; animation-delay: 0.8s; }
.particle:nth-child(9) { left: 75%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: 1.2s; }
.particle:nth-child(10) { left: 90%; width: 3px; height: 3px; animation-duration: 14s; animation-delay: 2s; }
.particle:nth-child(11) { left: 5%; width: 6px; height: 6px; animation-duration: 20s; animation-delay: 0.3s; }
.particle:nth-child(12) { left: 35%; width: 3px; height: 3px; animation-duration: 12s; animation-delay: 1.8s; }
.particle:nth-child(13) { left: 60%; width: 4px; height: 4px; animation-duration: 16s; animation-delay: 2.2s; }
.particle:nth-child(14) { left: 80%; width: 5px; height: 5px; animation-duration: 15s; animation-delay: 0.7s; }
.particle:nth-child(15) { left: 45%; width: 3px; height: 3px; animation-duration: 18s; animation-delay: 3.2s; }

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10vh) rotate(720deg);
    opacity: 0;
  }
}

/* Neural network connection lines */
.particle-connections {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle-connections::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 200%;
  background: linear-gradient(180deg, transparent, var(--color-primary), transparent);
  opacity: 0.08;
  transform: translate(-50%, -50%) rotate(30deg);
}

.particle-connections::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 200%;
  background: linear-gradient(180deg, transparent, var(--color-secondary), transparent);
  opacity: 0.06;
  transform: translate(-50%, -50%) rotate(-30deg);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 70px;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  padding: 4rem 0;
}

.hero-image {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.2));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 768px) {
  .hero-layout {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-content {
    text-align: center;
    padding: 2rem 0 0;
  }
  .hero-image {
    order: -1;
  }
  .hero-image img {
    max-height: 250px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-badge span {
  color: var(--color-accent);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.hero-gradient-1 {
  width: 600px;
  height: 600px;
  background: var(--color-primary);
  top: -10%;
  right: -10%;
}

.hero-gradient-2 {
  width: 400px;
  height: 400px;
  background: var(--color-secondary);
  bottom: -5%;
  left: -5%;
}

.hero-gradient-3 {
  width: 300px;
  height: 300px;
  background: var(--color-accent);
  bottom: 20%;
  right: 20%;
  opacity: 0.08;
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.about-text h2 {
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1.25rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.highlight-icon {
  color: var(--color-accent);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Solutions Section --- */
.solutions {
  background: var(--bg-secondary);
}

.solution-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.solution-card .card-icon {
  margin: 0 auto 1.25rem;
}

.solution-card h3 {
  margin-bottom: 0.75rem;
}

.solution-card p {
  font-size: 0.95rem;
}

/* --- Portfolio / Case Studies --- */
.portfolio-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.portfolio-image {
  aspect-ratio: 16/9;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.portfolio-image .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--bg-primary) 100%);
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tag-infra { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.tag-ai { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.tag-web { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tag-auto { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.tag-knowledge { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.tag-browser { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.portfolio-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.portfolio-info p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portfolio-tech span {
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background: var(--bg-glass-strong);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.portfolio-hover {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 26, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 2rem;
  text-align: center;
}

.portfolio-card:hover .portfolio-hover {
  opacity: 1;
}

.portfolio-hover-content {
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-hover-content {
  transform: translateY(0);
}

.portfolio-hover h4 {
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.portfolio-hover p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* --- Why Choose Us --- */
.why-section {
  background: var(--bg-secondary);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); }
}

.why-item {
  padding: 1.5rem;
  text-align: center;
}

.why-item .why-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.why-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.why-item p {
  font-size: 0.9rem;
}

/* --- FAQ Section --- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--color-primary-light);
}

.faq-question .faq-toggle {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --- Contact Floating Buttons --- */
.floating-contact {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  position: relative;
}

.floating-btn:hover {
  transform: scale(1.1);
}

.floating-btn .tooltip {
  position: absolute;
  right: calc(100% + 12px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--border-color);
}

.floating-btn:hover .tooltip {
  opacity: 1;
}

.floating-btn-telegram { background: #0088cc; }
.floating-btn-zalo { background: #0068ff; }
.floating-btn-phone { background: #22c55e; }
.floating-btn-messenger { background: #0084ff; }

.floating-main-btn {
  background: var(--gradient-primary);
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  box-shadow: var(--shadow-glow);
}

.floating-extras {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.floating-extras.active {
  display: flex;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-primary-light);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-contact-item .contact-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-gradient { background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* --- Selection --- */
::selection {
  background: var(--color-primary);
  color: #ffffff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-light);
}

/* --- Blog article spacing — heading sau list không bị dính (fix 12/08/2026) --- */
article ul,
article ol {
  margin-bottom: 1rem;
}

article ul ~ h2,
article ol ~ h2,
article ul ~ h3,
article ol ~ h3,
article ul ~ h4,
article ol ~ h4 {
  margin-top: 1.5rem;
}

/* ============================================================
   Services / Pricing pages (merged from css/style.css legacy
   — 12/08/2026: đồng bộ template mới cho dich-vu/services)
   ============================================================ */
.hero .sub { font-size: 17px; color: var(--text-muted); max-width: 780px; margin: 0 0 1rem; }
.hero .lead { font-size: 15.5px; color: var(--text-muted); max-width: 820px; margin-top: 16px; margin-left: 0; margin-right: 0; }
.hero .cta-row { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--color-primary-light);
  background: rgba(99, 102, 241, .1); border: 1px solid var(--border-color);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.lead { color: var(--text-muted); font-size: 16px; max-width: 820px; margin-bottom: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-glass-strong);
  border: 1px solid var(--border-color); border-radius: 999px; padding: 7px 14px;
  font-size: 13px; color: var(--text-secondary);
}
.chip b { color: var(--text-primary); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--color-primary-light); background: rgba(99, 102, 241, .12);
  border: 1px solid var(--border-color); border-radius: 999px; padding: 6px 14px; margin-bottom: 16px;
}
.em { color: var(--color-secondary-light); font-style: normal; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 1rem; padding: 26px; transition: .25s; }
.card:hover { transform: translateY(-3px); border-color: rgba(99, 102, 241, .6); box-shadow: var(--shadow-glow); }
.card .icon { font-size: 26px; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; }
.card p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 0; }
.service-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 1rem; padding: 26px; transition: .25s; }
.service-card:hover { transform: translateY(-3px); border-color: rgba(6, 182, 212, .55); box-shadow: var(--shadow-glow); }
.service-card .icon { font-size: 26px; margin-bottom: 12px; }
.service-card h3 { margin: 0 0 10px; }
.service-card p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 0; }
.pricing-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.price-card {
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 1rem; padding: 30px 26px;
  display: flex; flex-direction: column; position: relative; transition: .25s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.price-card.featured { border-color: var(--color-primary); background: linear-gradient(180deg, rgba(99, 102, 241, .12), var(--bg-secondary) 45%); }
.price-card .flag {
  position: absolute; top: -12px; left: 26px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}
.price-card .plan-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.price-card .plan-desc { color: var(--text-muted); font-size: 13.5px; margin-bottom: 14px; }
.price-card .price { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.price-card .price span { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.price-card .price-note { color: var(--text-muted); font-size: 12.5px; margin-bottom: 16px; }
.price-card ul { list-style: none; margin: 0 0 22px; flex: 1; padding: 0; }
.price-card li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; color: var(--text-secondary); }
.price-card li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: #4ade80; font-weight: 700; }
.price-card .btn { margin-top: auto; }
.policy-note {
  margin-top: 26px; padding: 16px 20px; border: 1px dashed var(--border-color);
  border-radius: 12px; color: var(--text-muted); font-size: 14px;
  background: rgba(99, 102, 241, .05);
}
.policy-note b { color: var(--text-primary); }
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.step { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 1rem; padding: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 13px; font-weight: 800; color: var(--color-secondary-light);
  display: inline-block; margin-bottom: 8px; letter-spacing: 1px;
}
.step h4 { margin: 0 0 6px; color: var(--text-primary); }
.step p { color: var(--text-muted); font-size: 14px; margin: 0; }
.sec-layer { display: flex; gap: 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 1rem; padding: 20px 22px; margin-bottom: 14px; }
.sec-layer .num { flex: 0 0 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.sec-layer h4 { margin: 0 0 4px; color: var(--text-primary); }
.sec-layer p { margin: 0; color: var(--text-muted); font-size: 14px; }
.cta-section { background: radial-gradient(900px 400px at 80% 0%, rgba(245, 158, 11, .10) 0%, transparent 55%), radial-gradient(800px 380px at 10% 100%, rgba(6, 182, 212, .10) 0%, transparent 55%), var(--bg-secondary); }
.form-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 18px; padding: 34px; max-width: 680px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border-color); background: var(--bg-primary); color: var(--text-primary);
  font-size: 14.5px; font-family: inherit; transition: .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; overflow: hidden; }
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 48px 0 30px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.footer-grid h4 { color: var(--text-primary); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-grid p, .footer-grid a { color: var(--text-muted); font-size: 14px; display: block; margin-bottom: 6px; }
.footer-grid a:hover { color: var(--color-secondary-light); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* --- FAQ services/dich-vu (details-based) — spacing thoáng như index --- */
.faq-item details {
  padding: 0 0.25rem;
}

/* FAQ services: spacing giữa các item (không ảnh hưởng FAQ accordion index) */
.faq-item:has(> details) {
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
}

.faq-item details summary {
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 1.25rem 24px 1.25rem 0;
}
.faq-item details summary::-webkit-details-marker {
  display: none;
}
.faq-item details summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--color-primary);
  font-size: 20px;
  line-height: 1;
}
.faq-item details[open] summary::after {
  content: "–";
}
.faq-item details p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
