/* ============================================================
   ebpt6 — Training Courses Flip Cards
   Namespace  : ebpt6
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');

/* 1. Variables & Colors */
.ebpt6 {
  /* Section */
  --ebpt6-bg:                   #f5f7fb;
  --ebpt6-padding-top:          3.5rem;
  --ebpt6-padding-bottom:       3.5rem;

  /* Title */
  --ebpt6-title-text:           #204A7B;
  --ebpt6-title-line:           #5DA5D8;

  /* Card — Front */
  --ebpt6-card-front-bg:        #204A7B;
  --ebpt6-card-front-text:      #ffffff;
  --ebpt6-card-front-img-bg:    rgba(255, 255, 255, 0.10);

  /* Card — Back */
  --ebpt6-card-back-bg:         #204A7B;
  --ebpt6-card-back-text:       #ffffff;
  --ebpt6-card-back-desc:       rgba(255, 255, 255, 0.80);
  --ebpt6-card-back-icon:       rgba(255, 255, 255, 0.90);

  /* Card — Shadow */
  --ebpt6-card-shadow:          0 0.25rem 1.5rem rgba(13, 42, 110, 0.18);
  --ebpt6-card-shadow-hover:    0 0.5rem 2rem rgba(13, 42, 110, 0.30);

  /* Card dimensions */
  --ebpt6-card-radius:          0.625rem;
  --ebpt6-card-height:          10rem;
}

/* 2. Reset داخل الـ namespace */
*,
.ebpt6 *,
.ebpt6 *::before,
.ebpt6 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 3. Base Styles — Mobile */
.ebpt6 {
  font-family: "El Messiri", sans-serif;
  background-color: var(--ebpt6-bg);
  padding: var(--ebpt6-padding-top) 1.25rem var(--ebpt6-padding-bottom);
  width: 100%;
  direction: ltr;
}

/* Header */
.ebpt6__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ebpt6__title {
  font-size: clamp(1.25rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--ebpt6-title-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.ebpt6__title-line {
  display: block;
  width: 5rem;
  height: 0.25rem;
  background-color: var(--ebpt6-title-line);
  margin: 0 auto;
  border-radius: 0.125rem;
}

/* Container */
.ebpt6__container {
  max-width: 75rem;
  margin: 0 auto;
}

/* Grid */
.ebpt6__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

/* ──────────────────────────────────────
   Flip Card Core — 3D flip on Y axis
────────────────────────────────────── */
.ebpt6__card-wrap {
  perspective: 50rem;
  height: var(--ebpt6-card-height);
}

.ebpt6__card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: var(--ebpt6-card-radius);
  box-shadow: var(--ebpt6-card-shadow);
  cursor: pointer;
}

/* Hover (desktop) */
.ebpt6__card-wrap:hover .ebpt6__card {
  transform: rotateY(180deg);
  box-shadow: var(--ebpt6-card-shadow-hover);
}

/* Touch-flipped class (mobile) */
.ebpt6__card--flipped {
  transform: rotateY(180deg) !important;
  box-shadow: var(--ebpt6-card-shadow-hover);
}

/* ── Front Face ── */
.ebpt6__card-front,
.ebpt6__card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--ebpt6-card-radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  gap: 0.625rem;
  overflow: hidden;
}

.ebpt6__card-front {
  background-color: var(--ebpt6-card-front-bg);
}

.ebpt6__card-img {
  width: clamp(2.5rem, 8vw, 3.5rem);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: var(--ebpt6-card-front-img-bg);
  border-radius: 0.375rem;
  flex-shrink: 0;
}
.ebpt6__card-icon {
  width: clamp(3.2rem, 10vw, 4.8rem);
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 6vw, 3rem);
  color: #fff;
  /* background-color: var(--ebpt6-card-front-img-bg); */
  border-radius: 0.375rem;
  flex-shrink: 0;
}
.ebpt6__card-front-title {
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  font-weight: 600;
  color: var(--ebpt6-card-front-text);
  text-align: center;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* ── Back Face ── */
.ebpt6__card-back {
  background-color: var(--ebpt6-card-back-bg);
  transform: rotateY(180deg);
  gap: 0.5rem;
}

.ebpt6__card-back-icon {
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--ebpt6-card-back-icon);
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.ebpt6__card-back-text {
  font-size: clamp(0.65rem, 2.2vw, 0.8rem);
  font-weight: 700;
  color: var(--ebpt6-card-back-text);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.ebpt6__card-back-desc {
  font-size: clamp(0.6rem, 2vw, 0.72rem);
  color: var(--ebpt6-card-back-desc);
  text-align: center;
  line-height: 1.5;
  direction: rtl;
}

/* 4. Breakpoints */
@media (min-width: 481px) {
  .ebpt6 {
    --ebpt6-card-height: 11rem;
  }
  .ebpt6__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.125rem;
  }
}

@media (min-width: 601px) {
  .ebpt6 {
    --ebpt6-card-height: 11.5rem;
  }
  .ebpt6__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.125rem;
  }
}

@media (min-width: 769px) {
  .ebpt6 {
    --ebpt6-card-height: 12rem;
    padding: var(--ebpt6-padding-top) 2rem var(--ebpt6-padding-bottom);
  }
  .ebpt6__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1025px) {
  .ebpt6 {
    --ebpt6-card-height: 12.5rem;
    padding: var(--ebpt6-padding-top) 3rem var(--ebpt6-padding-bottom);
  }
  .ebpt6__grid {
    gap: 1.375rem;
  }
  .ebpt6__card-img {
    width: 3.5rem;
  }
}

@media (min-width: 1281px) {
  .ebpt6 {
    --ebpt6-card-height: 13rem;
    padding: var(--ebpt6-padding-top) 4rem var(--ebpt6-padding-bottom);
  }
  .ebpt6__grid {
    gap: 1.5rem;
  }
}

@media (min-width: 1441px) {
  .ebpt6__container {
    max-width: 65rem;
  }
  .ebpt6 {
    --ebpt6-card-height: 13.5rem;
  }
}

@media (min-width: 1921px) {
  .ebpt6__container {
    max-width: 80rem;
  }
}