/*--------------------------------------------------------------
# Modern Design System (Bento Style)
--------------------------------------------------------------*/

:root {
  --primary: #0ea5e9;
  --primary-soft: rgba(14, 165, 233, 0.1);
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --border-color: rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --font-main: 'Inter', sans-serif;
  --font-heading: 'DM Sans', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

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

section,
#hero,
#services,
#portfolio,
#process,
#faq,
#contact {
  scroll-margin-top: 100px;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

/*--------------------------------------------------------------
# Layout Components
--------------------------------------------------------------*/

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 20px;
}

@media (max-width: 992px) {
  .section-container {
    padding: 60px 20px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-item {
    grid-column: span 2 !important;
  }
}

@media (max-width: 576px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-item {
    grid-column: span 1 !important;
  }

  .hero-modern h1 {
    font-size: 2.2rem;
  }

  .hero-trust-badges {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

.bento-item {
  background: var(--bg-surface);
  border-radius: 24px;
  padding: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.bento-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.bento-item:hover img {
  transform: scale(1.05);
}

/*--------------------------------------------------------------
# Navigation
--------------------------------------------------------------*/

.floating-nav {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 15px 50px;
  border-radius: 50px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  width: 95%;
  max-width: 1300px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.mobile-nav-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-heading);
}

@media (max-width: 992px) {
  .floating-nav {
    padding: 12px 25px;
    top: 15px;
    gap: 15px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow-hover);
    text-align: center;
    border: 1px solid var(--border-color);
  }

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

  .mobile-nav-toggle {
    display: block;
  }

  .floating-nav .btn-main {
    display: none;
  }
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/

.hero-modern {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 120px 20px;
  background: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 40%);
  overflow: hidden;
}

.hero-modern::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 40%;
  height: 40%;
  background: var(--primary-soft);
  filter: blur(100px);
  border-radius: 50%;
  z-index: -1;
  animation: floatShape 20s infinite alternate;
}

@keyframes floatShape {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(100px, 100px);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

.hero-trust-badges {
  display: flex;
  gap: 20px;
  margin-top: 60px;
  animation: fadeInUp 0.8s ease 0.8s forwards;
  opacity: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 600;
}

.trust-item i {
  color: var(--primary);
  font-size: 1.1rem;
}

.hero-badge {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease forwards;
}

.hero-modern h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -2px;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flip-container {
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
  position: relative;
  vertical-align: bottom;
  color: var(--primary);
  margin-top: 10px;
}

.flip-wrapper {
  display: flex;
  flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.flip-word {
  height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.hero-modern p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-cta {
  display: flex;
  gap: 15px;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.btn-main {
  background: var(--primary);
  color: white;
  padding: 16px 32px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
}

.btn-main:hover {
  transform: scale(1.05);
}

.btn-outline {
  border: 1px solid var(--border-color);
  padding: 16px 32px;
  border-radius: 30px;
  font-weight: 600;
  background: white;
}

/*--------------------------------------------------------------
# Portfolio Cards
--------------------------------------------------------------*/

.portfolio-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portfolio-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
}

.portfolio-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 8px;
  border-radius: 6px;
}

/*--------------------------------------------------------------
# Animations
--------------------------------------------------------------*/

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/*--------------------------------------------------------------
# Status Messages
--------------------------------------------------------------*/

.status-msg {
  padding: 15px 25px;
  border-radius: 12px;
  margin-top: 20px;
  display: none;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  animation: fadeInUp 0.4s ease;
}

.status-msg.loading {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.status-msg.success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-msg i {
  font-size: 1.2rem;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Tech Stack Section
--------------------------------------------------------------*/

.tech-stack-section {
  margin-top: 100px;
  text-align: center;
}

.tech-stack-header {
  margin-bottom: 40px;
}

.tech-label {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 16px;
  display: block;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.tech-stack-header h3 {
  font-size: 2.7rem;
  font-weight: 800;
  margin-top: 5px;
}

.tech-stack-container {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 30px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-weight: 700;
  font-size: 18px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tech-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.tech-badge:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  background: white;
}

.tech-badge:hover .tech-icon img {
  filter: grayscale(0%);
  transform: scale(1.3);
}

/* Brand Colors */
.tech-badge.laravel:hover {
  border-color: #FF2D20;
  color: #FF2D20;
}

.tech-badge.react:hover {
  border-color: #61DAFB;
  color: #0891b2;
}

.tech-badge.node:hover {
  border-color: #339933;
  color: #339933;
}

.tech-badge.vue:hover {
  border-color: #4FC08D;
  color: #42b883;
}

.tech-badge.ci:hover {
  border-color: #EE4323;
  color: #EE4323;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tech-stack-container {
    gap: 12px;
  }

  .tech-badge {
    padding: 10px 18px;
    font-size: 14px;
  }
}

/*--------------------------------------------------------------
# Solutions Section (Horizontal Slider)
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Solutions Section (Horizontal Slider)
--------------------------------------------------------------*/

.solutions-slider-wrapper {
  position: relative;
  padding: 20px 0 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.solutions-slider {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px 5px;
  /* Minimal padding for shadow breathing room */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  scroll-behavior: smooth;
}

.solutions-slider::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

/* Floating Navigation Buttons */
.slider-controls {
  position: absolute;
  top: 45%;
  left: -30px;
  right: -30px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 100;
}

@media (max-width: 1300px) {
  .slider-controls {
    left: 10px;
    right: 10px;
  }
}

.slider-btn {
  width: 50px;
  height: 50px;
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  opacity: 0.8;
  /* Always slightly visible for better UX */
}

.slider-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px) scale(1.1) !important;
  box-shadow: 0 15px 30px rgba(14, 165, 233, 0.3);
  opacity: 1;
}

.solution-card {
  flex: 0 0 calc((100% - 48px) / 3);
  /* 3 cards visible (2 gaps of 24px) */
  scroll-snap-align: start;
  background: white;
  padding: 35px;
  border-radius: 24px;
  border: 2px solid rgba(14, 165, 233, 0.2);
  box-shadow: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: grab;
}

@media (max-width: 992px) {
  .solution-card {
    flex: 0 0 calc((100% - 24px) / 2);
    /* 2 cards visible */
  }
}

@media (max-width: 576px) {
  .solution-card {
    flex: 0 0 100%;
    /* 1 card visible */
    padding: 25px;
  }

  .slider-controls {
    display: none;
    /* Hide buttons on mobile for better touch experience */
  }
}

.solution-card:active {
  cursor: grabbing;
}

@media (max-width: 576px) {
  .solution-card {
    flex: 0 0 300px;
    padding: 30px;
  }
}

.solution-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-soft) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}

.solution-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.2);
}

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

.solution-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 25px;
  transition: var(--transition-smooth);
}

.solution-card:hover .solution-icon {
  background: var(--primary);
  color: white;
  transform: rotate(10deg);
}

.solution-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.solution-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.slider-nav {
  text-align: center;
  margin-top: 30px;
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(14, 165, 233, 0.05);
  padding: 8px 20px;
  border-radius: 50px;
  animation: pulseHint 2s infinite;
}

@keyframes pulseHint {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/*--------------------------------------------------------------
# Our Process Section
--------------------------------------------------------------*/

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 50px;
}

@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: 0 10px 15px var(--primary-soft);
}

.step-card h4 {
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/*--------------------------------------------------------------
# FAQ Section (Accordion)
--------------------------------------------------------------*/

.faq-container {
  max-width: 800px;
  margin: 50px auto 0;
}

.faq-item {
  background: white;
  border-radius: 16px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-question {
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

.faq-answer {
  padding: 0 30px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

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

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

/*--------------------------------------------------------------
# Testimonials Section
--------------------------------------------------------------*/

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

@media (max-width: 992px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

.testimonial-card {
  background: white;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 25px;
  color: var(--text-main);
}

.client-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.client-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.client-name h5 {
  margin: 0;
  font-size: 1rem;
}

.client-name span {
  font-size: 0.8rem;
}

/*--------------------------------------------------------------
# Floating Chatbot
--------------------------------------------------------------*/

.chatbot-wrapper {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

.chatbot-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
  transition: var(--transition-smooth);
}

.chatbot-btn:hover {
  transform: scale(1.1) rotate(10deg);
}

.chat-window {
  width: 350px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: fadeInUp 0.4s ease;
}

@media (max-width: 576px) {
  .chat-window {
    width: 280px;
    right: 10px;
  }
}

.chat-window.active {
  display: flex;
}

.chat-header {
  background: var(--primary);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#closeChat {
  transition: var(--transition-smooth);
  opacity: 0.8;
}

#closeChat:hover {
  opacity: 1;
  transform: scale(1.2);
}

.chat-body {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #f8fafc;
}

.bot-msg {
  background: white;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 0;
  font-size: 0.9rem;
  align-self: flex-start;
  max-width: 85%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  animation: fadeInUpSmall 0.5s ease forwards;
}

@keyframes fadeInUpSmall {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-q-btn {
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
}

.chat-q-btn:hover {
  background: var(--primary-soft);
}

.user-msg {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 16px 16px 0 16px;
  font-size: 0.85rem;
  align-self: flex-end;
  max-width: 80%;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 15px 20px !important;
}

.typing-indicator span {
  height: 6px;
  width: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  display: block;
  opacity: 0.4;
  animation: typing-bounce 1s infinite ease-in-out;
}

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

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

@keyframes typing-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}