/* === CSS Custom Properties === */
:root {
  --bg: #08090d;
  --bg-card: #0f1118;
  --bg-card-hover: #141620;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --gradient-1: #3b82f6;
  --gradient-2: #8b5cf6;
  --gradient-3: #06b6d4;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --text-muted: #475569;
  --border: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* === Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-title {
  font-family: 'Sora', sans-serif;
}

.font-body {
  font-family: 'DM Sans', sans-serif;
}

/* === Glass Cards === */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-card-solid {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* === Gradient Text === */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Glow Button === */
.btn-glow {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 15px rgba(0,0,0,0.3);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--accent-glow), 0 8px 25px rgba(0,0,0,0.4);
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-glow:hover::before {
  transform: translateX(100%);
}

.btn-outline {
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

/* === Header === */
#header {
  background: rgba(8, 9, 13, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
}

#header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 9, 13, 0.95);
}

.nav-link {
  color: var(--text-light);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-nav-link {
  color: var(--text-light);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

/* === Hero === */
.hero-image-container {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.hero-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.1), transparent 60%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}

.hero-glow-1 {
  background: var(--gradient-1);
  top: -10%;
  right: -5%;
}

.hero-glow-2 {
  background: var(--gradient-2);
  bottom: -20%;
  left: -10%;
}

.hero-glow-3 {
  background: var(--gradient-3);
  top: 40%;
  left: 30%;
  width: 300px;
  height: 300px;
  opacity: 0.08;
}

/* === Tag/Badge === */
.tag {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent-light);
}

.tag-star {
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  border: 1px solid rgba(59,130,246,0.3);
  color: #fff;
  animation: starPulse 3s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(59,130,246,0.2); }
  50% { box-shadow: 0 0 20px rgba(59,130,246,0.4); }
}

/* === Service Cards === */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gradient-1), var(--gradient-2), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.2);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(59,130,246,0.08);
}

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

.service-featured {
  background: linear-gradient(135deg, var(--bg-card), rgba(59,130,246,0.05));
  border: 1px solid rgba(59,130,246,0.15);
}

.service-featured:hover {
  border-color: rgba(59,130,246,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(59,130,246,0.1);
}

/* === Icon Box === */
.icon-box {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.15);
}

.icon-box-lg {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.08));
  border: 1px solid rgba(59,130,246,0.15);
}

/* === Stats === */
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
}

/* === Testimonial Cards === */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.15);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* === Gallery === */
.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
}

.gallery-item:hover {
  border-color: rgba(59,130,246,0.2);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* === Lightbox === */
#lightbox.active {
  display: flex;
}

/* === FAQ === */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(59,130,246,0.15);
}

.faq-item.active {
  border-color: rgba(59,130,246,0.2);
}

.faq-toggle {
  cursor: pointer;
  background: none;
  border: none;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  display: block;
}

/* === CTA Section === */
.cta-box {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.05), rgba(6,182,212,0.03));
  border: 1px solid rgba(59,130,246,0.15);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.08), transparent 70%);
  pointer-events: none;
}

/* === Form Inputs === */
.input-dark {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.3s ease;
}

.input-dark:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  outline: none;
}

.input-dark::placeholder {
  color: var(--text-muted);
}

/* === Contact Info === */
.contact-icon-box {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.12);
}

/* === Chat Widget === */
.chat-pulse {
  animation: chatPulse 2.5s ease-in-out infinite;
}

@keyframes chatPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.chat-pulse.chat-open {
  animation: none;
}

#chat-messages::-webkit-scrollbar {
  width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-bubble-assistant {
  background: var(--bg-card-hover);
  color: var(--text);
  border-radius: 1rem 1rem 1rem 0.25rem;
  padding: 0.75rem 1rem;
  max-width: 85%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
  border: 1px solid var(--border);
}

.chat-bubble-assistant a {
  color: var(--accent-light);
  text-decoration: underline;
}

.chat-bubble-user {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  border-radius: 1rem 1rem 0.25rem 1rem;
  padding: 0.75rem 1rem;
  max-width: 85%;
  margin-left: auto;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 1rem 1rem 1rem 0.25rem;
  width: fit-content;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-light);
  animation: typingBounce 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* === Reveal Animations === */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0);
}

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

/* === Grid mesh background === */
.mesh-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* === Divider line === */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* === Select styling === */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

select option {
  background: var(--bg-card);
  color: var(--text);
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
}

/* === Stars === */
.star-filled {
  color: #f59e0b;
}

/* === Avatar ring === */
.avatar-ring {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  padding: 2px;
}

.avatar-ring > div {
  background: var(--bg-card);
}

/* === Responsive === */
@media (max-width: 768px) {
  #chat-panel {
    height: 420px;
    width: 320px;
  }

  .hero-glow {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 480px) {
  #chat-panel {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }
}
