/* ============================================
   MAG Roadside - Style System
   Dark Mode | Glassmorphism | 2025-2026 Trends
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors - Orange Brand Palette */
  --color-primary: #f48c42;
  --color-primary-dark: #d97532;
  --color-primary-light: #ff9d5c;
  --color-primary-glow: rgba(244, 140, 66, 0.3);

  /* Background Colors */
  --color-bg-dark: #0a0a0a;
  --color-bg-darker: #050505;
  --color-surface: #1a1a1a;
  --color-surface-light: rgba(255, 255, 255, 0.05);

  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #e5e5e5;
  --color-text-muted: #a0a0a0;

  /* Glassmorphism */
  --glass-bg: rgba(10, 10, 10, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 12px;

  /* Typography */
  --font-display: "Montserrat", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--color-primary-glow);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .parallax-bg img {
    transform: none !important;
  }

  .custom-cursor,
  .custom-cursor-dot {
    display: none !important;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   Custom Cursor
   ============================================ */
.custom-cursor,
.custom-cursor-dot {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.custom-cursor {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.custom-cursor.expand {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 1;
}

/* Hide on touch devices */
@media (hover: none) {
  .custom-cursor,
  .custom-cursor-dot {
    display: none;
  }
}

/* ============================================
   Preloader
   ============================================ */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity var(--transition-slow),
    visibility var(--transition-slow);
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
}

.preloader-logo {
  margin-bottom: var(--spacing-md);
}

.logo-animate {
  width: 350px;
  animation: logoLift 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.preloader-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}

@keyframes logoLift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

.text-primary {
  color: var(--color-primary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(
    135deg,
    var(--color-text-primary) 0%,
    var(--color-text-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.title-underline {
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-primary),
    transparent
  );
  margin: var(--spacing-sm) auto;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--spacing-sm) 0;
  transition: all var(--transition-base);
}

.header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 120px;
  width: auto;
  transition: transform var(--transition-base);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 20px rgba(244, 140, 66, 0.3));
}

.logo img:hover {
  transform: scale(1.05);
}

.nav {
  display: none;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

/* Header Call Button - Prominent Click-to-Call */
.header-call-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--color-primary);
  color: var(--color-bg-dark);
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(244, 140, 66, 0.4);
  margin-right: 0.75rem;
}

.header-call-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 140, 66, 0.5);
}

.header-call-btn .status-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.header-call-btn .material-symbols-outlined {
  font-size: 1.25rem;
}

.header-call-btn .call-text {
  display: none;
}

@media (min-width: 768px) {
  .header-call-btn .call-text {
    display: inline;
  }
}

/* Hero CTA Button - Above the Fold Call to Action */
.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--color-primary);
  color: var(--color-bg-dark);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: 0 8px 30px rgba(244, 140, 66, 0.5);
  margin-bottom: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.hero-cta-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-primary));
  border-radius: inherit;
  z-index: -1;
  animation: ctaGlow 2s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.hero-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(244, 140, 66, 0.6);
}

.hero-cta-btn .material-symbols-outlined {
  font-size: 1.5rem;
  animation: phoneRing 1.5s ease-in-out infinite;
}

@keyframes phoneRing {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-10deg); }
  20%, 40% { transform: rotate(10deg); }
  50% { transform: rotate(0deg); }
}

.hero-cta-btn .cta-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .hero-cta-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .hero-cta-btn .cta-badge {
    display: none;
  }
}

.nav-link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-light);
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle:hover {
  background: var(--color-primary);
  transform: scale(1.05);
}

.menu-toggle .material-symbols-outlined {
  font-size: 24px;
  color: var(--color-text-primary);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-left: 1px solid var(--glass-border);
  z-index: 9998;
  transition: right var(--transition-base);
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-content {
  padding: var(--spacing-md);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-sm);
  background: var(--color-surface-light);
  transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
  background: var(--color-primary);
  transform: rotate(90deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.mobile-nav-link {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text-secondary);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-primary);
  background: var(--color-surface-light);
  transform: translateX(10px);
}

.mobile-menu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-primary);
  color: var(--color-bg-dark);
  font-weight: 800;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.mobile-menu-cta:hover {
  background: var(--color-primary-dark);
  transform: scale(1.02);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.4) 0%,
    rgba(10, 10, 10, 0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-sm);
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.5rem 1rem;
  background: rgba(244, 140, 66, 0.2);
  border: 1px solid rgba(244, 140, 66, 0.3);
  border-radius: 9999px;
  margin-bottom: var(--spacing-md);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.badge-text {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.hero-description {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto var(--spacing-lg);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-sm);
  max-width: 600px;
  margin: 0 auto;
}

.stat-card {
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.icon-primary {
  color: var(--color-primary);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  position: relative;
}

.scroll-arrow::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
  0% {
    opacity: 0;
    top: 10px;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 30px;
  }
}

/* ============================================
   Services Section
   ============================================ */
.services {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(
    180deg,
    var(--color-bg-dark) 0%,
    var(--color-bg-darker) 100%
  );
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.service-card {
  padding: var(--spacing-md);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(30px);
}

.service-card.animated {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-glow);
  border-color: var(--color-primary);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 140, 66, 0.1);
  border-radius: 50%;
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  background: var(--color-primary);
  transform: rotate(360deg);
}

.service-icon .material-symbols-outlined {
  font-size: 2.5rem;
  color: var(--color-primary);
  transition: color var(--transition-base);
}

.service-card:hover .service-icon .material-symbols-outlined {
  color: var(--color-bg-dark);
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  font-family: var(--font-display);
}

.service-description {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================
   Testimonials Section
   ============================================ */
.testimonials {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg-dark);
  overflow: hidden;
}

.google-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  background: var(--color-surface-light);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.stars {
  display: flex;
  gap: 0.25rem;
}

.star-filled {
  color: #fbbf24;
  font-size: 1.25rem;
  font-variation-settings: "FILL" 1;
}

.rating-text {
  font-size: 0.875rem;
  font-weight: 700;
}

.testimonials-slider {
  margin-top: var(--spacing-lg);
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.testimonials-track {
  display: flex;
  gap: var(--spacing-md);
  animation: scroll 30s linear infinite;
}

.testimonials-track:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.testimonial-card {
  flex: 0 0 auto;
  min-width: 320px;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
}

.testimonial-card:hover {
  transform: scale(1.05);
}

.testimonial-text {
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

.testimonial-author {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ============================================
   Coverage Section
   ============================================ */
.coverage {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(
    180deg,
    var(--color-bg-darker) 0%,
    var(--color-bg-dark) 100%
  );
}

.coverage-map {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.map-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-pin {
  position: relative;
  z-index: 2;
}

.location-pin .material-symbols-outlined {
  font-size: 4rem;
  color: var(--color-primary);
  filter: drop-shadow(0 0 10px var(--color-primary-glow));
}

.ping {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ping-delay {
  animation-delay: 1s;
}

@keyframes ping {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

.area-badge {
  position: absolute;
  padding: 0.375rem 0.75rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coverage-badges {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.location-badge {
  padding: 0.5rem 1rem;
  background: var(--color-surface-light);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
}

.location-badge:hover {
  background: var(--color-primary);
  color: var(--color-bg-dark);
  transform: translateY(-2px);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg-dark);
}

.phone-link {
  font-weight: 800;
  transition: all var(--transition-fast);
}

.phone-link:hover {
  text-shadow: var(--shadow-glow);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-md);
  border-radius: var(--radius-xl);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
  margin-left: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(244, 140, 66, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f48c42' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
  color: var(--color-text-primary);
}

/* Dropdown option styling for visibility */
.form-group select option {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.form-group select option:hover,
.form-group select option:focus,
.form-group select option:checked {
  background-color: var(--color-primary);
  color: #0a0a0a;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
  margin-left: 0.25rem;
  font-style: italic;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 1rem 2rem;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-bg-dark);
  box-shadow: 0 10px 20px -10px rgba(244, 140, 66, 0.5);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(244, 140, 66, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.trust-indicators {
  display: flex;
  justify-content: space-around;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--glass-border);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.8;
}

.trust-item .material-symbols-outlined {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.trust-item span:last-child {
  font-size: 0.625rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: var(--spacing-lg) 0 var(--spacing-md);
  background: linear-gradient(
    180deg,
    var(--color-bg-dark) 0%,
    var(--color-bg-darker) 100%
  );
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
  margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-logo img {
  height: 60px;
  width: auto;
}

.footer-company {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.footer-phone {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  transition: all var(--transition-fast);
}

.footer-phone:hover {
  text-shadow: var(--shadow-glow);
}

.footer-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.area-tag {
  padding: 0.375rem 0.75rem;
  background: var(--color-surface-light);
  border: 1px solid var(--glass-border);
  border-radius: 0.375rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   Floating Action Buttons (Call & Text)
   ============================================ */
.floating-call-btn,
.floating-sms-btn {
  position: fixed;
  bottom: 1.5rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  min-width: 140px;
  height: 56px;
  border-radius: 9999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  text-decoration: none;
}

/* Call Button - Orange (Primary) */
.floating-call-btn {
  right: calc(50% + 10px);
  background: var(--color-primary);
  color: var(--color-bg-dark);
  box-shadow: 0 10px 40px rgba(244, 140, 66, 0.4);
}

.floating-call-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(244, 140, 66, 0.5);
}

/* Text Button - Green */
.floating-sms-btn {
  left: calc(50% + 10px);
  background: #10b981;
  color: white;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
}

.floating-sms-btn:hover {
  background: #059669;
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(16, 185, 129, 0.5);
}

/* Icon styling - same size for both */
.floating-call-btn .material-symbols-outlined,
.floating-sms-btn .material-symbols-outlined {
  font-size: 1.375rem;
}

/* Responsive adjustments for floating buttons */
@media (max-width: 768px) {
  .floating-call-btn,
  .floating-sms-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    bottom: 1rem;
  }
  
  .floating-call-btn {
    right: calc(50% + 5px);
  }
  
  .floating-sms-btn {
    left: calc(50% + 5px);
  }
  
  .floating-call-btn .material-symbols-outlined,
  .floating-sms-btn .material-symbols-outlined {
    font-size: 1.25rem;
  }
  
  /* Hide text on very small screens, show icon only */
  @media (max-width: 480px) {
    .floating-call-btn .btn-text,
    .floating-sms-btn .btn-text {
      display: none;
    }
    
    .floating-call-btn,
    .floating-sms-btn {
      padding: 1rem;
      width: 56px;
      height: 56px;
      justify-content: center;
    }
    
    .floating-call-btn {
      right: calc(50% + 35px);
    }
    
    .floating-sms-btn {
      left: calc(50% + 35px);
    }
  }
}

/* ============================================
   Scroll Animations
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Parallax Effect
   ============================================ */
.parallax-bg img {
  transform: translateY(0);
  transition: transform 0.1s linear;
}

/* ============================================
   UX Enhancements - Phase 1
   ============================================ */

/* Floating SMS Button */
.floating-sms-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
  transition: all var(--transition-base);
  opacity: 0;
  visibility: hidden;
  animation: fadeSlideIn 0.5s ease-out 2s forwards;
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    visibility: visible;
  }
}

.floating-sms-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 50px rgba(16, 185, 129, 0.6);
}

.floating-sms-btn .material-symbols-outlined {
  font-size: 1.75rem;
}

.floating-sms-btn .btn-text {
  display: none;
}

@media (min-width: 768px) {
  .floating-sms-btn {
    width: auto;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    gap: var(--spacing-xs);
  }

  .floating-sms-btn .btn-text {
    display: inline;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

/* Social Proof Widget */
.social-proof-widget {
  position: fixed;
  bottom: 120px;
  left: 1.5rem;
  z-index: 997;
  max-width: 320px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(-120%);
  transition: all var(--transition-base);
}

.social-proof-widget.show {
  opacity: 1;
  transform: translateX(0);
}

.social-proof-content {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.social-proof-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-proof-icon .material-symbols-outlined {
  color: #10b981;
  font-size: 1.25rem;
  font-variation-settings: "FILL" 1;
}

.social-proof-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.social-proof-text strong {
  color: var(--color-primary);
  font-weight: 700;
}

.social-proof-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.social-proof-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .social-proof-widget {
    left: 1rem;
    right: 1rem;
    max-width: none;
    bottom: 140px;
  }
}

/* Exit Intent Popup */
.exit-intent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.exit-intent-overlay.active {
  opacity: 1;
  visibility: visible;
}

.exit-intent-popup {
  position: relative;
  max-width: 500px;
  width: 90%;
  background: var(--color-bg-dark);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.8);
  transition: transform var(--transition-base);
}

.exit-intent-overlay.active .exit-intent-popup {
  transform: scale(1);
}

.exit-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 1;
}

.exit-popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.exit-popup-close .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--color-text-primary);
}

.exit-popup-content {
  text-align: center;
  padding: 1rem;
}

.exit-popup-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-sm);
  background: rgba(244, 140, 66, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(244, 140, 66, 0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(244, 140, 66, 0);
  }
}

.exit-popup-icon .material-symbols-outlined {
  font-size: 3rem;
  color: var(--color-primary);
  font-variation-settings: "FILL" 1;
}

.exit-popup-content h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.exit-popup-content p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.exit-popup-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.exit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exit-btn-call {
  background: var(--color-primary);
  color: var(--color-bg-dark);
}

.exit-btn-call:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(244, 140, 66, 0.4);
}

.exit-btn-text {
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid #10b981;
  color: #10b981;
}

.exit-btn-text:hover {
  background: #10b981;
  color: white;
  transform: translateY(-2px);
}

.exit-popup-subtext {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Enhanced Micro-Animations */
.service-card {
  animation-duration: 0.6s;
  animation-fill-mode: both;
}

.service-card:nth-child(1) {
  animation-delay: 0.1s;
}
.service-card:nth-child(2) {
  animation-delay: 0.2s;
}
.service-card:nth-child(3) {
  animation-delay: 0.3s;
}
.service-card:nth-child(4) {
  animation-delay: 0.4s;
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* Smooth hover transitions for all interactive elements */
.service-card,
.testimonial-card,
.location-badge,
.area-tag,
.nav-link,
.mobile-nav-link {
  will-change: transform;
}

/* Loading animation for form submission */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-primary.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: var(--color-bg-dark);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Responsive adjustments for UX features */
@media (max-width: 768px) {
  .floating-call-btn {
    bottom: 5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .floating-sms-btn {
    bottom: 5rem;
  }

  .exit-popup-actions {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CRITICAL VISIBILITY FIXES - Added 2026-01-23
   Ensures content is ALWAYS visible even if JS fails
   ============================================ */

/* Fallback: Ensure all content is visible by default */
.hero-content > * {
  opacity: 1 !important;
}

/* Make animations progressive enhancement, not requirement */
@media (prefers-reduced-motion: no-preference) {
  .animate-on-scroll:not(.animated) {
    opacity: 0.3;
    transform: translateY(20px);
  }
  
  .animate-on-scroll.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Ensure service cards show even without JS */
.service-card {
  opacity: 1 !important;
}

/* Emergency CSS-only preloader timeout */
@keyframes autoHidePreloader {
  0%, 95% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; display: none; }
}

.preloader {
  animation: autoHidePreloader 2.5s forwards;
}


/* ============================================
   Mobile Responsiveness Fixes
   Critical fixes for form interaction on mobile devices
   ============================================ */

/* Mobile devices (phones) */
@media (max-width: 767px) {
  /* Header fixes - reduce height and add visible background */
  .header {
    padding: 0.5rem 0;
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Reduce logo size to prevent header from being too tall */
  .logo img {
    height: 60px !important;
  }
  
  /* Force hide desktop navigation on mobile */
  .nav {
    display: none !important;
  }
  
  /* Ensure hamburger menu is visible */
  .menu-toggle {
    display: flex !important;
  }
  
  /* Contact form responsive fixes */
  .contact-card {
    width: 95%;
    max-width: 100%;
    margin: 1rem auto;
    padding: 1.5rem;
  }
  
  /* Prevent iOS zoom on input focus */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
  
  /* Form groups spacing */
  .form-group {
    margin-bottom: 1rem;
  }
  
  /* Floating buttons - adjust position to avoid overlap */
  .floating-call-btn,
  .floating-text-btn {
    z-index: 999;
    bottom: 20px;
  }
  
  .floating-text-btn {
    bottom: 90px;
  }
  
  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }
  
  .container {
    padding: 0 1rem;
    max-width: 100%;
  }
  
  /* Hero section adjustments */
  .hero-content {
    padding: 0 1rem;
  }
  
  /* Service cards - single column on mobile */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Stats adjustments */
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Tablet devices (portrait) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Medium logo size for tablets */
  .logo img {
    height: 80px;
  }
  
  /* Header with visible background */
  .header {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Contact form adjustments */
  .contact-card {
    width: 90%;
    max-width: 600px;
  }
  
  /* Service cards - 2 columns on tablet */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small phones (very narrow screens) */
@media (max-width: 374px) {
  .logo img {
    height: 50px !important;
  }
  
  .header {
    padding: 0.25rem 0;
  }
  
  .contact-card {
    width: 98%;
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    padding: 0.25rem 0;
  }
  
  .logo img {
    height: 40px !important;
  }
  
  .hero {
    min-height: auto;
    padding: 6rem 0 3rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Increase tap target sizes for better mobile UX */
  .nav-link,
  .mobile-nav-link,
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Remove hover effects on touch devices */
  .service-card:hover {
    transform: none;
  }
  
  /* Disable custom cursor on touch devices */
  .custom-cursor,
  .custom-cursor-dot {
    display: none !important;
  }
}
