/* =========================================
   GARAGE DOOR PROS — Premium CSS
   ========================================= */

/* ---- Custom Properties ---- */
:root {
  --color-primary: #171A20;
  --color-primary-light: #1E2229;
  --color-accent: #3E6AE1;
  --color-accent-hover: #2E5BD6;
  --color-luxury: #D4AF37;
  --color-surface: #F4F4F4;
  --color-text: #393C41;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(135deg, #f0f0f0, #e2e2e2);
}

/* ---- Base Resets ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---- Glassmorphism Utilities ---- */
.bg-luxury-glass {
  background:var(--color-luxury);
  
}
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Premium Card ---- */
.premium-card {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  transition: all 0.35s var(--ease-out-expo);
}

.premium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border-color: rgba(220, 38, 38, 0.2);
}

/* ═══════════════════════════════════════════
   PREMIUM SERVICE CARDS
   ═══════════════════════════════════════════ */

/* Running shimmer keyframe */
@keyframes card-shimmer {
  0%   { background-position: -300% center; }
  100% { background-position: 300% center; }
}

/* Pulsing glow keyframe */
@keyframes card-glow {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* Gold bottom line grow */
@keyframes line-grow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

.service-card-premium {
  position: relative;
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-expo),
              box-shadow 0.4s var(--ease-out-expo),
              border-color 0.3s ease;
  text-decoration: none;
  display: block;
  color: inherit;
  cursor: pointer;
}

/* Continuous running shimmer on top edge */
.service-card-premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-luxury) 25%,
    var(--color-accent) 50%,
    var(--color-luxury) 75%,
    transparent 100%
  );
  background-size: 300% 100%;
  animation: card-shimmer 3s linear infinite;
  opacity: 0.7;
}

/* Gold bottom accent line */
.service-card-premium::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-luxury), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}

.service-card-premium:hover::after {
  transform: scaleX(1);
}

.service-card-premium:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 60px rgba(26, 4, 4, 0.12),
    0 0 0 1px rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.3);
}

.service-card-premium:hover::before {
  opacity: 1;
}

/* Faded number */
.card-number {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.15;
  transition: opacity 0.4s ease, color 0.4s ease;
  user-select: none;
  letter-spacing: -0.02em;
}

.service-card-premium:hover .card-number {
  opacity: 0.18;
  color: var(--color-accent);
}

/* Icon badge */
.card-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease-out-expo);
}

.service-card-premium:hover .card-icon-badge {
  transform: scale(1.1) rotate(-5deg);
}

/* Service name */
.card-service-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-primary);
  line-height: 1.3;
  transition: color 0.3s ease;
}

.service-card-premium:hover .card-service-name {
  color: var(--color-accent);
}

/* Bottom tag */
.card-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-luxury);
  transition: color 0.3s ease;
}

/* Arrow icon */
.card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out-expo);
  color: #94a3b8;
}

.service-card-premium:hover .card-arrow {
  border-color: var(--color-luxury);
  background: var(--color-luxury);
  color: var(--color-primary);
  transform: translate(2px, -2px);
}

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

.gradient-text-white {
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Hero Animations ---- */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes slideInLeft {
  0% { opacity: 0; transform: translateX(-30px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -250px 0; }
  100% { background-position: 250px 0; }
}

@keyframes shimmer-sweep {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.animate-fade-up {
  animation: fadeUp 0.7s var(--ease-out-expo) both;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease both;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* ---- Reveal Animations (Intersection Observer) ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ---- Button Styles ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--color-accent);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 1rem;
  transition: all 0.25s var(--ease-out-expo);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.45);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: white;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 1rem;
  transition: all 0.25s var(--ease-out-expo);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

/* ---- Service Cards ---- */
.service-card {
  position: relative;
  background: white;
  border-radius: 1.25rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.35s var(--ease-out-expo);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-luxury));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ---- Counter Number Animation ---- */
.counter-wrapper {
  transition: all 0.3s ease;
}

/* ---- Hero Video ---- */
.hero-video-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Stats Section ---- */
.stat-divider {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- Swiper Customization (reviews) ---- */
.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.4) !important;
  opacity: 1 !important;
  width: 8px !important;
  height: 8px !important;
  transition: all 0.3s !important;
}

.swiper-pagination-bullet-active {
  background: var(--color-accent) !important;
  width: 24px !important;
  border-radius: 4px !important;
}

/* Hero Swiper custom pagination dots */
.hero-pagination .swiper-pagination-bullet {
  background: rgba(255,255,255,0.5) !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  transition: all 0.3s !important;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: #fff !important;
  width: 24px !important;
  border-radius: 4px !important;
}

/* Hero nav buttons */
.hero-prev, .hero-next {
  cursor: pointer;
}
.hero-prev:focus, .hero-next:focus {
  outline: none;
}

/* ---- Reviews Swiper ---- */
.reviews-swiper .swiper-wrapper {
  align-items: stretch;
}

.reviews-swiper .swiper-slide {
  height: auto;
}

/* ---- Line Clamp ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Nav Link Active State ---- */
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Emergency Banner Animation ---- */
@keyframes emergency-shimmer {
  0% { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}

/* ---- Focus Styles (Accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---- Prose Customization ---- */
.prose {
  color: #374151;
  max-width: 75ch;
}

.prose h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.prose h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.prose p { line-height: 1.8; margin-bottom: 1.25rem; }
.prose a { color: var(--color-accent); text-decoration: none; font-weight: 500; }
.prose a:hover { text-decoration: underline; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: 0.5rem; line-height: 1.7; }
.prose strong { color: var(--color-primary); font-weight: 700; }

/* ---- Safe Area for Mobile ---- */
.safe-area-pb {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---- Before-After Slider ---- */
.before-after-slider {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

/* ---- Section Divider ---- */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-luxury));
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}

/* ---- Loading Spinner ---- */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

/* ---- Mobile Menu Transition ---- */
.mobile-menu-enter {
  animation: slideDown 0.3s var(--ease-out-expo);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Custom Checkbox Styles ---- */
input[type="checkbox"] {
  accent-color: var(--color-accent);
}

/* ---- Form Focus Glow ---- */
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ---- Masonry Gallery ---- */
.masonry-grid {
  columns: 2;
  column-gap: 1rem;
}

@media (min-width: 640px) { .masonry-grid { columns: 3; } }
@media (min-width: 1024px) { .masonry-grid { columns: 4; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 1rem;
  overflow: hidden;
}

/* ---- Responsive Typography ---- */
@media (max-width: 640px) {
  .hero-headline { font-size: 2.25rem; }
}

/* ---- Print Styles ---- */
@media print {
  header, footer, .floating-buttons, .mobile-sticky-cta { display: none; }
}

/* ---- High Contrast Support ---- */
@media (prefers-contrast: high) {
  .glass { background: rgba(0, 0, 0, 0.9); }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
