:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #0d1321;
  --bg-card: #131a2b;
  --text-primary: #e8ecf4;
  --text-secondary: #8b95a8;
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-blue-dark: #1d4ed8;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Figtree', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

.font-unbounded {
  font-family: 'Unbounded', cursive;
}

.font-figtree {
  font-family: 'Figtree', sans-serif;
}

/* Header */
#header {
  background: transparent;
}

#header.scrolled {
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hero Overlay */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 23, 0.3) 0%,
    rgba(10, 14, 23, 0.6) 40%,
    rgba(10, 14, 23, 0.85) 70%,
    rgba(10, 14, 23, 0.98) 100%
  );
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-blue-light) 0%, var(--accent-blue) 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glow Button */
.glow-btn {
  position: relative;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(59, 130, 246, 0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.glow-btn:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5), 0 0 60px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

/* Scroll Indicator */
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

.animate-scroll-dot {
  animation: scrollDot 2s ease-in-out infinite;
}

/* Reveal Animation */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Service Cards */
.service-card {
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card-featured {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15);
}

/* Testimonial Cards */
.testimonial-card {
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Gallery */
.gallery-item {
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

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

#lightbox img {
  transition: opacity 0.3s ease;
}

/* FAQ */
.faq-item {
  transition: border-color 0.3s ease;
}

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

.faq-icon {
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

.faq-answer.open {
  max-height: 300px;
}

/* Chat Widget Pulse - composited animation using only transform and opacity */
@keyframes chatPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

.chat-pulse {
  animation: chatPulse 2.5s ease-in-out infinite;
}

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

/* Chat Messages */
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Figtree', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg.user {
  background: var(--accent-blue);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-msg a {
  color: var(--accent-blue-light);
  text-decoration: underline;
  word-break: break-all;
}

.chat-msg.user a {
  color: #dbeafe;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-items: center;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: typingBounce 1.4s ease-in-out 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); }
}

/* Select Styling */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
}

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

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Chat Scrollbar */
#chat-messages::-webkit-scrollbar {
  width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

/* Mobile Menu Animation */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 640px) {
  #chat-panel {
    width: calc(100vw - 32px);
    right: -8px;
    height: 420px;
  }

  #chat-tooltip {
    display: none;
  }
}

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