/* Namespaced to avoid conflicts with your custom UI/UX plugins */
.sp-home-landing { color: inherit; }

.sp-hero { padding: 48px 0 28px; }
.sp-hero__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 980px) { .sp-hero__grid { grid-template-columns: 1fr; } }

.sp-kicker { letter-spacing: .04em; text-transform: uppercase; font-size: 12px; opacity: .75; margin: 0 0 10px; }
.sp-hero__title { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.08; margin: 0 0 10px; }
.sp-hero__subtitle { font-size: 16px; opacity: .9; margin: 0 0 18px; max-width: 68ch; }

.sp-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

/* Ensure consistent spacing even if button styles come from Blocksy */
.sp-btn { text-decoration: none; }

.sp-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 980px) { .sp-trust { grid-template-columns: repeat(2, 1fr); } }
.sp-trust__item { padding: 10px 12px; border: 1px solid rgba(0,0,0,.10); border-radius: 12px; }
.sp-trust__item strong { display: block; font-size: 13px; margin-bottom: 3px; }
.sp-trust__item span { display: block; font-size: 12px; opacity: .85; }

.sp-panel { border: 1px solid rgba(0,0,0,.12); border-radius: 16px; padding: 16px; }
.sp-panel__title { font-size: 18px; margin: 0 0 6px; }
.sp-panel__sub { margin: 0 0 14px; opacity: .85; }
.sp-panel__note { margin-top: 12px; font-size: 12px; opacity: .8; }

.sp-decision { display: grid; gap: 10px; }
.sp-decision__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid rgba(0,0,0,.10); }
.sp-decision__label strong { display: block; font-size: 13px; }
.sp-decision__label span { display: block; font-size: 12px; opacity: .8; }

.sp-section { padding: 42px 0; }
.sp-section--alt { padding: 42px 0; }
.sp-section__header h2 { margin: 0 0 6px; font-size: 26px; }
.sp-section__header p { margin: 0; opacity: .85; max-width: 80ch; }

.sp-cards { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 980px) { .sp-cards { grid-template-columns: 1fr; } }
.sp-card { border: 1px solid rgba(0,0,0,.10); border-radius: 16px; padding: 16px; }
.sp-card h3 { margin: 0 0 8px; font-size: 18px; }
.sp-card p { margin: 0 0 12px; opacity: .9; }
.sp-card__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.sp-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.sp-chip { border: 1px solid rgba(0,0,0,.12); border-radius: 999px; padding: 8px 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.sp-chip__meta { font-size: 12px; opacity: .75; }

.sp-products { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .sp-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .sp-products { grid-template-columns: 1fr; } }
.sp-product { border: 1px solid rgba(0,0,0,.10); border-radius: 16px; padding: 12px; }
.sp-product__img img { width: 100%; height: auto; display: block; border-radius: 12px; }
.sp-product__title { font-size: 14px; margin: 10px 0 6px; }
.sp-product__price { font-size: 13px; opacity: .9; }

.sp-final { padding: 36px 0 54px; }
.sp-final__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: center; }
@media (max-width: 980px) { .sp-final__grid { grid-template-columns: 1fr; } }

/* ===== HERO overlay (ABC-like layout, but SuminventParts content) ===== */
.sp-hero--overlay {
  position: relative;
  min-height: 520px;
  padding: 34px 0;
  overflow: hidden;
}

.sp-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sp-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* subtle darkening for readability */
.sp-hero--overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.10) 55%, rgba(0,0,0,0));
  z-index: 1;
}

.sp-hero--overlay .ct-container { position: relative; z-index: 2; }

.sp-hero__overlay {
  max-width: 560px;
  background: rgba(0,0,0,.86);
  color: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(2px);
}

.sp-hero__kicker { margin: 0 0 10px; opacity: .8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.sp-hero__title  { margin: 0 0 10px; font-size: clamp(26px, 3.2vw, 44px); line-height: 1.05; }
.sp-hero__subtitle { margin: 0 0 14px; opacity: .9; max-width: 60ch; }

.sp-hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 14px; }
.sp-hero__ctas .sp-btn { text-decoration: none; }

.sp-hero__contact { display: grid; gap: 8px; margin: 10px 0 12px; }
.sp-hero__contact-row { display: flex; align-items: center; gap: 10px; }
.sp-hero__contact-row a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.sp-hero__icon { width: 18px; opacity: .9; }

.sp-hero__note {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
  opacity: .9;
}

.sp-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sp-badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

/* Mobile: overlay card sits lower, like ABC mobile screenshot */
@media (max-width: 820px) {
  .sp-hero--overlay { min-height: 560px; padding: 16px 0 26px; }
  .sp-hero--overlay::after {
    background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55));
  }
  .sp-hero__overlay {
    margin-top: 220px;
    max-width: 100%;
  }
}

.sp-home-landing .sp-hero--overlay .sp-hero__title {
  color: #fff !important;
}

/* ===== Mobile hero: center text + stacked buttons ===== */
@media (max-width: 820px) {

  /* reduce height so hero image isn't huge on mobile */
  .sp-hero--overlay {
    min-height: 420px;            /* ajustează: 380–460 după preferință */
    height: min(520px, 70vh);     /* limitează înălțimea pe telefoane mici */
    padding: 14px 0 18px;
  }

  /* overlay card placement and alignment */
  .sp-hero--overlay .ct-container {
    height: 100%;
    display: flex;
    align-items: flex-end;        /* card-ul jos, ca în screenshot */
  }

  .sp-hero__overlay {
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: center;           /* centrează tot textul */
  }

  /* CTA buttons stacked, bootstrap-like proportions */
  .sp-hero__ctas {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .sp-hero__ctas .sp-btn {
    display: inline-flex;
    justify-content: center;
    width: 240px;                 /* 220–260: eu recomand 240 pentru “clean” */
    max-width: 90%;
  }

  /* contact block centered */
  .sp-hero__contact {
    justify-items: center;
  }

  .sp-hero__contact-row {
    justify-content: center;
  }

  /* badges centered */
  .sp-hero__badges {
    justify-content: center;
  }
}

/* ===== Stronger borders on landing (desktop + mobile) ===== */
.sp-home-landing .sp-card,
.sp-home-landing .sp-panel,
.sp-home-landing .sp-trust__item,
.sp-home-landing .sp-decision__row,
.sp-home-landing .sp-product,
.sp-home-landing .sp-chip {
  border-width: 2px;
  border-color: rgba(0,0,0,.18);
}

/* On hero overlay: stronger border but adapted for dark background */
.sp-home-landing .sp-hero__overlay {
  border-width: 2px;
  border-color: rgba(255,255,255,.16);
}

/* ===== Bootstrap-like button geometry (landing only) ===== */
.sp-home-landing .sp-btn.wp-element-button {
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.1;
}

@media (max-width: 820px) {
  .sp-hero--overlay { min-height: 380px; height: min(460px, 62vh); }
}

/* =========================
   MOBILE: hero image top, overlay card below (no overlap)
   + all landing buttons stacked like in hero overlay
   ========================= */
@media (max-width: 820px) {

  /* 1) Hero: nu mai tratăm imaginea ca background absolut.
        O facem “bloc” în pagină, cu margini (ca un container) */
  .sp-hero--overlay {
    padding: 14px 16px 18px;     /* “container feel” pe mobil */
    min-height: auto;
  }

  /* scoate gradient-ul care era făcut pentru overlay peste imagine */
  .sp-hero--overlay::after {
    display: none;
  }

  /* imaginea devine un bloc normal, nu absolut */
  .sp-hero__bg {
    position: relative !important;
    inset: auto !important;
    height: 220px;              /* ajustează: 180–260 după gust */
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(0,0,0,.18);
    margin: 0 0 14px;
    z-index: 0;
  }

  .sp-hero__bg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
  }

  /* 2) Cardul (overlay) devine “normal flow” sub imagine */
  .sp-hero--overlay .ct-container {
    height: auto !important;
    display: block !important;
  }

  .sp-hero__overlay {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    text-align: center;         /* centru pe mobil cum ai cerut */
  }

  /* 3) TOATE butoanele de pe landing: stacked, centered, width fix */
  .sp-home-landing :is(
    .sp-hero__ctas,
    .sp-ctas,
    .sp-card__ctas,
    .sp-final__ctas,
    .sp-product .sp-card__ctas
  ) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .sp-home-landing .sp-btn.wp-element-button {
    width: 240px;               /* dacă vrei exact 220px, schimbă aici */
    max-width: 92%;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;         /* “bootstrap-like” */
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.1;
  }

  /* contact + badges centrate pe mobil */
  .sp-hero__contact { justify-items: center; }
  .sp-hero__contact-row { justify-content: center; }
  .sp-hero__badges { justify-content: center; }
}

/* =========================
   Borders stronger (desktop + mobile) — landing only
   ========================= */
.sp-home-landing :is(.sp-card, .sp-panel, .sp-trust__item, .sp-decision__row, .sp-product, .sp-chip) {
  border-width: 2px;
  border-color: rgba(0,0,0,.18);
}

.sp-home-landing .sp-hero__overlay {
  border-width: 2px;
  border-color: rgba(255,255,255,.16);
}

/* ===== FIX: card-ul din hero nu mai este tăiat pe mobil ===== */
@media (max-width: 820px) {

  /* hero trebuie să se comporte ca o secțiune normală (nu ca background full-screen) */
  .sp-home-landing .sp-hero--overlay {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 14px 16px 18px !important;
  }

  /* anulăm orice layout de tip flex/height 100% din variantele anterioare */
  .sp-home-landing .sp-hero--overlay .ct-container {
    height: auto !important;
    display: block !important;
  }

  /* dacă ai rămas cu un margin-top din vechiul overlay peste imagine, îl anulăm */
  .sp-home-landing .sp-hero__overlay {
    margin-top: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  /* imaginea rămâne bloc sus (cum vrei tu) */
  .sp-home-landing .sp-hero__bg {
    position: relative !important;
    inset: auto !important;
    height: 220px !important;   /* ajustează 180–260 */
    margin: 0 0 14px !important;
  }

  /* dacă încă ai gradient overlay din varianta veche */
  .sp-home-landing .sp-hero--overlay::after {
    display: none !important;
  }
}

