.sv-sec, .sv-sec *{ box-sizing:border-box; }

/* Full width breakout داخل tagDiv */
.sv-full{
  width:100vw;
  position:relative;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  overflow-x:hidden;
}

/* Theme-aware variables (match باقي القوالب) */
.sv-sec{
  --bg:     var(--td_body_bg, var(--td_background_color, #0B1220));
  --text:   #F9FAFB;
  --muted:  var(--td_text_color_secondary, rgba(249,250,251,.72));
  --accent: var(--td_theme_color, var(--td_theme_color_main, #0A7674));

  --stroke: rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.06);

  background: var(--bg);
  padding: 70px 0 76px;
  color: var(--text);
  font-family: var(--abdsc-font, inherit);
}

.sv-sec h1, .sv-sec h2, .sv-sec h3, .sv-sec h4{ font-family: inherit; }

.sv-container{
  max-width: 100%;
  margin:0 auto;
  padding:0 clamp(16px, 3vw, 60px);
}

.sv-head{
  text-align:center;
  margin-bottom: 26px;
}

.sv-title{
  margin:0 0 10px;
  color: var(--text);
  font-size: clamp(28px, 3.2vw, 42px);
  /* Avoid requesting ultra-bold weights that may not exist in the theme font,
     which can cause a visible font fallback/shift when buttons are hidden. */
  font-weight:800;
  line-height:1.15;
  letter-spacing:.2px;
}

.sv-sub{
  margin:0 auto;
  max-width: 860px;
  color:var(--muted);
  font-size:15.5px;
  line-height:2;
  font-weight:700;
}

/* Grid (cols controlled by CSS variables set inline from PHP)
   Using !important because TagDiv/Newspaper can override grid rules in some blocks. */
.sv-sec .sv-grid{
  display:grid;
  gap: 16px;
  grid-template-columns: repeat(var(--sv-cols, 2), minmax(0, 1fr)) !important;
}
/* Backward compatible class fallbacks */
.sv-cols-1{ --sv-cols: 1; }
.sv-cols-2{ --sv-cols: 2; }
.sv-cols-3{ --sv-cols: 3; }
.sv-cols-4{ --sv-cols: 4; }
.sv-cols-5{ --sv-cols: 5; }
.sv-cols-6{ --sv-cols: 6; }

/* Card */
.sv-card{
  border-radius: 18px;
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  transition: transform .18s ease, border-color .18s ease;
}

/* Subtle inner border for crisp look */
.sv-card:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  border:1px solid var(--stroke2);
  pointer-events:none;
}

.sv-card:hover{
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
@supports not (color: color-mix(in srgb, red 50%, white)){
  .sv-card:hover{ border-color: rgba(10,118,116,.28); }
}

.sv-media{
  height: 190px;
  background-size: cover;
  background-position: center;
  position:relative;
  display:block;
  text-decoration:none;
}

/* gradient overlay on image */
.sv-media:after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,18,32,.10), rgba(11,18,32,.85));
}

.sv-body{
  padding: 18px 18px 16px;
  position:relative;
  text-align: center;
  display:flex;
  flex-direction:column;
  flex: 1 1 auto;
}

.sv-h{
  margin:0 0 8px;
  color:#FFFFFF;
  font-size:18px;
  font-weight:800;
  line-height:1.4;
}

.sv-h__a{
  color: inherit;
  text-decoration: none;
}

.sv-h__a:hover{
  text-decoration: underline;
}

.sv-p{
  margin:0 0 14px;
  color:var(--muted);
  font-size:14px;
  line-height:1.95;
  font-weight:700;
  /* Keep button row aligned across cards */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: calc(1.95em * 3);
}

/* Buttons */
.sv-actions{
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
}

.sv-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
  text-decoration:none;
  font-weight:900;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 999px;
  /* Primary button (same style as "View All") */
  border: 1px solid #488cdb;
  background: #488cdb;
  box-shadow: 0 10px 24px rgba(72,140,219,.22);
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

/* Remove any theme/UA injected icons (pseudo elements) */
.sv-link::before,
.sv-link::after{
  content: none !important;
  display: none !important;
}
@supports not (color: color-mix(in srgb, red 50%, white)){
  .sv-link{ border-color: #488cdb; }
}

.sv-link:hover{
  transform: translateY(-1px);
  background: #3a78c2;
  border-color: #3a78c2;
  box-shadow: 0 12px 28px rgba(72,140,219,.28);
}

.sv-link--secondary{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.22);
  color:#FFFFFF;
  box-shadow: none;
}
.sv-link--secondary:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.26);
  box-shadow: none;
}

/* Secondary button */
.sv-link--secondary{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.22);
  color: #FFFFFF;
  box-shadow: none;
}
.sv-link--secondary:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.26);
  box-shadow: none;
  filter:none;
}

@media (max-width: 980px){
  .sv-title{ font-size:30px; }
  /* Use md variable computed in PHP (fallback: 2) */
  .sv-sec .sv-grid{
    grid-template-columns: repeat(var(--sv-cols-md, 2), minmax(0, 1fr)) !important;
  }
  .sv-media{ height: 175px; }
}
@media (max-width: 560px){
  .sv-sec .sv-grid{
    grid-template-columns: repeat(var(--sv-cols-sm, 1), minmax(0, 1fr)) !important;
  }
}
/* When buttons are hidden (per page/settings) */
.sv-card--no-btn .sv-p{ margin-bottom: 0; }

.sv-empty{
  grid-column: 1/-1;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.80);
  text-align:center;
  font-weight:700;
  line-height:1.8;
}

/* Responsive: improve when user selects 3/4 columns */
@media (max-width: 1280px){
  .sv-cols-6{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .sv-cols-5{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1100px){
  .sv-cols-4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sv-cols-6{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sv-cols-5{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 980px){
  .sv-title{ font-size:30px; }
  /* 6/5/4 -> 2 cols on tablet */
  .sv-cols-6, .sv-cols-5, .sv-cols-4{ --sv-cols: 2; }
  /* 3 -> 2 cols on tablet */
  .sv-cols-3{ --sv-cols: 2; }
  /* 2 stays 2 on tablet */
  .sv-cols-2{ --sv-cols: 2; }
  .sv-cols-1{ --sv-cols: 1; }
  .sv-media{ height: 175px; }
}
@media (max-width: 560px){
  .sv-grid{ grid-template-columns: 1fr; }
}


/* Bottom centered "View All" */
.sv-foot{
  margin-top: 22px;
  display:flex;
  justify-content:center;
}
.sv-all{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 14px 34px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration:none;
  color:#FFFFFF;
  border: 1px solid transparent;
  background: #488cdb;
  box-shadow: 0 10px 24px rgba(72,140,219,.22);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.sv-all:hover{
  transform: translateY(-1px);
  background: #3a78c2;
  box-shadow: 0 12px 28px rgba(72,140,219,.28);
}


/* ===== Service Details (Single) | Prefix: svd- ===== */
.svd-sec, .svd-sec *{ box-sizing:border-box; }
.svd-full{
  width:100vw;
  position:relative;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  overflow-x:hidden;
}
.svd-sec{
  --bg:     var(--td_body_bg, var(--td_background_color, #0B1220));
  --text:   var(--td_text_color, #F9FAFB);
  --muted:  var(--td_text_color_secondary, rgba(249,250,251,.72));
  --accent: var(--td_theme_color, var(--td_theme_color_main, #0A7674));
  --stroke: rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.06);

  background: var(--bg);
  color: var(--text);
  padding: 58px 0 74px;
}
.svd-container{
  max-width:1180px;
  margin:0 auto;
  padding:0 16px;
}
.svd-topbar{ display:flex; justify-content:flex-start; margin-bottom: 14px; }
.svd-back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.92);
  text-decoration:none;
  font-weight:800;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.svd-back:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
@supports not (color: color-mix(in srgb, red 50%, white)){
  .svd-back:hover{ border-color: rgba(10,118,116,.35); background: rgba(10,118,116,.10); }
}

.svd-hero{ text-align:center; margin-bottom: 22px; }
.svd-heroCard{
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  padding: 22px 18px;
  position:relative;
  overflow:hidden;
}
.svd-heroCard:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  border:1px solid var(--stroke2);
  pointer-events:none;
}
.svd-title{
  margin:0 0 10px;
  color:#fff;
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight:800;
  line-height:1.15;
  letter-spacing:.2px;
}
.svd-sub{
  margin:0 auto;
  max-width: 920px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 2;
  font-weight:700;
}

.svd-layout{
  display:grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 18px;
  align-items:start;
}
.svd-article{
  border-radius: 18px;
  overflow:hidden;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 55px rgba(0,0,0,.30);
  position:relative;
}
.svd-article:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  border:1px solid var(--stroke2);
  pointer-events:none;
}

.svd-media{
  height: 300px;
  position:relative;
  background: rgba(255,255,255,.02);
}
.svd-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.svd-mediaShade{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,18,32,.10), rgba(11,18,32,.88));
}

.svd-body{
  padding: 18px 18px 22px;
  color: rgba(255,255,255,.90);
}
.svd-body :where(p, li){
  color: rgba(255,255,255,.82);
  line-height: 2.05;
  font-weight:700;
  font-size: 15px;
}
.svd-body :where(h2,h3,h4){
  color:#fff;
  margin: 18px 0 10px;
  font-weight:800;
  line-height:1.4;
}
.svd-body a{
  color: var(--accent);
  text-decoration:none;
  font-weight:800;
}
.svd-body a:hover{ text-decoration: underline; }

.svd-aside .svd-box{
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  padding: 16px;
  position:relative;
  overflow:hidden;
}
.svd-aside .svd-box:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  border:1px solid var(--stroke2);
  pointer-events:none;
}
.svd-boxTitle{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight:900;
  color:#fff;
  text-align:center;
}
.svd-relGrid{
  display:grid;
  gap: 12px;
}
.svd-relCard{
  display:block;
  text-decoration:none;
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  transition: transform .16s ease, border-color .16s ease;
}
.svd-relCard:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
@supports not (color: color-mix(in srgb, red 50%, white)){
  .svd-relCard:hover{ border-color: rgba(10,118,116,.28); }
}
.svd-relH{ color:#fff; font-weight:900; margin:0 0 6px; line-height:1.5; }
.svd-relP{ color: var(--muted); font-weight:700; line-height:1.9; font-size: 13.5px; margin:0 0 10px; }
.svd-relMore{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: var(--accent);
  font-weight:900;
}
.svd-empty{
  text-align:center;
  color: var(--muted);
  font-weight:800;
  padding: 10px 6px;
}

@media (max-width: 980px){
  .svd-layout{ grid-template-columns: 1fr; }
  .svd-media{ height: 220px; }
  .svd-topbar{ justify-content:center; }
}
/* =========================================================
   Service Components (Rows/Columns) - Service Builder output
   ========================================================= */
.abdsc-svx-components{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin:18px 0;
}

.abdsc-svx-row{
  display:grid;
  grid-template-columns:repeat(var(--abdsc-cols, 2), minmax(0, 1fr));
  gap:16px;
}

@media (max-width:768px){
  /* Force single column on small screens even if inline layout widths are set */
  .abdsc-svx-row{ grid-template-columns:1fr !important; }
}

.abdsc-svx-col{ min-width:0; }

.abdsc-svx-field{
  border:1px solid var(--ab-border, rgba(0,0,0,.12));
  border-radius:14px;
  padding:14px;
  background: var(--ab-card, #fff);
}

.abdsc-svx-field__label{
  font-weight:800;
  margin:0 0 6px;
}

.abdsc-svx-field__value{ opacity:.92; }

.abdsc-svx-field__value img{
  max-width:100%;
  height:auto;
  border-radius:12px;
  display:block;
}


/* =========================================================
   WHY CHOOSE US (WC4) - Premium Solid (RTL | No Gradients)
   ========================================================= */
