/* ============================================================
   ebsrv9 — Services Cards Section
   Namespace  : ebsrv9
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');

/* ============================================================
   1. Variables & Colors
============================================================ */
.ebsrv9 {
  /* خلفية وألوان عامة */
  --ebsrv9-bg:              #141c2e;
  --ebsrv9-text:            #c8d0e0;
  --ebsrv9-title:           #ffffff;
  --ebsrv9-border:          rgba(255,255,255,0.08);

  /* اللابل والعنوان الفرعي */
  --ebsrv9-label-color:     #c0392b;
  --ebsrv9-label-line:      rgba(192,57,43,0.35);
  --ebsrv9-subtitle-color:  #8a95aa;

  /* الكارت */
  --ebsrv9-card-bg:         #1a2340;
  --ebsrv9-card-title:      #ffffff;
  --ebsrv9-card-text:       #a8b4c8;
  --ebsrv9-card-overlay:    linear-gradient(to bottom, transparent 30%, rgba(14,20,40,0.65) 100%);
  --ebsrv9-card-border:     rgba(255,255,255,0.06);
  --ebsrv9-card-hover-border: rgba(192,57,43,0.5);

  /* الماسة  */
  --ebsrv9-diamond:         #c0392b;

  /* Padding */
  --ebsrv9-padding-top:    2rem;
  --ebsrv9-padding-bottom: 2rem;
}

/* ============================================================
   2. Reset داخل الـ namespace
============================================================ */
*,
.ebsrv9 *,
.ebsrv9 *::before,
.ebsrv9 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   3. Base Styles — Mobile (0 → 480px)
============================================================ */
.ebsrv9 {
  font-family: "El Messiri", sans-serif;
  direction: rtl;
  background-color: var(--ebsrv9-bg);
  color: var(--ebsrv9-text);
  padding-top: var(--ebsrv9-padding-top);
  padding-bottom: var(--ebsrv9-padding-bottom);
  width: 100%;
  overflow: hidden;
}

.ebsrv9__container {
  width: 92%;
  max-width: 75rem;
  margin-inline: auto;
}

/* —— Header —— */
.ebsrv9__header {
  text-align: center;
  margin-bottom: 2rem;
}

.ebsrv9__label {
  display: inline-block;
  font-size: clamp(0.7rem, 2.8vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ebsrv9-label-color);
  margin-bottom: 0.6rem;
  position: relative;
  padding-inline: 1.2rem;
}

.ebsrv9__label::before,
.ebsrv9__label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2rem;
  height: 0.06rem;
  background: var(--ebsrv9-label-line);
  transform: translateY(-50%);
}

.ebsrv9__label::before { right: 100%; }
.ebsrv9__label::after  { left: 100%; }

.ebsrv9__title {
  font-size: clamp(1.5rem, 6vw, 2.4rem);
  font-weight: 700;
  color: var(--ebsrv9-title);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.ebsrv9__subtitle {
  font-size: clamp(0.8rem, 3.2vw, 0.95rem);
  color: var(--ebsrv9-subtitle-color);
  line-height: 1.7;
  max-width: 32rem;
  margin-inline: auto;
}


.ebsrv9__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

/* —— Card —— */
.ebsrv9__card {
  background: var(--ebsrv9-card-bg);
  border: 0.06rem solid var(--ebsrv9-card-border);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.ebsrv9__card:hover {
  border-color: var(--ebsrv9-card-hover-border);
  transform: translateY(-0.25rem);
  box-shadow: 0 0.6rem 2rem rgba(0,0,0,0.4);
}

/* —— Card Image —— */
.ebsrv9__card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  width: 100%;
}

.ebsrv9__card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.ebsrv9__card:hover .ebsrv9__card-image {
  transform: scale(1.05);
}

.ebsrv9__card-overlay {
  position: absolute;
  inset: 0;
  background: var(--ebsrv9-card-overlay);
  pointer-events: none;
}

/* —— Card Body —— */
.ebsrv9__card-body {
  padding: 0.7rem 0.8rem 0.9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ebsrv9__card-title {
  font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  font-weight: 700;
  color: var(--ebsrv9-card-title);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.ebsrv9__card-text {
  font-size: clamp(0.7rem, 2.6vw, 0.85rem);
  color: var(--ebsrv9-card-text);
  line-height: 1.65;
}

.ebsrv9__card-diamond {
  color: var(--ebsrv9-diamond);
  font-size: 0.55rem;
  vertical-align: middle;
  display: inline-block;
  margin-inline: 0.2rem;
}

/* ============================================================
   4. Breakpoints
============================================================ */

/* Small Tablet 481 → 600 */
@media (min-width: 481px) {
  .ebsrv9 {
    --ebsrv9-padding-top:    4rem;
    --ebsrv9-padding-bottom: 4rem;
  }

  .ebsrv9__header {
    margin-bottom: 2.2rem;
  }

  .ebsrv9__card-body {
    padding: 0.85rem 1rem 1rem;
  }
}

/* Medium Tablet 601 → 768 */
@media (min-width: 601px) {
  .ebsrv9__grid {
    gap: 1.1rem;
  }
}

/* Large Tablet 769 → 1024 */
@media (min-width: 769px) {
  .ebsrv9 {
    --ebsrv9-padding-top:    5rem;
    --ebsrv9-padding-bottom: 5rem;
  }

  .ebsrv9__header {
    margin-bottom: 2.8rem;
  }

  .ebsrv9__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
  }

  .ebsrv9__card-image-wrap {
    aspect-ratio: 3 / 4;
  }

  .ebsrv9__card-body {
    padding: 1rem 1.1rem 1.2rem;
  }
}

/* Small Desktop 1025 → 1280 */
@media (min-width: 1025px) {
  .ebsrv9 {
    --ebsrv9-padding-top:    5.5rem;
    --ebsrv9-padding-bottom: 5.5rem;
  }

  .ebsrv9__grid {
    gap: 1.4rem;
  }

  .ebsrv9__card-image-wrap {
    aspect-ratio: 3 / 4;
  }

  .ebsrv9__card-body {
    padding: 1.1rem 1.2rem 1.3rem;
    gap: 0.5rem;
  }
}

/* Medium Desktop 1281 → 1440 */
@media (min-width: 1281px) {
  .ebsrv9__grid {
    gap: 1.5rem;
  }
}

/* Large Desktop 1441 → 1920 */
@media (min-width: 1441px) {
  .ebsrv9 {
    --ebsrv9-padding-top:    6rem;
    --ebsrv9-padding-bottom: 6rem;
  }
}

/* Extra Large 1921+ */
@media (min-width: 1921px) {
  .ebsrv9 {
    --ebsrv9-padding-top:    7rem;
    --ebsrv9-padding-bottom: 7rem;
  }

  .ebsrv9__container {
    max-width: 90rem;
  }
}