/* CORE A Technology - Premium Design Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@700;800;900&display=swap');

:root {
  /* HSL Colors */
  --bg-color: #050816;
  --dark-color: #0b1120;
  --primary-color: #2563eb;
  --secondary-color: #60a5fa;
  --accent-color: #38bdf8;
  --text-color: #ffffff;
  --muted-color: #94a3b8;
  
  --card-bg: rgba(11, 17, 32, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(5, 8, 22, 0.75);
  --nav-border: rgba(255, 255, 255, 0.05);

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Light Theme Variables */
:root.light {
  --bg-color: #f8fafc;
  --dark-color: #f1f5f9;
  --primary-color: #2563eb;
  --secondary-color: #3b82f6;
  --accent-color: #0284c7;
  --text-color: #0f172a;
  --muted-color: #334155;
  
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(248, 250, 252, 0.75);
  --nav-border: rgba(15, 23, 42, 0.05);
}

/* Global Reset */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: 0;
  outline: none;
}

html, body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  scroll-behavior: auto; /* Handled by Lenis */
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
  border-radius: 10px;
  border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-color);
}

/* Shared Premium Utility Classes */
.glassmorphism {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
}

.glassmorphism-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--secondary-color) 60%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.light .text-gradient {
  background: linear-gradient(135deg, #0f172a 0%, var(--primary-color) 60%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-primary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 50%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glowing Back Blurs */
.glow-blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Tech grid structure */
.tech-grid {
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(96, 165, 250, 0.04) 1px, transparent 1px);
}
.light .tech-grid {
  background-image: 
    linear-gradient(to right, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
}

/* Keyframes animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.marquee-track {
  display: flex;
  overflow: hidden;
  width: 100%;
  user-select: none;
}
.marquee-content {
  display: flex;
  flex-shrink: 0;
  min-width: 100%;
  justify-content: space-around;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover .marquee-content {
  animation-play-state: paused;
}

/* Layout containers */
.section-wrapper {
  position: relative;
  padding: 4.5rem 1.5rem;
  width: 100%;
}

.max-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Preloader Splash screen styles */
#preloader {
  position: fixed;
  inset: 0;
  background-color: #050816;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.loader-ring {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 2rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* Mega menu styles */
.nav-logo-img {
  height: 50px;
  width: auto;
  display: block;
  transition: filter 0.4s ease, opacity 0.3s ease, height 0.3s ease;
  vertical-align: middle;
}
@media (min-width: 768px) {
  .nav-logo-img {
    height: 64px;
  }
}
.navbar.scrolled .nav-logo-img {
  height: 40px;
}
@media (min-width: 768px) {
  .navbar.scrolled .nav-logo-img {
    height: 48px;
  }
}
.light .nav-logo-img {
  filter: invert(1) brightness(0.1);
}
.nav-logo-img:hover {
  opacity: 0.85;
}

.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 0.8rem 1.5rem;
  z-index: 1000;
  transition: padding 0.3s ease;
}
.navbar.scrolled {
  padding: 0.4rem 1.5rem;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 1.2rem;
  padding: 0.4rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: background 0.4s ease;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-color);
  transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-color);
}

/* Mega Menu container */
.has-megamenu {
  position: relative;
}
.megamenu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  top: 100%;
  width: 540px;
  padding-top: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}
.has-megamenu:hover .megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.megamenu-content {
  border-radius: 1rem;
  padding: 1.2rem;
  display: grid;
  grid-cols: 2;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  box-shadow: 0 15px 40px rgba(5, 8, 22, 0.4);
}
.megamenu-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 0.8rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.megamenu-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.megamenu-icon {
  width: 32px; height: 32px;
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--secondary-color);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Buttons */
.btn-primary {
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--primary-color);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background-color: rgba(37, 99, 235, 0.9);
  transform: translateY(-2px);
}
.btn-secondary {
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-color);
  background-color: transparent;
  text-decoration: none;
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  border-color: var(--primary-color);
}

/* Hero Section */
.hero {
  min-height: 95vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 8.5rem !important;
  background-color: #050816 !important;
  background-image: linear-gradient(to bottom, rgba(5, 8, 22, 0.5) 0%, #050816 100%), url('public/hero_bg.png') !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff !important;
}

/* Adjust all subpage route views to start below the fixed header navbar */
.view-panel:not(#view-home) {
  padding-top: 8.5rem !important;
}

/* Ensure bright particle-theme contrast in light theme too */
.hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6 {
  color: #ffffff !important;
}

.hero .text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--secondary-color) 60%, var(--primary-color) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.hero .text-muted, .hero p, .hero span {
  color: #94a3b8 !important;
}

.hero .inline-flex {
  color: #38bdf8 !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  background-color: rgba(37, 99, 235, 0.05) !important;
}

.hero .inline-flex span {
  color: inherit !important;
}

.hero .btn-secondary {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.hero .btn-secondary:hover {
  border-color: var(--primary-color) !important;
}

.hero .border-t {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}
@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  #hero-canvas-container {
    height: 350px !important;
  }
}
#hero-canvas-container {
  width: 100%;
  height: 500px;
  position: relative;
  overflow: hidden;
}
#hero-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  display: block;
}
.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
@media (max-width: 767px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* Services Grid & 3D Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 991px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}
.service-card {
  min-height: 230px;
  padding: 1.5rem;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.service-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
  background-color: rgba(255, 255, 255, 0.02);
}
.light .service-card:hover {
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.08);
}
.service-card-icon {
  width: 44px; height: 44px;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Service Icon Themes */
.service-icon-seo {
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.1) !important;
}
.light .service-icon-seo {
  color: #0284c7;
  background-color: rgba(2, 132, 199, 0.15) !important;
}

.service-icon-smm {
  color: #f472b6;
  background-color: rgba(244, 114, 182, 0.1) !important;
}
.light .service-icon-smm {
  color: #db2777;
  background-color: rgba(219, 39, 119, 0.15) !important;
}

.service-icon-dev {
  color: #60a5fa;
  background-color: rgba(96, 165, 250, 0.1) !important;
}
.light .service-icon-dev {
  color: #1d4ed8;
  background-color: rgba(29, 78, 216, 0.15) !important;
}

.service-icon-it {
  color: #14b8a6;
  background-color: rgba(20, 184, 166, 0.1) !important;
}
.light .service-icon-it {
  color: #0d9488;
  background-color: rgba(13, 148, 136, 0.15) !important;
}

/* Course Card Premium Layout & Hover Glows */
.course-card {
  min-height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--card-border);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 1;
}

.course-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  opacity: 0.16;
  filter: grayscale(30%) brightness(0.5) contrast(1.1);
}

.light .course-card-bg {
  opacity: 0.1;
  filter: grayscale(45%) brightness(1.2) contrast(0.85);
}

.course-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 8, 22, 0.35) 0%, rgba(5, 8, 22, 0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

.light .course-card-overlay {
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.45) 0%, rgba(248, 250, 252, 0.92) 100%);
}

.course-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

.course-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.16);
}

.course-card:hover .course-card-bg {
  transform: scale(1.12);
}

/* Timeline milestones layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 991px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--primary-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-bullet {
  position: absolute;
  left: -2.7rem;
  top: 0.2rem;
  width: 14px; height: 14px;
  background: var(--bg-color);
  border: 3px solid var(--accent-color);
  border-radius: 50%;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.bento-span-2 {
  grid-column: span 2;
}
@media (max-width: 767px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-span-2 {
    grid-column: span 1;
  }
}
.bento-card {
  min-height: 220px;
  border-radius: 1.5rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--card-border);
}
.bento-card > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.bento-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
  background-color: rgba(255, 255, 255, 0.02);
}
.light .bento-card:hover {
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.1);
}
.bento-card-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover .bento-card-icon {
  transform: scale(1.12) translateY(-2px);
}

/* Process Section */
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
}
@media (max-width: 991px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
}
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Portfolio Filters */
.portfolio-filters {
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  margin-bottom: 3rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) {
  .portfolio-filters {
    justify-content: center;
  }
}
.filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-color);
  background: transparent;
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}
.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 991px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}
.portfolio-card {
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--card-border);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.portfolio-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
  background-color: rgba(255, 255, 255, 0.02);
}
.light .portfolio-card:hover {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.06);
}

/* SVG Chart Case Studies */
.chart-container {
  width: 100%;
  height: 150px;
  position: relative;
}

/* Command Menu Modal */
.cmd-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.cmd-modal.open {
  opacity: 1;
  visibility: visible;
}
.cmd-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(10px);
}
.cmd-dialog {
  position: relative;
  width: 100%;
  max-width: 550px;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(37, 99, 235, 0.15);
  z-index: 10;
}
.cmd-search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--card-border);
}
.cmd-search-bar input {
  width: 100%;
  background: transparent;
  color: var(--text-color);
  font-size: 0.9rem;
}
.cmd-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.5rem;
}
.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  color: var(--muted-color);
  background: transparent;
  text-align: left;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  text-decoration: none;
}
.cmd-item:hover {
  background-color: var(--dark-color);
  color: var(--text-color);
}

/* Floating Action Buttons Stack */
.floating-actions-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 999;
}
.floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.light .floating-btn {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.floating-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.ai-toggle-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: #fff;
}
.ai-toggle-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}
.whatsapp-toggle-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
}
.whatsapp-toggle-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}
.ai-panel {
  position: absolute;
  bottom: 3.8rem;
  right: 0;
  width: calc(100vw - 3rem);
  max-width: 350px;
  height: 480px;
  border-radius: 1.2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(5, 8, 22, 0.5);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}
.ai-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-b: 1px solid var(--card-border);
}
.ai-chat-history {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.chat-msg {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  line-height: 1.4;
}
.chat-msg.ai {
  align-self: flex-start;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  border-bottom-left-radius: 0;
}
.chat-msg.user {
  align-self: flex-end;
  background-color: var(--primary-color);
  color: #fff;
  border-bottom-right-radius: 0;
}
.ai-input-bar {
  padding: 0.8rem;
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--card-border);
}
.ai-input-bar input {
  width: 100%;
  padding: 0.5rem 0.9rem;
  border-radius: 0.8rem;
  font-size: 0.75rem;
  background-color: var(--dark-color);
  color: var(--text-color);
  border: 1px solid var(--card-border);
}
.ai-input-bar input::placeholder {
  color: var(--muted-color);
  opacity: 0.6;
}
.ai-input-bar button {
  padding: 0.5rem 0.8rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chatbot Quick Replies and Typing Animations */
.ai-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  border-top: 1px solid var(--card-border);
  background-color: rgba(5, 8, 22, 0.25);
}
.light .ai-quick-replies {
  background-color: rgba(255, 255, 255, 0.25);
}
.quick-reply-chip {
  font-size: 0.7rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.6rem;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-reply-chip:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}
.typing-indicator {
  align-self: flex-start;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  border-bottom-left-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.9rem;
  border-radius: 1rem;
}
.typing-dot {
  width: 5px;
  height: 5px;
  background-color: var(--muted-color);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Contact page elements */
.contact-form-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 991px) {
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}
.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  font-size: 0.8rem;
  background-color: var(--dark-color);
  color: var(--text-color);
  border: 1px solid var(--card-border);
  margin-top: 0.4rem;
  transition: border-color 0.3s ease;
}
.form-input::placeholder {
  color: var(--muted-color);
  opacity: 0.6;
}
.form-input:focus {
  border-color: var(--primary-color);
}
.tag-btn {
  padding: 0.4rem 1rem;
  border-radius: 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--muted-color);
  transition: all 0.3s ease;
}
.tag-btn.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
}

/* Accordions FAQ */
.faq-item {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--card-border);
  margin-bottom: 1rem;
}
.faq-trigger {
  width: 100%;
  padding: 1.2rem;
  text-align: left;
  background: transparent;
  color: var(--text-color);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--muted-color);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0 1.2rem;
}
.faq-item.open .faq-content {
  padding-bottom: 1.2rem;
}

/* Legal pages */
.legal-content {
  max-width: 800px;
  margin: 8.5rem auto 4rem !important;
  padding: 0 1.5rem;
}

/* Footer structure */
.footer {
  border-top: 1px solid var(--card-border);
  background-color: var(--dark-color);
  padding: 4rem 1.5rem 2rem;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 1.3fr;
  gap: 2rem;
}
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-grid > div:nth-child(1) {
    grid-column: span 2;
  }
  .footer-grid > div:nth-child(4) {
    grid-column: span 2;
  }
}
.footer-list {
  list-style: none;
}
.footer-list li {
  margin-bottom: 0.8rem;
}
.footer-list a {
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--muted-color);
  transition: color 0.2s ease;
}
.footer-list a:hover {
  color: var(--text-color);
}

/* Premium Card Hover Glow Animations */
.bento-card::before, .service-card::before, .portfolio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(
    400px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(96, 165, 250, 0.08),
    transparent 80%
  );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.light .bento-card::before, .light .service-card::before, .light .portfolio-card::before {
  background: radial-gradient(
    400px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(37, 99, 235, 0.06),
    transparent 80%
  );
}
.bento-card:hover::before, .service-card:hover::before, .portfolio-card:hover::before {
  opacity: 1;
}
/* Ensure card contents stay on top of glow */
.bento-card > *, .service-card > *, .portfolio-card > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .navbar {
    padding: 0.4rem 0.5rem;
  }
  .navbar.scrolled {
    padding: 0.25rem 0.5rem;
  }
  .nav-container {
    padding: 0.3rem 0.6rem;
    border-radius: 0.8rem;
  }
  .section-wrapper {
    padding: 2.5rem 1.25rem;
  }
  .hero {
    padding-top: 6.2rem !important;
    min-height: auto;
  }
  .view-panel:not(#view-home) {
    padding-top: 6.5rem !important;
  }
  .legal-content {
    margin: 6.5rem auto 4rem !important;
  }
  .footer-grid {
    text-align: center !important;
  }
  .footer-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-grid .flex {
    justify-content: center;
  }
  .footer-list {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-list li {
    text-align: center;
  }
}
