/* ============================================================
   SPECTERS — WordPress theme additions
   Hover/focus states (the .dc.html references used a design-tool
   `style-hover` attribute that has no meaning in real HTML, so the
   interactions are reproduced here as proper CSS), the mobile nav,
   WordPress core classes, and editor-content polish.
   Loaded AFTER specters.css. Uses the same :root tokens.
   ============================================================ */

html { scroll-behavior: smooth; }
img, video { max-width: 100%; height: auto; }
.spec a { color: inherit; }

/* ---- skip link / a11y ---- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; right: 12px; z-index: 100; width: auto; height: auto;
  clip: auto; background: var(--spec-orange); color: #0A0A0A; padding: 12px 20px;
  border-radius: 10px; font-family: var(--spec-font-head); font-weight: 700;
}

/* ============================================================
   BUTTONS / CTAS (reusable, used across templates)
   ============================================================ */
.spec-cta-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--spec-grad); color: #0A0A0A;
  font-family: var(--spec-font-head); font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 16px 40px -12px rgba(255,154,0,0.6);
  transition: transform .2s, box-shadow .2s;
}
.spec-cta-primary:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -12px rgba(255,154,0,0.8); }
.spec-cta-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent; border: 1px solid rgba(255,255,255,0.18); color: #fff;
  font-family: var(--spec-font-head); font-weight: 700; text-decoration: none;
  transition: background .2s, border-color .2s;
}
.spec-cta-ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.35); }

/* ---- header CTA ---- */
.spec-header__cta {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  background: var(--spec-grad); color: #0A0A0A;
  font-family: var(--spec-font-head); font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(255,154,0,0.55);
  transition: transform .2s, box-shadow .2s;
}
.spec-header__cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(255,154,0,0.7); }

/* ============================================================
   MOBILE NAVIGATION (replaces .spec-nav under 640px)
   ============================================================ */
.spec-nav-toggle {
  display: none; flex: none; width: 44px; height: 44px; align-items: center;
  justify-content: center; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 11px; color: #fff;
  cursor: pointer; padding: 0;
}
.spec-nav-toggle svg { width: 22px; height: 22px; }
.spec-mobile-nav {
  display: none; position: fixed; inset: 78px 0 0; z-index: 49;
  background: rgba(7,7,7,0.97); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px); padding: 28px 32px;
  flex-direction: column; gap: 6px; overflow-y: auto;
}
.spec-mobile-nav.open { display: flex; }
.spec-mobile-nav a {
  font-family: var(--spec-font-head); font-weight: 600; font-size: 19px;
  color: #E8E8E8; text-decoration: none; padding: 16px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.07); transition: color .2s;
}
.spec-mobile-nav a:hover, .spec-mobile-nav a.current-menu-item { color: var(--spec-orange); }
.spec-mobile-nav .spec-header__cta { margin-top: 22px; justify-content: center; padding: 15px; font-size: 16px; }
body.spec.spec-nav-open { overflow: hidden; }
@media (max-width: 760px) {
  .spec-nav { display: none; }
  .spec-header__cta--desktop { display: none; }
  .spec-nav-toggle { display: inline-flex; }
}

/* ============================================================
   HOVER STATES for cards / links used in the references
   ============================================================ */
.spec-bento-cell { transition: border-color .3s, transform .3s; }
.spec-bento-cell:hover { border-color: rgba(255,154,0,0.4) !important; transform: translateY(-4px); }
.spec-bento-cell--feature:hover { border-color: rgba(255,154,0,0.55) !important; }
.spec-arrow { transition: transform .3s; }
.spec-bento-cell:hover .spec-arrow,
.spec-row:hover .spec-arrow { transform: translateX(-6px); }

.spec-city-link { transition: border-color .25s, color .25s; }
.spec-city-link:hover { border-color: rgba(255,154,0,0.45) !important; color: #FFB547 !important; }

.spec-row { transition: border-color .3s; }
.spec-row:hover { border-color: rgba(255,154,0,0.38) !important; }
.spec-glow { transition: opacity .35s; }
.spec-row:hover .spec-glow { opacity: 1 !important; }

/* clamp long titles/descriptions to keep service cards uniform */
.spec-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* generic lift card (blog cards, related, mission/values/benefits, post rows) */
.spec-lift { transition: transform .3s, border-color .3s; }
.spec-lift:hover { transform: translateY(-6px); border-color: rgba(255,154,0,0.35) !important; }
.spec-lift--sm:hover { transform: translateY(-4px); }
.spec-lift--row:hover { transform: translateY(-3px); }

/* footer + simple text links */
.spec-tlink { transition: color .2s; }
.spec-tlink:hover { color: var(--spec-orange); }

/* outline pill button (e.g. "كل المقالات") */
.spec-outline-btn { transition: background .2s, border-color .2s; }
.spec-outline-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

/* ============================================================
   FORM FOCUS (contact / newsletter / comments)
   ============================================================ */
.spec-input:focus, .spec-textarea:focus, .spec-select:focus,
.spec input:focus, .spec textarea:focus, .spec select:focus { border-color: var(--spec-orange); }
.spec-submit { transition: transform .2s, box-shadow .2s; cursor: pointer; }
.spec-submit:hover { transform: translateY(-2px); }

/* ============================================================
   EDITOR / the_content polish (Gutenberg blocks inside .spec-article-body & .loc-body)
   ============================================================ */
.spec-article-body img, .loc-body img { border-radius: 16px; display: block; }
.spec-article-body figure, .loc-body figure { margin: 30px 0; }
.spec-article-body figcaption, .loc-body figcaption {
  font-size: 13.5px; color: var(--spec-text-faint); text-align: center; margin-top: 10px;
}
.spec-article-body h4, .loc-body h4 {
  font-family: var(--spec-font-head); font-weight: 700; font-size: 19px; color: #fff; margin: 26px 0 10px;
}
.spec-article-body ol, .loc-body ol { list-style: decimal; padding-inline-start: 24px; }
.spec-article-body ol li::before, .loc-body ol li::before { content: none; }
.spec-article-body ol li, .loc-body ol li { padding-inline-start: 8px; }
.spec-article-body code, .loc-body code {
  background: rgba(255,255,255,0.06); border: 1px solid var(--spec-border);
  border-radius: 6px; padding: 2px 7px; font-size: 0.9em; direction: ltr; display: inline-block;
}
.spec-article-body pre, .loc-body pre {
  background: #0D0D0D; border: 1px solid var(--spec-border); border-radius: 14px;
  padding: 22px 24px; overflow-x: auto; direction: ltr; text-align: left; margin: 26px 0;
}
.spec-article-body pre code, .loc-body pre code { background: none; border: 0; padding: 0; }
.spec-article-body table, .loc-body table { width: 100%; border-collapse: collapse; margin: 26px 0; }
.spec-article-body th, .spec-article-body td, .loc-body th, .loc-body td {
  border: 1px solid var(--spec-border); padding: 12px 16px; text-align: right; color: #BFBFBF;
}
.spec-article-body th, .loc-body th { background: rgba(255,255,255,0.03); color: #fff; font-family: var(--spec-font-head); }

/* single service: content + sidebar grid.
   Desktop: content (left) | included card + TOC/CTA (right, sticky).
   Mobile: included → content → TOC/CTA (so "ما تحصل عليه" follows the benefits). */
.spec-svc-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas:
    "content included"
    "content aside";
  gap: 18px 50px;
  align-items: start;
}
.spec-svc-grid .svc-content  { grid-area: content; min-width: 0; }
.spec-svc-grid .svc-included { grid-area: included; }
.spec-svc-grid .svc-aside    { grid-area: aside; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 920px) {
  .spec-svc-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "included" "content" "aside";
    gap: 30px;
  }
  .spec-svc-grid .svc-aside { position: static; }
}

/* location page "why" intro paragraphs (wpautop output) */
.loc-why p { font-size: 17px; line-height: 1.9; color: #A0A0A0; margin: 0 0 16px; }
.loc-why p:last-child { margin-bottom: 0; }
.loc-why strong { color: #fff; }
.loc-why a { color: var(--spec-orange); }

/* WP core alignment + caption helpers */
.alignright { float: right; margin: 8px 0 18px 24px; }
.alignleft  { float: left;  margin: 8px 24px 18px 0; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13.5px; color: var(--spec-text-faint); text-align: center; margin-top: 8px; }
.wp-block-image { margin: 30px 0; }
.sticky, .gallery-caption, .bypostauthor { display: block; }

/* pagination */
.spec-pagination { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 56px; }
.spec-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  padding: 0 14px; border-radius: 11px; border: 1px solid var(--spec-border);
  color: #C8C8C8; text-decoration: none; font-family: var(--spec-font-head); font-weight: 700;
  transition: border-color .2s, color .2s, background .2s;
}
.spec-pagination .page-numbers:hover { border-color: rgba(255,154,0,0.4); color: var(--spec-orange); }
.spec-pagination .page-numbers.current {
  background: var(--spec-grad); color: #0A0A0A; border-color: transparent;
}

/* Contact Form 7 / WPForms inside .spec-card-form get the dark inputs */
.spec-form-shell .wpcf7-form-control:not(.wpcf7-submit),
.spec-form-shell input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.spec-form-shell textarea, .spec-form-shell select {
  width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 11px; padding: 14px 16px;
  color: #fff; font-family: var(--spec-font-body); font-size: 15px; outline: none; margin-bottom: 4px;
}
.spec-form-shell .wpcf7-submit, .spec-form-shell input[type=submit] {
  width: 100%; margin-top: 14px; background: var(--spec-grad); color: #0A0A0A;
  font-family: var(--spec-font-head); font-weight: 700; font-size: 16.5px; padding: 16px;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 14px 36px -12px rgba(255,154,0,0.6); transition: transform .2s;
}
.spec-form-shell .wpcf7-submit:hover, .spec-form-shell input[type=submit]:hover { transform: translateY(-2px); }
.spec-form-shell label { display: block; font-size: 14px; color: #C8C8C8; margin-bottom: 9px; }

/* responsive: collapse multi-column grids on small screens */
@media (max-width: 920px) {
  .spec-2col, .spec-3col { grid-template-columns: 1fr !important; }
  .spec-toc-grid { grid-template-columns: 1fr !important; }
  .spec-toc-grid aside { position: static !important; }
}
@media (max-width: 640px) {
  .spec-hide-mobile { display: none !important; }
}

/* footer columns collapse */
@media (max-width: 900px) {
  .spec-footer__grid { grid-template-columns: 1fr 1fr !important; gap: 36px !important; }
}
@media (max-width: 560px) {
  .spec-footer__grid { grid-template-columns: 1fr !important; }
}


/* spec-row mobile fix */
@media (max-width: 640px) {
  .spec-row { grid-template-columns: 1fr !important; gap: 16px !important; padding: 24px 18px !important; }
  .spec-row > div:nth-child(2) { flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; gap: 14px !important; }
  .spec-row > div:nth-child(2) > div:first-child { width: 56px !important; height: 56px !important; border-radius: 14px !important; }
  .spec-row > div:nth-child(2) > span { font-size: 30px !important; }
  .spec-row h2 { font-size: 22px !important; line-height: 1.3 !important; }
  .spec-row .spec-2col { grid-template-columns: 1fr !important; }
}


/* home closing-CTA spacing */
.home .spec-wrap { padding-top: 84px !important; }
@media (max-width: 640px) { .home .spec-wrap { padding-top: 52px !important; } }
