/* ==========================================================
   ebmnt1-components.css
   مكونات مشتركة بين أكتر من سكشن:
   عنوان السكشن (pill + title) / الزرار / الـ notch (الركن المقطوع) / السلايدر
   ========================================================== */

:root {
    /* ---------- section heading (على خلفية فاتحة) ---------- */
    --ebmnt1-components-heading-pill-border-color-on-light: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-heading-pill-text-color-on-light: var(--ebmnt1-color-helper-heading-dark);
    --ebmnt1-components-heading-title-text-color-on-light: var(--ebmnt1-color-helper-heading-dark);
    --ebmnt1-components-heading-paragraph-text-color-on-light: var(--ebmnt1-color-helper-body-gray);

    /* ---------- section heading (على خلفية زرقاء) ---------- */
    --ebmnt1-components-heading-pill-border-color-on-dark: var(--ebmnt1-color-secondary-yellow);
    --ebmnt1-components-heading-pill-text-color-on-dark: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-heading-title-text-color-on-dark: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-heading-paragraph-text-color-on-dark: var(--ebmnt1-color-helper-surface);

    --ebmnt1-components-heading-gap: 1.25em;
    --ebmnt1-components-heading-pill-padding-block: 7px;
    --ebmnt1-components-heading-pill-padding-inline: 14px;
    --ebmnt1-components-heading-text-max-width: 46rem;

    /* ---------- button ---------- */
    --ebmnt1-components-button-background-color: var(--ebmnt1-color-secondary-yellow);
    --ebmnt1-components-button-text-color: var(--ebmnt1-color-helper-heading-dark);
    --ebmnt1-components-button-hover-background-color: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-button-hover-text-color: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-button-border-color: var(--ebmnt1-color-secondary-yellow);
    --ebmnt1-components-button-hover-border-color: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-button-on-dark-hover-background-color: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-button-on-dark-hover-text-color: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-button-on-dark-hover-border-color: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-button-padding-block: 16px;
    --ebmnt1-components-button-padding-inline: 32px;
    --ebmnt1-components-button-gap: 10px;
    --ebmnt1-components-button-font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);

    /* ---------- notch (الركن المقطوع) ---------- */
    --ebmnt1-components-notch-surface-on-white: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-notch-surface-on-surface: var(--ebmnt1-color-helper-surface);
    --ebmnt1-components-notch-surface-on-blue: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-notch-media-radius: 15px;
    --ebmnt1-components-notch-outer-radius: 25px;
    --ebmnt1-components-notch-border-size: 10px;
    --ebmnt1-components-notch-fillet-size: 15px;

    /* ---------- slider ---------- */
    --ebmnt1-components-slider-gap: 0.75rem;
    --ebmnt1-components-slider-peek: 1.75rem;
    --ebmnt1-components-slider-controls-gap: 0.75rem;
    --ebmnt1-components-slider-button-size: 2.9rem;
    --ebmnt1-components-slider-button-radius: 12px;
    --ebmnt1-components-slider-button-icon-size: clamp(0.9rem, 0.85rem + 0.2vw, 1.05rem);
    --ebmnt1-components-slider-button-background-color: var(--ebmnt1-color-secondary-yellow);
    --ebmnt1-components-slider-button-icon-color: var(--ebmnt1-color-helper-heading-dark);
    --ebmnt1-components-slider-button-hover-background-color: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-slider-button-hover-icon-color: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-slider-button-on-dark-hover-background-color: var(--ebmnt1-color-helper-white);
    --ebmnt1-components-slider-button-on-dark-hover-icon-color: var(--ebmnt1-color-primary-blue);
    --ebmnt1-components-slider-bullet-width: 15px;
    --ebmnt1-components-slider-bullet-height: 5px;
    --ebmnt1-components-slider-bullet-background-color: var(--ebmnt1-color-helper-light-blue);
    --ebmnt1-components-slider-bullet-active-background-color: var(--ebmnt1-color-secondary-yellow);
}

/* الـ gap والـ peek بتكبر مع الشاشة (الـ peek لازم يكون أكبر من الـ gap عشان الكارد التاني يبان) */
@media (min-width: 768px) {
    :root {
        --ebmnt1-components-slider-gap: 1rem;
        --ebmnt1-components-slider-peek: 2.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --ebmnt1-components-slider-gap: 1.25rem;
        --ebmnt1-components-slider-peek: 3rem;
    }
}

/* ==========================================================
   عنوان السكشن
   ========================================================== */
.ebmnt1-section-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ebmnt1-components-heading-gap);
    text-align: center;
}

.ebmnt1-section-heading--start {
    align-items: flex-start;
    text-align: start;
}

.ebmnt1-section-heading__pill {
    padding: var(--ebmnt1-components-heading-pill-padding-block) var(--ebmnt1-components-heading-pill-padding-inline);
    border: 1px solid var(--ebmnt1-components-heading-pill-border-color-on-light);
    border-radius: var(--ebmnt1-radius-pill);
    font-size: var(--ebmnt1-font-size-label);
    font-weight: var(--ebmnt1-font-weight-medium);
    line-height: 1.2;
    color: var(--ebmnt1-components-heading-pill-text-color-on-light);
}

.ebmnt1-section-heading__title {
    font-size: var(--ebmnt1-font-size-section-title);
    font-weight: var(--ebmnt1-font-weight-bold);
    line-height: var(--ebmnt1-line-height-heading);
    color: var(--ebmnt1-components-heading-title-text-color-on-light);
}

.ebmnt1-section-heading__text {
    max-width: var(--ebmnt1-components-heading-text-max-width);
    color: var(--ebmnt1-components-heading-paragraph-text-color-on-light);
}

.ebmnt1-section-heading--on-dark .ebmnt1-section-heading__pill {
    border-color: var(--ebmnt1-components-heading-pill-border-color-on-dark);
    color: var(--ebmnt1-components-heading-pill-text-color-on-dark);
}

.ebmnt1-section-heading--on-dark .ebmnt1-section-heading__title {
    color: var(--ebmnt1-components-heading-title-text-color-on-dark);
}

.ebmnt1-section-heading--on-dark .ebmnt1-section-heading__text {
    color: var(--ebmnt1-components-heading-paragraph-text-color-on-dark);
}

/* ==========================================================
   الزرار
   ========================================================== */
.ebmnt1-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ebmnt1-components-button-gap);
    padding: var(--ebmnt1-components-button-padding-block) var(--ebmnt1-components-button-padding-inline);
    border: 1px solid var(--ebmnt1-components-button-border-color);
    border-radius: var(--ebmnt1-radius-pill);
    background-color: var(--ebmnt1-components-button-background-color);
    font-size: var(--ebmnt1-components-button-font-size);
    font-weight: var(--ebmnt1-font-weight-semibold);
    line-height: 1;
    color: var(--ebmnt1-components-button-text-color);
    transition: background-color var(--ebmnt1-transition-base), color var(--ebmnt1-transition-base), border-color var(--ebmnt1-transition-base), transform var(--ebmnt1-transition-base);
    cursor: pointer;
}

.ebmnt1-button:hover,
.ebmnt1-button:focus-visible {
    border-color: var(--ebmnt1-components-button-hover-border-color);
    background-color: var(--ebmnt1-components-button-hover-background-color);
    color: var(--ebmnt1-components-button-hover-text-color);
}

.ebmnt1-button--on-dark:hover,
.ebmnt1-button--on-dark:focus-visible {
    border-color: var(--ebmnt1-components-button-on-dark-hover-border-color);
    background-color: var(--ebmnt1-components-button-on-dark-hover-background-color);
    color: var(--ebmnt1-components-button-on-dark-hover-text-color);
}

.ebmnt1-button--block {
    width: 100%;
}

.ebmnt1-button__icon {
    transition: transform var(--ebmnt1-transition-base);
}

.ebmnt1-button:hover .ebmnt1-button__icon {
    transform: translateX(-4px);
}

/* ==========================================================
   الـ notch: صورة بركن مقطوع (نفس أسلوب الديمو)
   التصميم متعكس عشان الـ RTL
   ========================================================== */
.ebmnt1-notch {
    position: relative;
    width: 100%;
}

.ebmnt1-notch__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--ebmnt1-components-notch-media-radius);
}

.ebmnt1-notch__tab {
    position: absolute;
    z-index: 2;
    display: flex;
}

.ebmnt1-notch__tab::before,
.ebmnt1-notch__tab::after {
    content: "";
    position: absolute;
    width: var(--ebmnt1-components-notch-fillet-size);
    height: var(--ebmnt1-components-notch-fillet-size);
    pointer-events: none;
}

/* لون الخلفية اللي الـ tab بيندمج معاها */
.ebmnt1-notch__tab--on-white,
.ebmnt1-notch__tab--on-white::before,
.ebmnt1-notch__tab--on-white::after {
    background-color: var(--ebmnt1-components-notch-surface-on-white);
}

.ebmnt1-notch__tab--on-surface,
.ebmnt1-notch__tab--on-surface::before,
.ebmnt1-notch__tab--on-surface::after {
    background-color: var(--ebmnt1-components-notch-surface-on-surface);
}

.ebmnt1-notch__tab--on-blue,
.ebmnt1-notch__tab--on-blue::before,
.ebmnt1-notch__tab--on-blue::after {
    background-color: var(--ebmnt1-components-notch-surface-on-blue);
}

/* أعلى اليمين */
.ebmnt1-notch__tab--top-right {
    top: 0;
    right: 0;
    padding: 0 0 var(--ebmnt1-components-notch-border-size) var(--ebmnt1-components-notch-border-size);
    border-bottom-left-radius: var(--ebmnt1-components-notch-outer-radius);
}

.ebmnt1-notch__tab--top-right::before {
    top: 0;
    right: 100%;
    -webkit-mask: radial-gradient(circle at 0 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 0 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

.ebmnt1-notch__tab--top-right::after {
    top: 100%;
    right: 0;
    -webkit-mask: radial-gradient(circle at 0 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 0 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

/* أعلى اليسار */
.ebmnt1-notch__tab--top-left {
    top: 0;
    left: 0;
    padding: 0 var(--ebmnt1-components-notch-border-size) var(--ebmnt1-components-notch-border-size) 0;
    border-bottom-right-radius: var(--ebmnt1-components-notch-outer-radius);
}

.ebmnt1-notch__tab--top-left::before {
    top: 0;
    left: 100%;
    -webkit-mask: radial-gradient(circle at 100% 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 100% 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

.ebmnt1-notch__tab--top-left::after {
    top: 100%;
    left: 0;
    -webkit-mask: radial-gradient(circle at 100% 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 100% 100%, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

/* أسفل اليمين */
.ebmnt1-notch__tab--bottom-right {
    bottom: 0;
    right: 0;
    padding: var(--ebmnt1-components-notch-border-size) 0 0 var(--ebmnt1-components-notch-border-size);
    border-top-left-radius: var(--ebmnt1-components-notch-outer-radius);
}

.ebmnt1-notch__tab--bottom-right::before {
    bottom: 0;
    right: 100%;
    -webkit-mask: radial-gradient(circle at 0 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 0 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

.ebmnt1-notch__tab--bottom-right::after {
    bottom: 100%;
    right: 0;
    -webkit-mask: radial-gradient(circle at 0 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 0 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

/* أسفل اليسار */
.ebmnt1-notch__tab--bottom-left {
    bottom: 0;
    left: 0;
    padding: var(--ebmnt1-components-notch-border-size) var(--ebmnt1-components-notch-border-size) 0 0;
    border-top-right-radius: var(--ebmnt1-components-notch-outer-radius);
}

.ebmnt1-notch__tab--bottom-left::before {
    bottom: 0;
    left: 100%;
    -webkit-mask: radial-gradient(circle at 100% 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 100% 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

.ebmnt1-notch__tab--bottom-left::after {
    bottom: 100%;
    left: 0;
    -webkit-mask: radial-gradient(circle at 100% 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
    mask: radial-gradient(circle at 100% 0, transparent calc(var(--ebmnt1-components-notch-fillet-size) - 0.5px), #000 var(--ebmnt1-components-notch-fillet-size));
}

/* ==========================================================
   السلايدر (أزرار قبل/بعد + mouse grab + touch + peek للكروت)
   ========================================================== */
.ebmnt1-slider {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ebmnt1-slider__viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--ebmnt1-components-slider-peek);
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    cursor: grab;
    touch-action: pan-y pinch-zoom;
}

.ebmnt1-slider__viewport::-webkit-scrollbar {
    display: none;
}

.ebmnt1-slider__viewport.ebmnt1-is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.ebmnt1-slider__viewport.ebmnt1-is-dragging a,
.ebmnt1-slider__viewport.ebmnt1-is-dragging img {
    pointer-events: none;
}

.ebmnt1-slider__track {
    display: flex;
    align-items: stretch;
    gap: var(--ebmnt1-components-slider-gap);
    padding-inline: var(--ebmnt1-components-slider-peek);
    text-align: start;
}

.ebmnt1-slider__slide {
    flex-shrink: 0;
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
}

.ebmnt1-slider__slide > * {
    width: 100%;
}

.ebmnt1-slider__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ebmnt1-components-slider-controls-gap);
}

.ebmnt1-slider__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ebmnt1-components-slider-button-size);
    height: var(--ebmnt1-components-slider-button-size);
    border-radius: var(--ebmnt1-components-slider-button-radius);
    background-color: var(--ebmnt1-components-slider-button-background-color);
    font-size: var(--ebmnt1-components-slider-button-icon-size);
    color: var(--ebmnt1-components-slider-button-icon-color);
    transition: background-color var(--ebmnt1-transition-base), color var(--ebmnt1-transition-base), opacity var(--ebmnt1-transition-base);
}

.ebmnt1-slider__button:hover:not(:disabled),
.ebmnt1-slider__button:focus-visible {
    background-color: var(--ebmnt1-components-slider-button-hover-background-color);
    color: var(--ebmnt1-components-slider-button-hover-icon-color);
}

.ebmnt1-slider--on-dark .ebmnt1-slider__button:hover:not(:disabled),
.ebmnt1-slider--on-dark .ebmnt1-slider__button:focus-visible {
    background-color: var(--ebmnt1-components-slider-button-on-dark-hover-background-color);
    color: var(--ebmnt1-components-slider-button-on-dark-hover-icon-color);
}

.ebmnt1-slider__button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ebmnt1-slider__bullets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ebmnt1-slider__bullet {
    width: var(--ebmnt1-components-slider-bullet-width);
    height: var(--ebmnt1-components-slider-bullet-height);
    border-radius: 6px;
    background-color: var(--ebmnt1-components-slider-bullet-background-color);
    transition: background-color var(--ebmnt1-transition-base);
}

.ebmnt1-slider__bullet:hover,
.ebmnt1-slider__bullet.ebmnt1-is-active {
    background-color: var(--ebmnt1-components-slider-bullet-active-background-color);
}
