/* Service Detail Page Styles */

/* Service Hero */
.service-hero {
  position: relative;
  background: linear-gradient(140deg, var(--primary-color) 0%, #1d4ed8 40%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 6rem 0;
  overflow: hidden;
}

.service-hero::before {
  /* subtle pattern */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08) 0 12%, transparent 13%) 0 0 / 60px 60px,
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.06) 0 10%, transparent 11%) 0 0 / 80px 80px;
  pointer-events: none;
}

.service-hero .hero-content h1 {
  color: var(--white);
}

.service-hero .hero-subtitle {
  color: rgba(255,255,255,0.9);
}

.service-hero .hero-buttons .btn {
  box-shadow: var(--shadow);
}

.service-hero .hero-image {
  position: relative;
}

.service-hero .hero-image img {
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.25));
}

/* Floating icons */
.floating-icon {
  position: absolute;
  color: rgba(255,255,255,0.8);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
}

.icon-1 { top: 15%; right: 8%; font-size: 52px; animation: float1 6s ease-in-out infinite; }
.icon-2 { bottom: 25%; right: 12%; font-size: 48px; animation: float2 7s ease-in-out infinite; }
.icon-3 { top: 68%; left: 8%; font-size: 50px; animation: float3 8s ease-in-out infinite; }

@keyframes float1 { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-15px) rotate(8deg) scale(1.1); } 100% { transform: translateY(0) scale(1); } }
@keyframes float2 { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(18px) rotate(-8deg) scale(1.1); } 100% { transform: translateY(0) scale(1); } }
@keyframes float3 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(12px,-12px) rotate(5deg) scale(1.1); } 100% { transform: translate(0,0) scale(1); } }

/* Features */
.service-features {
  padding: var(--section-padding) 0;
  background: var(--bg-color);
}

.service-features .features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.feature-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(59,130,246,0) 60%);
  transform: rotate(25deg);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-color), #60a5fa);
  box-shadow: 0 10px 20px rgba(59,130,246,0.25);
}

.feature-card h3 { font-size: 1.05rem; line-height: 1.35; margin: 0.25rem 0 0 0; color: var(--text-color); }

/* Mini Why section spacing refinement on this page */
.mini-why { padding-top: 2rem; }
.mini-why .why-grid { margin-top: 1.25rem; }

/* CTA */
.service-cta {
  position: relative;
  padding: 4rem 0;
  background: linear-gradient(120deg, rgba(59,130,246,0.08), rgba(29,78,216,0.08));
}

.service-cta .cta-inner {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem 2rem 2.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-cta .cta-inner::before {
  content: "";
  position: absolute;
  left: -60px;
  top: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(245,158,11,0.25) 0%, rgba(245,158,11,0) 60%);
}

.service-cta .cta-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent-color), #fbbf24);
  box-shadow: 0 12px 20px rgba(245,158,11,0.25);
  transform: translateY(-24px);
}

.service-cta h3 { margin-top: -0.5rem; }
.service-cta p { margin: 0.5rem 0 1.25rem; color: var(--gray-600); }
.service-cta .cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* RTL tweaks */
[dir="rtl"] .icon-1 { left: 8%; right: auto; }
[dir="rtl"] .icon-2 { left: 12%; right: auto; }
[dir="rtl"] .icon-3 { right: 8%; left: auto; top: 68%; }

/* Responsive */
@media (max-width: 992px) {
  .service-hero { padding: 4.5rem 0; }
}

@media (max-width: 768px) {
  .icon-1 { font-size: 42px; top: 12%; right: 5%; }
  .icon-2 { font-size: 38px; bottom: 15%; right: 8%; }
  .icon-3 { font-size: 40px; top: 70%; left: 6%; }
  
  /* Réorganiser les icônes pour éviter le chevauchement avec le texte */
  [dir="rtl"] .icon-3 { right: 6%; left: auto; top: 70%; }
}

/* Service hero mobile refinements */
@media (max-width: 768px) {
  /* Keep content readable and reduce vertical bulk */
  .service-hero { padding: 4rem 0 3rem; }
  .service-hero .hero-grid { gap: 1.25rem; }
  .service-hero .hero-content { max-width: 720px; margin: 0 auto; }
  .service-hero .hero-subtitle { margin-bottom: 1.25rem; }

  /* Scale image reasonably on tablets/phones */
  .service-hero .hero-image { margin-top: 0.5rem; }
  .service-hero .hero-image img { width: 100%; max-width: 480px; height: auto; }

  /* Ensure floating icons sit under the content */
  .service-hero .service-hero-icons { z-index: 1; }
}

/* Extra-small screens */
@media (max-width: 640px) {
  .service-hero { padding: 3.25rem 0 2.75rem; }
  .service-hero .hero-grid { gap: 1rem; }
  .service-hero .hero-content h1 { letter-spacing: 0.1px; }
  .service-hero .hero-subtitle { font-size: 0.95rem; line-height: 1.6; }
  .service-hero .hero-image img { max-width: 420px; }

  /* Keep icons visible while adjusting size for small screens */
  .service-hero .service-hero-icons { opacity: 0.85; }
  .service-hero .icon-1 { font-size: 36px; top: 8%; right: 3%; }
  .service-hero .icon-2 { font-size: 34px; bottom: 8%; right: 5%; }
  .service-hero .icon-3 { font-size: 34px; top: 75%; left: 4%; }
  
  [dir="rtl"] .icon-1 { left: 3%; right: auto; }
  [dir="rtl"] .icon-2 { left: 5%; right: auto; }
  [dir="rtl"] .icon-3 { right: 4%; left: auto; top: 75%; }
}

/* Handsets */
@media (max-width: 480px) {
  .service-hero { padding: 2.75rem 0 2.25rem; }
  .service-hero .hero-content { padding: 0 0.25rem; }
  .service-hero .hero-buttons .btn { width: 100%; max-width: 320px; }
  .service-hero .hero-image img { max-width: 360px; margin-top: 0.25rem; }
  .service-hero .service-hero-icons { opacity: 0.75; }
  
  /* Repositionnement des icônes pour éviter tout chevauchement avec le texte */
  .service-hero .icon-1 { top: 5%; right: 5%; }
  .service-hero .icon-2 { bottom: 5%; right: 5%; }
  
  /* Masquer l'icône gauche qui peut chevaucher le texte sur les petits écrans */
  .service-hero .icon-3 { display: none; }
  [dir="rtl"] .service-hero .icon-3 { display: none; }
}

/* Section kicker (hero pretitle) */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.kicker-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-color), #60a5fa);
  box-shadow: 0 10px 20px rgba(59,130,246,0.25);
}

/* Improve contrast in hero */
.service-hero .section-kicker { color: rgba(255,255,255,0.95); }

/* Floating icons container matching HTML */
.service-hero .service-hero-icons { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.service-hero .service-hero-icons i { position: absolute; color: rgba(255,255,255,1); filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4)); font-size: 2.5rem; }
/* Ensure content stays above decorative icons */
.service-hero .hero-grid,
.service-hero .hero-content,
.service-hero .hero-image { position: relative; z-index: 2; }

/* Feature list (remove bullets + responsive grid) */
.service-features .feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.service-features .feature-list li { list-style: none; }
.service-features .feature-list li::marker { content: ''; }

.service-features .feature-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem;
  min-height: 96px;
}

.service-features .feature-text { color: var(--text-color); font-weight: 500; }

/* Web Solutions Revolutionary Section */
.web-solutions {
  padding: var(--section-padding) 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.web-solutions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59,130,246,0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(245,158,11,0.06) 0%, transparent 60%),
    radial-gradient(circle at 40% 80%, rgba(16,185,129,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.web-solutions .solutions-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.web-solutions .header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--secondary-color), #60a5fa);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 25px rgba(59,130,246,0.25);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.web-solutions .section-title {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.web-solutions .section-subtitle {
  font-size: 1.3rem;
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Timeline Layout */
.web-solutions .solutions-timeline {
  position: relative;
  z-index: 1;
}

.web-solutions .timeline-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -200;
  pointer-events: none;
}

.web-solutions .timeline-connector {
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.web-solutions .timeline-item {
  position: relative;
  margin-bottom: 4rem;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  z-index: 50;
}

.web-solutions .timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.web-solutions .timeline-item:nth-child(even) .timeline-number {
  transform: translateX(50%);
}

.web-solutions .timeline-item:nth-child(odd) .timeline-number {
  transform: translateX(-50%);
}

.web-solutions .timeline-number {
  position: relative;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--secondary-color), #60a5fa);
  color: var(--white);
  border-radius: 50%;
  z-index: 55;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 
    0 10px 30px rgba(59,130,246,0.3),
    0 4px 12px rgba(59,130,246,0.2);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.web-solutions .timeline-number::before {
  content: "";
  position: absolute;
  width: 120%;
  height: 120%;
  border: 3px solid rgba(59,130,246,0.2);
  border-radius: 50%;
  animation: ripple 3s infinite;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.web-solutions .timeline-item:hover .timeline-number {
  transform: scale(1.1) translateX(-50%);
  box-shadow: 
    0 15px 40px rgba(59,130,246,0.4),
    0 6px 18px rgba(59,130,246,0.3);
}

.web-solutions .timeline-item:nth-child(even):hover .timeline-number {
  transform: scale(1.1) translateX(50%);
}

.web-solutions .timeline-item .solution-card {
  flex: 1;
  max-width: 500px;
  position: relative;
  z-index: 60;
}

.web-solutions .solution-card {
  background: var(--white);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 
    0 10px 40px rgba(0,0,0,0.08),
    0 4px 12px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.8);
}

.web-solutions .solution-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.web-solutions .solution-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 25px 60px rgba(0,0,0,0.15),
    0 10px 30px rgba(0,0,0,0.1);
}

.web-solutions .solution-card:hover::before {
  transform: scaleX(1);
}

.web-solutions .solution-card.featured {
  background: linear-gradient(135deg, rgba(59,130,246,0.03), rgba(255,255,255,0.98));
  border: 2px solid rgba(59,130,246,0.2);
}

.web-solutions .solution-card.premium {
  
  border: 2px solid rgba(245,158,11,0.2);
}

.web-solutions .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.web-solutions .solution-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--secondary-color), #60a5fa);
  color: var(--white);
  font-size: 1.8rem;
  box-shadow: 
    0 10px 30px rgba(59,130,246,0.3),
    0 4px 12px rgba(59,130,246,0.2);
  transition: all var(--transition-fast);
}

.web-solutions .solution-card:hover .solution-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 15px 40px rgba(59,130,246,0.4),
    0 6px 18px rgba(59,130,246,0.3);
}

.web-solutions .solution-badge {
  background: linear-gradient(135deg, var(--accent-color), #fbbf24);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

.web-solutions .solution-badge.premium {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

.web-solutions .solution-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.web-solutions .solution-card p {
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.web-solutions .solution-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.web-solutions .feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59,130,246,0.1);
  color: var(--secondary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(59,130,246,0.2);
  transition: all var(--transition-fast);
}

.web-solutions .feature-tag:hover {
  background: rgba(59,130,246,0.15);
  transform: translateY(-1px);
}

.web-solutions .solutions-cta {
  margin-top: 4rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
  padding: 3rem 2rem;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59,130,246,0.1);
}

.web-solutions .solutions-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.web-solutions .cta-content {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

.web-solutions .cta-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.web-solutions .cta-content p {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.web-solutions .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.web-solutions .cta-buttons .btn-outline {
  background: rgba(255,255,255,0.9);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(59,130,246,0.2);
}

.web-solutions .cta-buttons .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.web-solutions .cta-buttons .btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.5);
}

.web-solutions .cta-buttons .btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.4);
}

.web-solutions .btn.pulse {
  animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(59,130,246,0.3); }
  50% { box-shadow: 0 8px 25px rgba(59,130,246,0.5); }
}

/* RTL tweaks for details */
[dir="rtl"] .service-details .chevron { margin-left: 0; margin-right: auto; }
[dir="rtl"] .service-details .detail-card summary { direction: rtl; }
[dir="rtl"] .service-details .detail-content { direction: rtl; }

/* Responsive for Web Solutions Timeline */
@media (max-width: 992px) {
  .web-solutions .timeline-item {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  
  .web-solutions .timeline-item:nth-child(even),
  .web-solutions .timeline-item:nth-child(odd) {
    flex-direction: column;
  }
  
  .web-solutions .timeline-number {
    transform: none !important;
    position: relative;
  }
  
  .web-solutions .timeline-item:hover .timeline-number,
  .web-solutions .timeline-item:nth-child(even):hover .timeline-number {
    transform: scale(1.1) !important;
  }
  
  .web-solutions .timeline-path {
    display: none;
  }
  
  .web-solutions .section-title {
    font-size: 2.5rem;
  }
  
  .web-solutions .solutions-header {
    margin-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .web-solutions {
    padding: 3rem 0;
  }
  
  .web-solutions .section-title {
    font-size: 2rem;
  }
  
  .web-solutions .section-subtitle {
    font-size: 1.1rem;
  }
  
  .web-solutions .timeline-item {
    margin-bottom: 2.5rem;
  }
  
  .web-solutions .timeline-number {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }
  
  .web-solutions .solution-card {
    padding: 1.5rem;
  }
  
  .web-solutions .solution-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  
  .web-solutions .solutions-cta {
    padding: 2rem 1.5rem;
    margin-top: 3rem;
  }
  
  .web-solutions .cta-content h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .web-solutions .timeline-item .solution-card {
    max-width: 100%;
  }
  
  .web-solutions .section-title {
    font-size: 1.8rem;
  }
  
  .web-solutions .timeline-number {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
  
  .web-solutions .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .web-solutions .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Features CTA row */
.features-cta { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* CTA section mapping to current markup */
.service-cta .service-cta-section {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem 2rem 2.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.service-cta .service-cta-section::before {
  content: "";
  position: absolute;
  left: -60px;
  top: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(245,158,11,0.25) 0%, rgba(245,158,11,0) 60%);
}
.service-cta .service-cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* RTL tweak for kicker */
[dir="rtl"] .section-kicker { direction: rtl; }