/* =================================================
   Electronic Service – Detail Page (CLEAN FINAL)
   Theme: moit_theme_v2
   File: css/services/service-node.css
   ================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --primary: #0f4c75;
  --secondary: #1b6ca8;
  --accent: #cfa43b;

  --bg-page: #f4f6f8;
  --bg-card: #ffffff;
  --bg-soft: #f9fafb;

  --border: #e1e6eb;

  --text-main: #1f2933;
  --text-muted: #6b7280;
}

/* ---------- Base ---------- */
.node--type-electronic-service {
  background: var(--bg-page);
  direction: rtl;
  font-family: "Cairo", Tahoma, sans-serif;
  color: var(--text-main);
}

.node--type-electronic-service .service-node {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 18px 0;
}

.node--type-electronic-service article {
  line-height: 1.75;
}

/* ---------- Hero ---------- */
.service-hero{
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color:#fff;
  text-align:center;
  border-radius: 18px;
  padding: 2.4rem 1.6rem 2.2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(207,164,59,0.35);
}


.service-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle at top right,
    rgba(207,164,59,0.35),
    rgba(207,164,59,0.15) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.service-hero::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  background: linear-gradient(to right, var(--accent), transparent);
  margin: 1.1rem auto 0;
}

.service-hero__container {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

.service-hero__container::before {
  content: "";
  position: absolute;
  right: 0;
  top: 12px;
  width: 3px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0.55;
}

.service-hero__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 10px 0 8px;
}

.service-hero__summary {
  font-size: 0.92rem;
  line-height: 1.75;
  max-width: 760px;
  margin: 0.5rem auto 0;
  opacity: 0.95;
}

/* Force hero readable */
.service-hero,
.service-hero * {
  color: #ffffff;
}

/* ---------- Manual Breadcrumb ---------- */
.service-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  margin-bottom: 14px;

  border: 1px solid rgba(255,255,255,.15);
  border-radius: 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);

  font-size: 13px;
  color: rgba(255,255,255,.9);
}

.service-breadcrumb a,
.service-breadcrumb .current {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.service-breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.service-breadcrumb .sep {
  opacity: 0.5;
  font-size: 0.7rem;
  margin: 0 0.15rem;
}

.service-breadcrumb .current {
  color: #ffffff;
  font-weight: 600;
}

/* ---------- Badges ---------- */
.service-badges {
  margin-top: 0.75rem;
}

.service-badges .field__item {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  padding: 0.25rem 0.7rem;
  border-radius: 14px;
  font-size: 0.75rem;
  margin: 0 0.15rem;
  font-weight: 600;
}

.service-badges .field__item:last-child {
  background: var(--accent);
  color: #2c1f05;
}

/* ---------- Primary Action ---------- */
.service-hero__actions {
  margin-top: 1.1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: var(--accent);
  color: #2c1f05;
  padding: 0.58rem 1.55rem;
  border-radius: 22px;

  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;

  box-shadow: 0 3px 10px rgba(207,164,59,0.35);
  transition: transform .15s ease, background-color .2s ease;
}

.btn-primary::before {
  content: "▶";
  font-size: 0.7rem;
  position: relative;
  top: -1px;
}

.btn-primary:hover {
  background: #ddb24b;
  transform: translateY(-1px);
}

/* Hide default service link field (if printed elsewhere) */
.service-node .field--name-field-service-link {
  display: none;
}

/* ---------- Two Column Layout ---------- */
.service-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;

  background: var(--bg-card);
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  padding: 18px;
}

.service-layout__main { min-width: 0; }
.service-layout__side { position: relative; }

@media (max-width: 992px) {
  .service-layout { grid-template-columns: 1fr; }
  .service-layout__side { order: -1; }
}

/* ===============================
   Sticky Side Column (No Empty Space)
   =============================== */

.service-layout__side{
  position: sticky;
  top: 110px;
  align-self: start;
  height: calc(100vh - 130px);
}

.service-side-inner{
  height: 100%;
  overflow: auto;
  padding-left: 6px; /* مساحة بسيطة لعدم قص الظل */
}

/* تحسين شريط التمرير داخل العمود (اختياري وهادئ) */
.service-side-inner::-webkit-scrollbar{
  width: 8px;
}
.service-side-inner::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
}
.service-side-inner::-webkit-scrollbar-track{
  background: transparent;
}

/* موبايل: نرجع الوضع طبيعي */
@media (max-width: 992px){
  .service-layout__side{
    position: static;
    height: auto;
  }
  .service-side-inner{
    overflow: visible;
    padding-left: 0;
  }
}


/* ---------- Sticky Side Column ---------- */
.service-side-inner {
  position: static;
}


/* ---------- Side Info Card ---------- */
.service-info-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-right: 4px solid var(--accent);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
}

.service-info-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.1rem;

  border-right: 4px solid var(--accent);
  background: linear-gradient(to left, transparent, rgba(207,164,59,0.15));
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.service-info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;

  padding: 0.6rem 0;
  border-bottom: 1px dashed #e6ebf0;
}

.service-info-item:last-child { border-bottom: none; }

.service-info-item .label {
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--primary);
  white-space: nowrap;
}

.service-info-item .value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  line-height: 1.6;
}

/* ---------- Guide Button (Side) ---------- */
.service-guide-side { margin-top: 12px; }

.service-guide-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  width:100%;
  padding: 12px 14px;

  border-radius: 14px;
  border: 1.5px solid var(--accent);

  background: #fff;
  color: #0b3c5d;

  font-weight: 900;
  text-decoration:none;

  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.service-guide-btn:hover{
  background: #104f7a;
  color:#fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.service-guide-btn .icon{ font-weight: 900; }

/* ---------- Sections (Main) ---------- */
.service-section { margin-bottom: 1.75rem; }

.service-section__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;

  position: relative;
  padding-right: 0.6rem;
  padding-bottom: 0.35rem;

  border-right: 3px solid var(--accent);
}

.service-section__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.service-section:hover .service-section__title::after { width: 100px; }

.service-section__content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-main);
}

/* ---------- Requirements list ---------- */
.service-section__content ul { list-style: none; padding: 0; margin: 0; }

.service-section__content li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;

  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;

  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;

  font-size: 0.9rem;
}

.service-section__content li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 900;
  margin-top: 0.1rem;
}

/* ---------- Steps (numbered) ---------- */
.service-steps__list { counter-reset: service-step; }

.service-steps__list .field__item { position: relative; }

.service-steps__list .field__item p {
  position: relative;
  counter-increment: service-step;

  display: flex;
  align-items: center;

  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;

  padding: 0.65rem 1rem;
  margin-bottom: 0.45rem;

  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);

  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.service-steps__list .field__item p::before {
  content: counter(service-step);
  flex-shrink: 0;

  width: 28px;
  height: 28px;
  margin-left: 0.75rem;

  background: var(--accent);
  color: #fff;

  font-size: 0.8rem;
  font-weight: 900;

  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-steps__list .field__item p:hover {
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Connector line between steps */
.service-steps__list .field__item::after {
  content: "";
  position: absolute;
  right: 32px;
  top: 100%;
  width: 2px;
  height: 14px;
  background: rgba(207,164,59,0.4);
}
.service-steps__list .field__item:last-child::after { display: none; }

/* ---------- Sub Services ---------- */
.service-subservices-grid .field__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.service-subservices-grid .field__item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;

  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.25s ease;
}

.service-subservices-grid .node__title,
.service-subservices-grid h2,
.service-subservices-grid h3 {
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0;
}

.service-subservices-grid .field__item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* ---------- FAQ (Side) ---------- */
.service-faq-side {
  margin-top: 1.2rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
}

.service-faq-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-right: 0.6rem;
  border-right: 4px solid var(--accent);
}

.service-faq-side .field--name-field-service-faq .field__item {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-main);

  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px dashed #e6ebf0;
}

.service-faq-side .field--name-field-service-faq .field__item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-faq-side .field--name-field-service-faq .field__item p:first-child {
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.service-faq-side .field--name-field-service-faq .field__item::before {
  content: "؟";
  font-weight: 900;
  color: var(--accent);
  margin-left: 0.4rem;
}

/* ---------- Share Bar ---------- */
.service-share-bar {
  width: 100%;
  background: #f4f6f8;
  border-top: 1px solid var(--border);
  margin-top: 1.8rem;
  border-radius: 14px;
}

.service-share-bar__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.service-share__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.service-share a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0f4c75;
  color: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;

  transition: background 0.2s ease, transform .15s ease;
}

.service-share a:hover {
  background: var(--accent);
  color: #0f4c75;
  transform: translateY(-1px);
}

.service-share__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {

  .node--type-electronic-service .service-node { padding: 14px 12px 0; }

  .service-hero { padding: 1.6rem 1rem 1.3rem; }
  .service-hero__title { font-size: 1.2rem; }

  .service-layout { padding: 14px; gap: 1.1rem; }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .service-steps__list .field__item p {
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
  }

  .service-steps__list .field__item p::before {
    width: 22px;
    height: 22px;
    margin-left: 0.6rem;
  }

  .service-steps__list .field__item p:hover {
    transform: none;
    box-shadow: none;
  }

  .service-share-bar__container {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}



/* ==================================================
   FIX 2: CTA icon RTL + remove gold line under button on mobile
   (Append at end of service-node CSS)
   ================================================== */

/* 2A) صحّح مكان الأيقونة للعربية */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ألغِ الأيقونة القديمة (إن وُجدت) */
.btn-primary::before {
  content: none !important;
}

/* ضع الأيقونة بعد النص (في RTL تظهر يسار النص بشكل صحيح) */
.btn-primary::after {
  content: "◀";
  font-size: 0.8rem;
  line-height: 1;
  margin-right: 0.35rem;
  position: relative;
  top: -1px;
}

/* 2B) إخفاء الخط الذهبي تحت الزر في الموبايل فقط */
@media (max-width: 768px) {
  .service-hero::after {
    display: none !important;
  }
}




/* ==================================================
   FIX: Breadcrumb mobile wrap + safe padding inside hero
   Append at end of service-node CSS
   ================================================== */

@media (max-width: 768px) {

  /* امنع القصّ البصري داخل الهيرو (القصّ كان يقطع breadcrumb عند الحواف) */
  .service-hero {
    overflow: visible !important;
  }

  /* اعطِ مساحة داخلية للكونتينر حتى لا يلتصق breadcrumb بالحافة */
  .service-hero__container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* اجعل breadcrumb يلتف لسطرين بدل ما يطلع خارج الحاوية */
  .service-breadcrumb {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    row-gap: 6px;
    column-gap: 8px;

    max-width: 100% !important;
    box-sizing: border-box;

    white-space: normal !important;
    overflow: visible !important;

    padding: 8px 12px !important;
    margin: 0 auto 14px !important;
  }

  /* فواصل أصغر */
  .service-breadcrumb .sep {
    margin: 0 2px !important;
    font-size: 0.7rem;
    opacity: .6;
  }

  /* تأكد أن الكلمات ما تتكسر بشكل سيّئ */
  .service-breadcrumb a,
  .service-breadcrumb .current {
    white-space: nowrap;
  }
}
