.hasbat-design-page {
  --hb-primary: #2f55cf;
  --hb-primary-dark: #1e3da8;
  --hb-accent: #f45604;
  --hb-border: #e2e8f0;
  --hb-muted: #64748b;
  --hb-lightbox-max: min(1200px, 96vw);
  --hb-lightbox-img-max-h: calc(96vh - 5.5rem);
  font-family: Tajawal, sans-serif;
}

.hasbat-design-hero {
  background: linear-gradient(135deg, var(--hb-primary) 0%, var(--hb-primary-dark) 100%);
  color: #fff;
  border-radius: 16px;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem);
  margin: 0 0 2rem;
  text-align: center;
}

.hasbat-design-hero-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.hasbat-design-hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hasbat-design-hero-lead {
  margin: 0 auto 1.25rem;
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.95;
}

.hasbat-design-hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  font-size: 0.92rem;
}

.hasbat-design-hero-points li::before {
  content: '✓ ';
  font-weight: 700;
}

.hasbat-design-section-head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.hasbat-design-section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #0f172a;
}

.hasbat-design-section-sub {
  margin: 0;
  color: var(--hb-muted);
}

.hasbat-design-gallery {
  margin: 0 0 2.5rem;
}

.hasbat-design-features {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.hasbat-design-features-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hasbat-design-features-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #0f172a;
}

.hasbat-design-features-sub {
  margin: 0;
  color: var(--hb-muted);
  font-size: 1.02rem;
}

.hasbat-design-features-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 1.25rem;
}

.hasbat-design-features-grid li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: #334155;
}

.hasbat-design-features-grid li::before {
  content: '✓';
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(47, 85, 207, 0.12);
  color: var(--hb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.hasbat-design-cta {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: #f8fafc;
  border: 1px solid var(--hb-border);
  border-radius: 16px;
  margin-bottom: 1rem;
}

.hasbat-design-cta-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

.hasbat-design-cta-text {
  margin: 0 0 1.25rem;
  color: var(--hb-muted);
}

.hasbat-design-cta-btn {
  padding: 0.7rem 1.75rem !important;
  font-size: 1rem !important;
}

.hasbat-design-gallery {
  --hb-primary: #2f55cf;
  --hb-primary-dark: #1e3da8;
  --hb-border: #e2e8f0;
  --hb-muted: #64748b;
  font-family: Tajawal, sans-serif;
}

.hasbat-design-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hasbat-design-search-block {
  max-width: min(820px, 94vw);
  margin: 0 auto 2rem;
  text-align: center;
}

.hasbat-design-search-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #c9e7ff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(47, 85, 207, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hasbat-design-search-form:focus-within {
  border-color: #6a62fe;
  box-shadow: 0 16px 48px rgba(47, 85, 207, 0.18);
}

.hasbat-design-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.hasbat-design-search {
  width: 100%;
  height: 100%;
  min-height: 3.35rem;
  padding: 0.85rem 1.35rem;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  color: #242424;
}

.hasbat-design-search::placeholder {
  color: #94a3b8;
}

.hasbat-design-search:focus {
  outline: none;
}

.hasbat-design-search-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0 2rem;
  border: none;
  border-radius: 0;
  background: var(--hb-accent, #f45604);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.hasbat-design-search-submit:hover {
  background: #e04d03;
}

.hasbat-design-search-submit:active {
  transform: scale(0.98);
}

.hasbat-design-search-submit-icon {
  display: inline-flex;
  line-height: 0;
}

.hasbat-design-count {
  margin: 0.85rem 0 0;
  color: var(--hb-muted);
  font-size: 0.98rem;
  font-weight: 500;
}

.hasbat-design-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.hasbat-design-card {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hasbat-design-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.hasbat-design-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #e2e8f0;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hasbat-design-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.hasbat-design-card:hover .hasbat-design-thumb img {
  transform: scale(1.03);
}

.hasbat-design-card-body {
  padding: 0.85rem 1rem 1rem;
}

.hasbat-design-card-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.hasbat-design-card-id {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--hb-muted);
}

.hasbat-design-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hasbat-design-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.hasbat-design-btn-primary {
  background: var(--hb-primary);
  color: #fff;
}

.hasbat-design-btn-primary:hover {
  background: var(--hb-primary-dark);
  color: #fff;
}

.hasbat-design-btn-outline {
  background: transparent;
  color: var(--hb-primary);
  border-color: var(--hb-border);
}

.hasbat-design-btn-outline:hover {
  border-color: var(--hb-primary);
  background: rgba(47, 85, 207, 0.06);
}

.hasbat-design-no-results {
  text-align: center;
  color: var(--hb-muted);
  padding: 2rem 1rem;
}

.hasbat-design-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.hasbat-design-lightbox.is-open {
  display: flex !important;
}

.hasbat-design-lightbox[hidden]:not(.is-open) {
  display: none !important;
}

.hasbat-design-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.hasbat-design-lightbox-panel {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: var(--hb-lightbox-max);
  max-height: 96vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.hasbat-design-lightbox-close {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.hasbat-design-lightbox-title {
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 3rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--hb-border);
  word-break: break-word;
}

.hasbat-design-lightbox-img-wrap {
  overflow: auto;
  padding: 0.35rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.hasbat-design-lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: var(--hb-lightbox-max);
  max-height: var(--hb-lightbox-img-max-h);
  margin: 0;
  object-fit: contain;
}

@media (max-width: 1024px) {
  .hasbat-design-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hasbat-design-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hasbat-design-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .hasbat-design-search-form {
    flex-direction: column;
    border-radius: 16px;
  }

  .hasbat-design-search {
    min-height: 3rem;
    text-align: center;
  }

  .hasbat-design-search-submit {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border-radius: 0;
  }

  .hasbat-design-hero-points {
    flex-direction: column;
    align-items: center;
  }

  .hasbat-design-card-actions {
    flex-direction: column;
  }

  .hasbat-design-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hasbat-design-grid {
    grid-template-columns: 1fr;
  }

  .hasbat-design-features-grid {
    grid-template-columns: 1fr;
  }
}

/* —— وضع Elementor: بدون Hero/خلفيات — يُدار التنسيق من صفحة Elementor —— */
.hasbat-design-page--elementor {
  background: transparent;
  margin: 0;
  padding: 0;
}

.hasbat-design-page--elementor .hasbat-design-gallery {
  margin: 0 0 0.5rem;
}

.hasbat-design-page--elementor .hasbat-design-search-block {
  margin-bottom: 2.25rem;
}

.hasbat-design-page--elementor .hasbat-design-search-form {
  border-color: #c9e7ff;
}

.hasbat-design-page--elementor .hasbat-design-search-submit {
  background: var(--e-global-color-accent, #f45604);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  min-height: 3.35rem;
}

.hasbat-design-page--elementor .hasbat-design-search-submit:hover {
  filter: brightness(0.95);
}

.hasbat-design-page--elementor .hasbat-design-count {
  color: #64748b;
}

.hasbat-design-page--elementor .hasbat-design-card {
  border-color: #e3f0fb;
  box-shadow: 0 1px 0 rgba(36, 36, 36, 0.04);
}

.hasbat-design-page--elementor .hasbat-design-card-title {
  color: #242424;
}

.hasbat-design-page--elementor .hasbat-design-btn-primary {
  background: var(--e-global-color-accent, #f45604);
}

.hasbat-design-page--elementor .hasbat-design-btn-outline {
  color: var(--e-global-color-primary, #2f55cf);
  border-color: #c9e7ff;
}
