/**
 * SDO Team Marquee - Frontend Styles
 * ===================================
 * Pure CSS animation marquee. Zero JS dependency.
 * Author: SDO Digital Solutions
 * Version: 1.0.0
 */

/* ===== Container ===== */
.sdo-tm-wrap {
    overflow: hidden;
    width: 100%;
    position: relative;
    direction: ltr; /* قسري عشان الحركة تكون متوقعة بصرف النظر عن RTL/LTR للموقع */
}

/* ===== Track ===== */
.sdo-tm-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: -moz-max-content;
    width: max-content;
    gap: 30px;
    animation: sdo-tm-scroll var(--sdo-tm-speed, 40s) linear infinite;
    will-change: transform;
}

.sdo-tm-ltr .sdo-tm-track {
    animation-direction: reverse;
}

.sdo-tm-pause:hover .sdo-tm-track {
    animation-play-state: paused;
}

/* ===== Card ===== */
.sdo-tm-item {
    flex: 0 0 220px;
    direction: rtl; /* رجّع RTL لمحتوى الكرت */
    box-sizing: border-box;
    height: auto;
}

.sdo-tm-card {
    background-color: #F5F2ED;
    border: 2px solid #E87B2D;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    padding: 0 0 20px;
    height: 100%;
    box-sizing: border-box;
    transition: transform .3s ease, box-shadow .3s ease;
}

.sdo-tm-item:hover .sdo-tm-card {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

/* ===== Image ===== */
.sdo-tm-image-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
    display: block;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.sdo-tm-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.sdo-tm-item:hover .sdo-tm-image-wrap img {
    transform: scale(1.05);
}

/* ===== Info ===== */
.sdo-tm-info {
    padding: 16px 12px 0;
}

.sdo-tm-name {
    font-size: 18px;
    font-weight: 700;
    color: #1F1F1F;
    margin: 0 0 6px;
    line-height: 1.3;
}

.sdo-tm-position {
    font-size: 14px;
    color: #888888;
    line-height: 1.4;
}

/* ===== Edge Mask (optional fade gradient at sides) ===== */
.sdo-tm-mask::before,
.sdo-tm-mask::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.sdo-tm-mask::before {
    left: 0;
    background: linear-gradient(to right, var(--sdo-tm-mask-color, #ffffff), transparent);
}

.sdo-tm-mask::after {
    right: 0;
    background: linear-gradient(to left, var(--sdo-tm-mask-color, #ffffff), transparent);
}

/* ===== Animation ===== */
@keyframes sdo-tm-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===== Accessibility: Respect reduced motion preference ===== */
@media (prefers-reduced-motion: reduce) {
    .sdo-tm-track {
        animation-duration: 200s !important;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sdo-tm-track       { gap: 20px; }
    .sdo-tm-item        { flex: 0 0 200px; }
    .sdo-tm-image-wrap  { height: 220px; }
}

@media (max-width: 600px) {
    .sdo-tm-track       { gap: 12px; }
    .sdo-tm-item        { flex: 0 0 160px; }
    .sdo-tm-image-wrap  { height: 180px; }
    .sdo-tm-name        { font-size: 16px; }
    .sdo-tm-position    { font-size: 13px; }
    .sdo-tm-mask::before,
    .sdo-tm-mask::after { width: 40px; }
}
