/**
 * AR Edilizia - Service Detail Page V3
 * Ultra-modern detail page with enhanced animations and interactions
 * Version: 3.0 - Complete Enhancement
 */

/* ============================================
   COMPACT HERO - Enhanced V3
   ============================================ */

.service-hero-compact {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 80px 0;
  overflow: hidden;
  min-height: 550px;
  display: flex;
  align-items: center;
}

/* Animated mesh gradient background */
.service-hero-compact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  animation: mesh-move 20s ease-in-out infinite alternate;
}

@keyframes mesh-move {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.1) translate(20px, 20px);
  }
}

/* Floating geometric shapes */
.service-hero-compact::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
  border-radius: 50%;
  top: -200px;
  right: -200px;
  animation: float-shape 15s ease-in-out infinite;
  filter: blur(60px);
}

@keyframes float-shape {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-50px, 50px) rotate(180deg);
  }
}

.service-hero-compact__container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.service-hero-compact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* ============================================
   HERO CONTENT - Enhanced
   ============================================ */

.service-hero-compact__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: slide-in-left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Category Badge - Enhanced */
.service-hero-compact__category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(12px);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 24px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  animation: fade-in-down 0.6s ease 0.2s backwards;
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-hero-compact__category svg {
  width: 16px;
  height: 16px;
}

/* Title - Enhanced with split text effect */
.service-hero-compact__title {
  font-size: 56px;
  font-weight: 900;
  color: white;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fade-in-up 0.8s ease 0.3s backwards;
  position: relative;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Text glow effect */
.service-hero-compact__title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 150px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  border-radius: 2px;
  animation: expand-glow 1.5s ease 0.5s backwards;
}

@keyframes expand-glow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 150px;
    opacity: 1;
  }
}

/* Summary */
.service-hero-compact__summary {
  font-size: 20px;
  line-height: 1.7;
  color: #cbd5e1;
  margin: 0;
  max-width: 600px;
  animation: fade-in-up 0.8s ease 0.4s backwards;
}

/* Price Box - Enhanced */
.service-hero-compact__price-box {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: fit-content;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: scale-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s backwards;
  position: relative;
  overflow: hidden;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Shimmer effect */
.service-hero-compact__price-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer-slide 3s ease infinite;
}

@keyframes shimmer-slide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.service-hero-compact__price-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.service-hero-compact__price-value {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* CTA Buttons - Enhanced */
.service-hero-compact__cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fade-in-up 0.8s ease 0.6s backwards;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn-hero--primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: white;
  box-shadow:
    0 10px 30px -5px rgba(59, 130, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-hero--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-hero--primary:hover::before {
  opacity: 1;
}

.btn-hero--primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 15px 40px -5px rgba(59, 130, 246, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-hero--secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-hero--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

.btn-hero svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

.btn-hero:hover svg {
  transform: translateX(6px);
}

.btn-hero span {
  position: relative;
  z-index: 1;
}

/* ============================================
   HERO VISUAL - Enhanced
   ============================================ */

.service-hero-compact__visual {
  position: relative;
  height: 480px;
  animation: slide-in-right 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.service-hero-compact__image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-hero-compact__image-wrapper:hover {
  transform: scale(1.05) rotateY(5deg);
  box-shadow:
    0 35px 60px -15px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.service-hero-compact__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-hero-compact__image-wrapper:hover .service-hero-compact__image {
  transform: scale(1.1);
}

/* Image overlay gradient */
.service-hero-compact__image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.2) 0%,
    transparent 50%,
    rgba(99, 102, 241, 0.2) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-hero-compact__image-wrapper:hover::after {
  opacity: 1;
}

/* Decorative elements */
.service-hero-compact__visual::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
  border-radius: 50%;
  filter: blur(60px);
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

/* Fallback icon display */
.service-hero-compact__icon-display {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
}

.service-hero-compact__icon-display svg,
.service-hero-compact__icon-display img {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 20px 40px rgba(59, 130, 246, 0.4));
  animation: float-icon 6s ease-in-out infinite;
}

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

/* ============================================
   FEATURES GRID - Enhanced
   ============================================ */

.service-features-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .service-features-section {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

/* Animated grid background */
.service-features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-move 30s linear infinite;
}

@keyframes grid-move {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(40px, 40px);
  }
}

.service-features-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.service-features-header {
  text-align: center;
  margin-bottom: 60px;
}

.service-features-title {
  font-size: 42px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .service-features-title {
  background: linear-gradient(135deg, #f8fafc 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-features-subtitle {
  font-size: 18px;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

[data-theme="dark"] .service-features-subtitle {
  color: #94a3b8;
}

/* Features Grid */
.service-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.service-feature-card {
  position: relative;
  padding: 32px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(30px);
  animation: reveal-feature 0.6s ease forwards;
}

@keyframes reveal-feature {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-feature-card:nth-child(1) { animation-delay: 0.1s; }
.service-feature-card:nth-child(2) { animation-delay: 0.2s; }
.service-feature-card:nth-child(3) { animation-delay: 0.3s; }
.service-feature-card:nth-child(4) { animation-delay: 0.4s; }
.service-feature-card:nth-child(5) { animation-delay: 0.5s; }
.service-feature-card:nth-child(6) { animation-delay: 0.6s; }

[data-theme="dark"] .service-feature-card {
  background: #1e293b;
  border-color: #334155;
}

.service-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #3b82f6, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px -10px rgba(59, 130, 246, 0.2),
    0 0 0 1px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

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

.service-feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-feature-card:hover .service-feature-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 30px -6px rgba(59, 130, 246, 0.6);
}

.service-feature-icon svg,
.service-feature-icon img {
  width: 36px;
  height: 36px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.service-feature-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
}

[data-theme="dark"] .service-feature-title {
  color: #f8fafc;
}

.service-feature-description {
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

[data-theme="dark"] .service-feature-description {
  color: #94a3b8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .service-hero-compact__grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .service-hero-compact__visual {
    height: 400px;
  }

  .service-hero-compact__title {
    font-size: 48px;
  }

  .service-hero-compact__summary {
    font-size: 18px;
  }

  .service-features-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .service-hero-compact {
    padding: 60px 0;
    min-height: auto;
  }

  .service-hero-compact__title {
    font-size: 36px;
  }

  .service-hero-compact__summary {
    font-size: 16px;
  }

  .service-hero-compact__price-value {
    font-size: 36px;
  }

  .service-hero-compact__cta-group {
    flex-direction: column;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
  }

  .service-hero-compact__visual {
    height: 320px;
  }

  .service-features-section {
    padding: 60px 0;
  }

  .service-features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-features-title {
    font-size: 32px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

/* GPU acceleration */
.service-hero-compact__content,
.service-hero-compact__visual,
.service-feature-card {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
