/* Modern service pages and WhatsApp conversion styles */

html.yl-services-modern,
body.yl-services-modern {
  scroll-behavior: smooth;
}

body.yl-services-modern {
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, .16), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(34, 197, 94, .14), transparent 28%),
    linear-gradient(180deg, #fffaf0 0%, #f8fafc 42%, #fff 100%) !important;
}

body.yl-services-modern .page-shell {
  position: relative;
}

body.yl-services-modern .breadcrumb,
body.yl-services-modern .yl-service-breadcrumb {
  border: 1px solid rgba(146, 64, 14, .14);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.yl-services-modern .hero.hero-modern {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, .24) !important;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, .24), transparent 34%),
    radial-gradient(circle at left 18%, rgba(245, 158, 11, .22), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .94) 46%, rgba(120, 53, 15, .9)) !important;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .28) !important;
}

body.yl-services-modern .hero.hero-modern::before {
  content: "";
  position: absolute;
  inset: -90px auto auto -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .18);
  filter: blur(4px);
}

body.yl-services-modern .hero.hero-modern::after {
  content: "طلب خدمة قانونية";
  position: absolute;
  top: 22px;
  left: 22px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #fef3c7;
  font-weight: 1000;
  font-size: .82rem;
  letter-spacing: 0;
}

body.yl-services-modern .hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

body.yl-services-modern .hero-badge {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  color: #78350f !important;
  border: 1px solid rgba(245, 158, 11, .35) !important;
  box-shadow: 0 12px 28px rgba(245, 158, 11, .18);
}

body.yl-services-modern .hero h1 {
  color: #fff !important;
  text-shadow: 0 10px 28px rgba(0, 0, 0, .25);
}

body.yl-services-modern .hero p {
  color: #f8fafc !important;
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  line-height: 2.05;
}

body.yl-services-modern .hero-motto {
  color: #fef3c7 !important;
  background: rgba(255, 255, 255, .10) !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

.yl-service-hero-actions,
body.yl-services-modern .hero .seo-internal-links-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px !important;
  justify-content: center;
  margin-top: 18px !important;
}

body.service-page .seo-internal-link,
body.yl-services-modern .seo-internal-link {
  border-radius: 20px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

body.service-page .seo-internal-link:hover,
body.yl-services-modern .seo-internal-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .18);
}

.service-whatsapp-button {
  position: relative;
  isolation: isolate;
  min-height: 58px;
  padding: 14px 22px !important;
  border: 1px solid rgba(34, 197, 94, .62) !important;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 46%, #bbf7d0 100%) !important;
  color: #052e16 !important;
  box-shadow: 0 16px 38px rgba(22, 163, 74, .38), inset 0 1px 0 rgba(255, 255, 255, .62) !important;
  overflow: hidden;
  text-decoration: none !important;
}

.service-whatsapp-button::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -55%;
  width: 44%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .58), transparent);
  animation: serviceCtaShine 3.2s ease-in-out infinite;
  z-index: -1;
}

.service-whatsapp-button::after {
  content: "اطلب الآن";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #14532d;
  font-size: .76rem;
  font-weight: 1000;
}

.service-whatsapp-button i {
  font-size: 1.15rem;
}

body.yl-services-modern .yl-service-secondary-link {
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .26) !important;
  color: #fff !important;
}

.yl-service-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -8px auto 22px;
}

.yl-service-trust-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, .22);
  background: rgba(255, 255, 255, .88);
  color: #78350f;
  font-weight: 900;
  line-height: 1.8;
  text-align: center;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

body.yl-services-modern .section-card {
  border: 1px solid rgba(146, 64, 14, .12) !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .09) !important;
}

body.yl-services-modern .section-head h2 {
  position: relative;
  display: inline-block;
}

body.yl-services-modern .section-head h2::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #22c55e);
}

body.yl-services-modern .case-card,
body.yl-services-modern .service-related-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(146, 64, 14, .14) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 251, 235, .82)) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .09) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.yl-services-modern .case-card::before,
body.yl-services-modern .service-related-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, #f59e0b, #22c55e, #0ea5e9);
}

body.yl-services-modern .case-card:hover,
body.yl-services-modern .service-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 58px rgba(15, 23, 42, .14) !important;
  border-color: rgba(245, 158, 11, .34) !important;
}

body.yl-services-modern .case-card h2,
body.yl-services-modern .service-related-card h2 {
  color: #0f172a !important;
}

body.yl-services-modern .case-card p,
body.yl-services-modern .service-related-card p {
  color: #475569 !important;
  line-height: 2;
}

.yl-service-card-badge,
body.yl-services-modern .case-card-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 1000;
  font-size: .78rem;
}

.yl-service-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.yl-service-card-actions .seo-internal-link {
  min-height: 52px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.yl-service-open-link {
  background: linear-gradient(135deg, #0f172a, #334155) !important;
  color: #fff !important;
  border-color: rgba(15, 23, 42, .22) !important;
}

.service-ad-banner {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: clamp(20px, 4vw, 34px);
  border-radius: 30px;
  border: 1px solid rgba(34, 197, 94, .32);
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, .28), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(20, 83, 45, .84)) !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, .26);
}

.service-ad-banner h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.22rem, 3vw, 1.8rem);
  line-height: 1.8;
}

.service-ad-banner p {
  margin: 0;
  color: #dcfce7;
  line-height: 2;
  font-weight: 800;
}

.service-ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.service-ad-actions .service-whatsapp-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.service-ad-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fef9c3;
  font-weight: 900;
  line-height: 1.9;
}

.yl-service-sticky-whatsapp {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2147482000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(135deg, #16a34a, #22c55e, #bbf7d0);
  color: #052e16;
  text-decoration: none;
  font-weight: 1000;
  box-shadow: 0 18px 44px rgba(22, 163, 74, .42), 0 0 0 6px rgba(34, 197, 94, .12);
  animation: ylServicePulse 2.4s ease-in-out infinite;
}

.yl-service-sticky-whatsapp i {
  font-size: 1.2rem;
}

@keyframes serviceCtaShine {
  0% { left: -55%; opacity: 0; }
  18% { opacity: .8; }
  42% { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
}

@keyframes ylServicePulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 18px 44px rgba(22, 163, 74, .42), 0 0 0 6px rgba(34, 197, 94, .12); }
  50% { transform: translateY(-3px); box-shadow: 0 22px 54px rgba(22, 163, 74, .52), 0 0 0 10px rgba(34, 197, 94, .08); }
}

@media (max-width: 900px) {
  .yl-service-trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body.yl-services-modern .hero.hero-modern::after {
    position: relative;
    top: auto;
    left: auto;
    display: inline-flex;
    margin-top: 12px;
  }

  .service-ad-banner { padding: 18px; }

  .service-ad-actions .service-whatsapp-button,
  body.service-page .hero-content .service-whatsapp-button,
  body.yl-services-modern .hero-content .service-whatsapp-button {
    width: 100%;
  }

  .yl-service-hero-actions,
  body.yl-services-modern .hero .seo-internal-links-grid,
  .yl-service-card-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .yl-service-trust-strip {
    grid-template-columns: 1fr;
  }

  .yl-service-sticky-whatsapp {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    min-height: 56px;
  }

  body.yl-services-modern .site-footer {
    padding-bottom: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-whatsapp-button::before,
  .yl-service-sticky-whatsapp {
    animation: none;
  }

  body.yl-services-modern .case-card,
  body.yl-services-modern .service-related-card,
  body.yl-services-modern .seo-internal-link {
    transition: none;
  }
}
