/* ===================================
   HARI LABS - ENTERPRISE AI AUTOMATION
   Futuristic Dark Theme with Orange-Gold Gradient
   =================================== */

/* === CSS VARIABLES === */
:root {
  /* Colors - Logo Inspired */
  --primary-gradient: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
  --primary-orange: #FF8C42;
  --primary-gold: #FFD700;
  --secondary-teal: #00D9FF;
  --secondary-blue: #4A90E2;
  --background-black: #0a0a0a;
  --background-dark: #121212;
  --background-card: rgba(255, 255, 255, 0.03);
  --text-white: #ffffff;
  --text-gray: #b0b0b0;
  --text-dark-gray: #707070;
  --border-glow: rgba(255, 140, 66, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --border-radius: 16px;
  
  /* Typography */
  --font-primary: 'Orbitron', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GLOBAL RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--background-black);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 140, 66, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 140, 66, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-gray);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* === GRADIENT TEXT === */
.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === CONTAINER === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding);
  position: relative;
}

/* === NAVIGATION === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 12px 0; /* reduce height only */
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 10px 0; /* reduce height only */
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 10px 40px rgba(255, 140, 66, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-family: var(--font-primary);
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 10px rgba(255, 140, 66, 0));
  display: inline-block;
  image-rendering: auto;
  vertical-align: middle;
  will-change: transform;
  content-visibility: auto;
}

.logo-img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 15px rgba(255, 140, 66, 0.6));
  animation: logoRotate 2s linear infinite;
}

.logo-img:active {
  transform: scale(0.95);
  filter: drop-shadow(0 0 20px rgba(255, 140, 66, 0.8));
}

.logo-text {
  height: 35px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 10px rgba(255, 140, 66, 0));
  display: inline-block;
  image-rendering: auto;
  vertical-align: middle;
  will-change: transform;
  content-visibility: auto;
}

.logo-text:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(255, 140, 66, 0.6));
}

.logo-text:active {
  transform: scale(0.98);
  filter: drop-shadow(0 0 20px rgba(255, 140, 66, 0.8));
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-menu a {
  color: var(--text-white);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition-fast);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-orange);
  border-radius: 3px;
  transition: var(--transition-fast);
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  font-family: var(--font-secondary);
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--background-black);
  box-shadow: 0 10px 30px rgba(255, 140, 66, 0.4);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 140, 66, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  border: 2px solid var(--secondary-teal);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(0, 217, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
  transform: translateY(-3px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

/* === GLASSMORPHISM CARDS === */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 40px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 66, 0.1), transparent);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 20px 60px rgba(255, 140, 66, 0.2);
  transform: translateY(-10px);
}

.glass-card:hover::before {
  left: 100%;
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(255, 140, 66, 0.15) 0%, transparent 70%);
  transform: translateX(-50%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  color: var(--text-gray);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === SECTION HEADERS === */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  margin-bottom: 15px;
}

.section-header p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* === GRID LAYOUTS === */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === SERVICE CARDS === */
.service-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 40px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-card .icon {
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 15px;
  color: var(--text-white);
}

.service-card p {
  color: var(--text-gray);
  margin-bottom: 20px;
}

.service-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 20px 60px rgba(255, 140, 66, 0.2);
  transform: translateY(-10px);
}

/* === FOOTER === */
.footer {
  background: var(--background-dark);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a:hover {
  color: var(--primary-orange);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  color: white;
}

/* Consistent X (Twitter) icon styling */
.social-x-icon { width: 20px; height: 20px; display: block; }
.social-links a.social-x { background:#000000; }

.social-links a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* === TECHNOLOGY LOGOS === */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.tech-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
  min-height: 100px;
}

.tech-logo-white {
  background: white;
}

.tech-logo:hover {
  border-color: var(--primary-orange);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 140, 66, 0.3);
}

.tech-logo-white:hover {
  background: #f5f5f5;
}

.tech-logo img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-dark-gray);
}

/* === STATS SECTION === */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 60px 0;
}

.stat-card {
  text-align: center;
  padding: 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
}

.stat-card h3 {
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.stat-card p {
  color: var(--text-gray);
}

/* === TESTIMONIALS === */
.testimonial-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 40px;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 5rem;
  color: var(--primary-orange);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.testimonial-text {
  font-size: 1.1rem;
  margin-bottom: 25px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.author-info h4 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.author-info p {
  font-size: 0.9rem;
  color: var(--text-dark-gray);
  margin: 0;
}

/* === FORM STYLES === */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-white);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 140, 66, 0.3);
  border-radius: 10px;
  color: var(--text-white);
  font-family: var(--font-secondary);
  font-size: 1rem;
  transition: var(--transition-fast);
}

/* Compact select variant (smaller box, same font size) */
.select-compact {
  width: auto !important;
  min-width: 105px;
  padding: 6px 10px !important;
  line-height: 1.1;
  height: 34px; /* Consistent compact height */
  font-size: inherit; /* Keep existing font size */
}

@media (max-width: 640px) {
  .select-compact { width: 110px !important; }
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(176, 176, 176, 0.6);
}

.form-group select {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
}

.form-group select option {
  background: var(--background-dark);
  color: var(--text-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-orange);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 20px rgba(255, 140, 66, 0.3);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* === CONTACT FORM SPECIFIC === */
.contact-form-card {
  padding: 50px;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.phone-input-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.phone-number-input {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 12px 14px;
  box-sizing: border-box;
  font-size: 1rem;
}

/* === PRICING TABLE === */
.pricing-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 50px 40px;
  text-align: center;
  transition: var(--transition-smooth);
}

.pricing-card.featured {
  border-color: var(--primary-orange);
  box-shadow: 0 20px 60px rgba(255, 140, 66, 0.3);
  transform: scale(1.05);
}

.pricing-card h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.price {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 20px 0;
}

.price-period {
  font-size: 1rem;
  color: var(--text-gray);
}

.features-list {
  list-style: none;
  margin: 30px 0;
  text-align: left;
}

.features-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-list li:before {
  content: '✓';
  color: var(--secondary-teal);
  font-weight: 700;
}

/* === BADGE === */
.badge {
  display: inline-block;
  padding: 5px 15px;
  background: var(--primary-gradient);
  color: var(--background-black);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
}

/* === GLOW EFFECT === */
.glow {
  position: relative;
}

.glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  filter: blur(40px);
  opacity: 0.3;
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  .hero h1 { font-size: 3rem; }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .logo-img {
    height: 45px;
    max-width: 180px;
  }
  
  .logo-text {
    height: 30px;
    max-width: 250px;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px;
    transition: var(--transition-smooth);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-buttons {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .logo-img {
    height: 35px;
    max-width: 120px;
    min-width: 35px;
  }
  
  .logo-text {
    height: 22px;
    max-width: 160px;
    min-width: 80px;
  }
  
  .logo {
    gap: 8px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 60px 0;
  }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* === CUSTOM DROPDOWN COMPONENT === */
/* Minimal, professional dropdown replacing native select.
   Uses <details> for accessibility & keyboard support.
   Summary shows current selection; menu animates open/close. */
.hl-dropdown {
  position: relative;
  display: inline-block;
  width: 240px;
  max-width: 100%;
  font-size: 13px; /* 12–14px target */
  font-family: var(--font-secondary);
}

.hl-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-white);
  user-select: none;
  transition: var(--transition-fast);
}

.hl-dropdown summary::-webkit-details-marker { display: none; }

.hl-dropdown summary:hover {
  background: rgba(255,255,255,0.10);
  border-color: var(--primary-orange);
}

.hl-dropdown[open] summary {
  border-color: var(--primary-orange);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(255,140,66,0.15);
}

.hl-dropdown-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
  color: var(--text-gray);
}

.hl-dropdown[open] .hl-dropdown-caret { transform: rotate(180deg); }

.hl-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--background-dark);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px 0;
  margin: 0;
  list-style: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  transform-origin: top;
  transform: scaleY(.85);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  z-index: 50;
}

.hl-dropdown[open] .hl-dropdown-menu {
  transform: scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.hl-dropdown-option {
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--text-gray);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hl-dropdown-option:hover,
.hl-dropdown-option:focus {
  background: rgba(255,255,255,0.08);
  color: var(--text-white);
}

.hl-dropdown-option[aria-selected="true"] {
  background: rgba(255,140,66,0.18);
  color: var(--text-white);
}

.hl-dropdown.small { width: 160px; }
.hl-dropdown.full { width: 100%; }

@media (max-width: 640px) {
  .hl-dropdown { width: 100%; }
}

/* Focus ring for keyboard navigation */
.keyboard-nav .hl-dropdown summary:focus {
  outline: 2px solid var(--secondary-teal);
  outline-offset: 2px;
}

/* === LOADING ANIMATION === */
.loader {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--glass-border);
  border-top-color: var(--primary-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes logoRotate {
  from { transform: scale(1.08) rotate(0deg); }
  to { transform: scale(1.08) rotate(360deg); }
}

/* === SCROLL TO TOP === */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 999;
  box-shadow: 0 10px 30px rgba(255, 140, 66, 0.4);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 140, 66, 0.6);
}

/* === LEGAL MODALS === */
.hl-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.hl-modal.open { display: flex; }

.hl-modal-content {
  width: min(800px, 92vw);

/* === LEGAL PAGES (Privacy & Terms) === */
.legal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px 0;
}
.legal-title .icon {
  font-size: 1.6rem;
  color: var(--primary-orange);
}

.legal-section {
  margin: 24px 0;
  padding: 22px 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}
.legal-section h3 {
  color: var(--primary-orange);
  margin-bottom: 8px;
}
.legal-section h2 { color: var(--text-white); }
.legal-section p { color: var(--text-gray); }

.legal-list {
  list-style: none;
  padding-left: 0;
}
.legal-list li {
  position: relative;
  padding-left: 22px;
  margin: 8px 0;
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.5);
}

.legal-callout {
  background: rgba(255,140,66,0.10);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 16px 18px;
}
  max-height: 80vh;
  overflow: auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: fadeInUp 0.25s ease-out;
}

.hl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hl-modal-title { font-family: var(--font-primary); font-size: 1.4rem; }

.hl-modal-close {
  background: transparent;
  border: 0;
  color: var(--text-gray);
  font-size: 1.2rem;
  cursor: pointer;
}

.hl-modal-body { color: var(--text-gray); }
.hl-modal-body h4 { color: var(--text-white); margin: 16px 0 8px; }
.hl-modal-body p, .hl-modal-body li { font-size: 0.95rem; }
.hl-modal-body ul { padding-left: 18px; }

.hl-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--glass-border);
  margin-top: 16px;
  padding-top: 14px;
}

.hl-agree-row { display:flex; align-items:center; gap:10px; }
.hl-agree-row input { width:16px; height:16px; }

.btn-legal {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--text-white);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-legal[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-legal.primary { background: var(--primary-gradient); color: #0a0a0a; border: none; }

@media (max-width: 640px) {
  .hl-modal-content { padding: 20px; }
}

/* === LEGAL PAGES ACCENTS === */
.legal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-orange);
}
.legal-title i { color: var(--primary-orange); font-size: 1.1rem; }

.legal-section { margin-bottom: 20px; }

.legal-list {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}
.legal-list li {
  position: relative;
  padding-left: 26px;
  margin: 8px 0;
  color: var(--text-gray);
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-gradient);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.5);
}

.legal-callout {
  background: rgba(255,140,66,0.08);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 16px;
}

/* === BLOG POST STYLES === */
.blog-post {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  position: relative;
}

.blog-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 66, 0.1), transparent);
  transition: left 0.5s ease;
}

.blog-post:hover {
  transform: translateY(-8px);
  border-color: var(--primary-orange);
  box-shadow: 0 20px 60px rgba(255, 140, 66, 0.15), 0 0 40px rgba(0, 217, 255, 0.1);
}

.blog-post:hover::before {
  left: 100%;
}

.blog-post h3 {
  transition: color 0.3s ease;
}

.blog-post:hover h3 {
  color: var(--primary-orange);
}

.blog-post p {
  transition: color 0.3s ease;
}

.blog-post a {
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.blog-post a:hover {
  color: var(--primary-gold) !important;
  transform: translateX(4px);
}

/* Search Input Styling */
#blogSearchInput {
  transition: all 0.3s ease !important;
}

#blogSearchInput:focus {
  outline: none;
  border-color: var(--primary-orange) !important;
  box-shadow: 0 0 20px rgba(255, 140, 66, 0.2);
  background: rgba(255, 140, 66, 0.03) !important;
}

#blogSearchInput::placeholder {
  color: var(--text-dark-gray);
}


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ENHANCED RESPONSIVE & PERFORMANCE
   ======================================== */

/* === TABLET BREAKPOINT === */
@media (max-width: 1024px) and (min-width: 769px) {
  .container {
    padding: 0 30px;
  }
  
  h1 { font-size: 3rem; }
  h2 { font-size: 2.3rem; }
  
  .hero h1 { font-size: 3.5rem; }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .service-card,
  .glass-card {
    padding: 30px;
  }
}

/* === MOBILE LANDSCAPE / SMALL TABLET === */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  .hero {
    min-height: 80vh;
    padding-top: 100px;
  }
  
  .hero h1 { 
    font-size: 2.8rem; 
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px 15px;
  }
  
  .stat-card h3 {
    font-size: 2.5rem;
  }
  
  .service-card,
  .glass-card {
    padding: 25px 20px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
  
  .hero-buttons {
    gap: 15px;
  }
  
  /* === TABLET CONTACT FORM === */
  .contact-form-card {
    padding: 35px 25px;
  }
  
  .phone-input-wrapper {
    gap: 8px;
  }
}

/* === MOBILE PORTRAIT === */
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.3rem; }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .stat-card h3 {
    font-size: 2.2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .section {
    padding: 20px 0 !important;
  }
  
  .glass-card {
    padding: 8px 5px !important;
  }
  
  .service-card,
  .glass-card {
    padding: 20px 15px;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }
  
  .hero-buttons {
    width: 100%;
  }
  
  .hero-buttons a {
    width: 100%;
  }
  
  .nav-menu {
    padding: 30px 20px;
  }
  
  .tech-logo {
    min-height: 80px;
  }
  
  /* === CONTACT FORM MOBILE FIXES === */
  .contact-form-card {
    padding: 20px 15px !important;
    margin: 0;
    max-width: 100%;
  }
  
  .contact-form-card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px !important;
  }
  
  .form-group {
    margin-bottom: 18px;
  }
  
  .form-group textarea {
    min-height: 120px;
  }
  
  button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 12px 14px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
  }
  
  .form-group label {
    font-size: 0.9rem;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group textarea {
    min-height: 120px;
  }
  
  button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
  }
  
  .phone-input-wrapper {
    gap: 4px;
    flex-wrap: nowrap;
  }
  
  .phone-number-input {
    padding: 11px 12px;
    min-width: 120px;
    flex: 1 1 auto;
    font-size: 0.95rem;
  }
  
  .select-compact {
    min-width: 85px !important;
    max-width: 95px;
    padding: 11px 8px !important;
    font-size: 0.9rem !important;
    flex: 0 0 auto;
  }
  
  .grid-2 {
    gap: 30px !important;
  }
}

/* === TINY SCREENS (320px) === */
@media (max-width: 360px) {
  .container {
    padding: 0 6px !important;
    max-width: 100% !important;
  }
  
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.8rem; }
  
  .stat-card h3 {
    font-size: 1.8rem;
  }
  
  .service-card,
  .glass-card {
    padding: 12px;
  }
  
  .section {
    padding: 25px 0 !important;
  }
  
  .logo-img {
    height: 28px;
    max-width: 95px;
  }
  
  .logo-text {
    height: 18px;
    max-width: 130px;
  }
  
  .contact-form-card {
    padding: 8px 6px !important;
    margin: 0;
  }
  
  .contact-form-card h2 {
    font-size: 0.95rem !important;
    margin-bottom: 6px !important;
  }
  
  .grid,
  .grid-2 {
    gap: 12px !important;
  }
  
  .form-group {
    margin-bottom: 4px;
  }
  
  .form-group label {
    font-size: 0.6rem;
    margin-bottom: 2px;
  }
  
  .form-group textarea {
    min-height: 45px;
  }
  
  button[type="submit"] {
    padding: 5px 10px;
    font-size: 0.7rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 4px 6px !important;
    font-size: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .phone-input-wrapper {
    gap: 4px;
    flex-wrap: nowrap;
  }
  
  .phone-number-input {
    padding: 5px 6px;
    min-width: 80px;
    flex: 1 1 auto;
  }
  
  .select-compact {
    min-width: 58px !important;
    max-width: 70px;
    padding: 5px 4px !important;
    font-size: 10px !important;
    flex: 0 0 auto;
  }
}

/* === EXTRA TINY SCREENS (280px-320px) === */
@media (max-width: 320px) {
  .container {
    padding: 0 8px !important;
    max-width: 100% !important;
  }
  
  .contact-form-card {
    padding: 16px 14px !important;
    margin-top: 12px !important;
    border-radius: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .navbar {
    padding: 8px 0 !important;
  }
  
  .contact-form-card h2 {
    font-size: 1.3rem !important;
    margin-bottom: 15px !important;
    font-weight: 700;
  }
  
  .grid,
  .grid-2 {
    gap: 12px !important;
  }
  
  .form-group {
    margin-bottom: 14px;
    width: 100% !important;
  }
  
  .form-group label {
    font-size: 0.87rem;
    margin-bottom: 7px;
    font-weight: 500;
    display: block;
    word-break: break-word;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 13px 15px !important;
    font-size: 0.96rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    min-height: 48px !important;
  }
  
  .form-group textarea {
    min-height: 85px !important;
  }
  
  button[type="submit"] {
    padding: 13px 18px;
    font-size: 0.96rem;
    margin-top: 12px !important;
    border-radius: 12px !important;
    width: 100% !important;
    min-height: 48px !important;
  }
  
  button i,
  .btn i {
    display: inline-block !important;
    margin-right: 8px;
  }
  
  .select-compact {
    min-width: 100px !important;
    max-width: 120px;
    padding: 10px 8px !important;
    font-size: 0.9rem !important;
    flex: 0 0 auto;
  }
  
  .phone-input-wrapper {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
  }
  
  .phone-number-input {
    padding: 10px 12px !important;
    min-width: 120px !important;
    flex: 1 1 auto !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
    width: auto !important;
  }
  
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1rem; }
  .hero h1 { font-size: 1.4rem; }
  
  .hero {
    min-height: 25vh !important;
    padding-top: 45px !important;
  }
  
  small {
    display: none !important;
  }
  
  form > p {
    display: none !important;
  }
  
  .section {
    padding: 8px 0 !important;
  }
  
  .contact-info {
    padding: 6px !important;
    margin-bottom: 6px !important;
  }
  
  .contact-info h3 {
    font-size: 0.75rem !important;
    margin-bottom: 4px !important;
  }
  
  .contact-info p,
  .contact-info a {
    font-size: 0.65rem !important;
  }
  
  .social-links {
    gap: 6px !important;
    margin-top: 6px !important;
  }
  
  .social-links a {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.7rem !important;
  }
}

/* === PERFORMANCE: REDUCE MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  body::before {
    animation: none;
  }
  
  .gradient-text {
    animation: none;
  }
}

/* === PERFORMANCE: GPU ACCELERATION === */
.glass-card,
.service-card,
.btn,
.stat-card {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* === TOUCH OPTIMIZATION === */
@media (hover: none) and (pointer: coarse) {
  .btn,
  a,
  button,
  .mobile-toggle {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-menu a {
    padding: 15px 0;
  }
}

