/* ============================================================
   Majesty Doctors Slider v2.0 — doctors-slider.css
   Full Width | Astra Compatible | Mobile First | RTL
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
.mds-section {
    --mds-gold:       #C9A84C;
    --mds-gold-light: #E2C06B;
    --mds-dark:       #1a1a2e;
    --mds-card-bg:    #ffffff;
    --mds-img-bg:     #dddde8;
    --mds-shadow:     0 8px 40px rgba(0,0,0,0.10);
    --mds-radius:     20px;
    --mds-font:       'Cairo', sans-serif;
    font-family:      var(--mds-font);
    direction:        rtl;
    overflow:         hidden;
}

/* ════════════════════════════════
   FULL WIDTH — Astra / any theme
   ════════════════════════════════ */
.mds-section.mds-fullwidth {
    /* Break out of Elementor / Astra container */
    position:    relative;
    width:       100vw !important;
    max-width:   100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    box-sizing:  border-box;
}

/* Astra specific resets */
.ast-container .mds-section.mds-fullwidth,
.ast-separate-container .mds-section.mds-fullwidth,
.elementor-section .mds-section.mds-fullwidth {
    width:       100vw !important;
    max-width:   100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: 0 !important;
}

/* ── Section Header ── */
.mds-header {
    text-align:    center;
    margin-bottom: 44px;
    padding:       0 20px;
}

.mds-title {
    font-family:  var(--mds-font);
    font-size:    clamp(1.7rem, 4vw, 2.6rem);
    font-weight:  800;
    color:        var(--mds-dark);
    line-height:  1.35;
    margin:       0 0 6px;
    position:     relative;
    display:      inline-block;
}

/* Gold underline accent */
.mds-title::after {
    content:          '';
    display:          block;
    width:            60px;
    height:           3px;
    background:       var(--mds-gold);
    border-radius:    2px;
    margin:           10px auto 0;
}

.mds-title span {
    color: var(--mds-gold);
}

.mds-subtitle {
    font-family:  var(--mds-font);
    font-size:    clamp(0.9rem, 2vw, 1.05rem);
    color:        #555;
    line-height:  1.8;
    max-width:    650px;
    margin:       14px auto 0;
}

/* ════════════════════════════════
   SLIDER STRUCTURE
   ════════════════════════════════ */
.mds-slider-outer {
    position:   relative;
    max-width:  1340px;
    margin:     0 auto;
    padding:    0 70px;
    box-sizing: border-box;
}

.mds-track-wrap {
    overflow:      hidden;
    border-radius: 4px;
}

.mds-track {
    display:    flex;
    transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
    align-items: stretch;
}

/* ── Card Item Wrapper ── */
.mds-card-item {
    flex-shrink: 0;
    padding:     12px 10px 24px;
    box-sizing:  border-box;
}

/* ════════════════════════════════
   CARD
   ════════════════════════════════ */
.mds-card {
    background:    var(--mds-card-bg);
    border-radius: var(--mds-radius);
    box-shadow:    var(--mds-shadow);
    overflow:      hidden;
    display:       flex;
    flex-direction: column;
    height:        100%;
    transition:    transform 0.3s ease, box-shadow 0.3s ease;
}

.mds-card:hover {
    transform:  translateY(-7px);
    box-shadow: 0 18px 52px rgba(0,0,0,0.14);
}

/* ── Card Image Area ── */
.mds-card-img {
    position:        relative;
    background-color: var(--mds-img-bg);
    height:          260px;
    overflow:        hidden;
    display:         flex;
    align-items:     flex-end;
    justify-content: center;
}

.mds-card-img img {
    position:       absolute;
    inset:          0;
    width:          100%;
    height:         100%;
    object-fit:     cover;
    object-position: top center;
    display:        block;
    transition:     transform 0.4s ease;
}

.mds-card:hover .mds-card-img img {
    transform: scale(1.04);
}

/* Gradient overlay */
.mds-card-img::after {
    content:    '';
    position:   absolute;
    inset:      0;
    background: linear-gradient(to top, rgba(26,26,46,0.60) 0%, transparent 55%);
    z-index:    1;
    pointer-events: none;
}

/* ── Department Badge ── */
.mds-badge {
    position:      absolute;
    bottom:        14px;
    left:          50%;
    transform:     translateX(-50%);
    z-index:       2;
    background:    var(--mds-gold);
    color:         #fff;
    font-family:   var(--mds-font);
    font-size:     0.76rem;
    font-weight:   700;
    padding:       5px 18px;
    border-radius: 20px;
    white-space:   nowrap;
    letter-spacing: 0.02em;
    box-shadow:    0 2px 10px rgba(201,168,76,0.35);
}

/* ── Card Body ── */
.mds-card-body {
    padding:        20px 18px 22px;
    display:        flex;
    flex-direction: column;
    gap:            8px;
    flex:           1;
}

.mds-name-link {
    text-decoration: none;
    color:           inherit;
}

.mds-name {
    font-family:  var(--mds-font);
    font-size:    1.13rem;
    font-weight:  800;
    color:        var(--mds-dark);
    line-height:  1.3;
    margin:       0;
    transition:   color 0.2s;
}

.mds-name-link:hover .mds-name,
.mds-name:hover {
    color: var(--mds-gold);
}

.mds-specialty {
    display:     flex;
    align-items: center;
    gap:         6px;
    font-family: var(--mds-font);
    font-size:   0.86rem;
    font-weight: 600;
    color:       var(--mds-gold);
}

.mds-specialty svg {
    flex-shrink: 0;
    color:       var(--mds-gold);
}

.mds-desc {
    font-family:  var(--mds-font);
    font-size:    0.83rem;
    color:        #666;
    line-height:  1.8;
    margin:       4px 0 0;
    /* Clamp to 4 lines */
    display:      -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow:     hidden;
}

/* ════════════════════════════════
   NAVIGATION ARROWS
   ════════════════════════════════ */
.mds-arrow {
    position:      absolute;
    top:           50%;
    transform:     translateY(-60%);
    z-index:       10;
    width:         48px;
    height:        48px;
    border-radius: 50%;
    background:    #fff;
    border:        2px solid var(--mds-gold);
    color:         var(--mds-gold);
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    transition:    background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.25s;
    box-shadow:    0 4px 16px rgba(201,168,76,0.18);
    padding:       0;
    outline:       none;
}

.mds-arrow:hover {
    background:  var(--mds-gold);
    color:       #fff;
    box-shadow:  0 6px 24px rgba(201,168,76,0.38);
    transform:   translateY(-60%) scale(1.08);
}

.mds-arrow svg {
    width:          20px;
    height:         20px;
    pointer-events: none;
}

/* RTL: prev = right, next = left */
.mds-arrow-prev { right: 8px; }
.mds-arrow-next { left:  8px; }

/* ════════════════════════════════
   DOTS
   ════════════════════════════════ */
.mds-dots {
    display:         flex;
    justify-content: center;
    align-items:     center;
    gap:             8px;
    margin-top:      30px;
    flex-wrap:       wrap;
    padding:         0 20px;
}

.mds-dot {
    width:         10px;
    height:        10px;
    border-radius: 50%;
    background:    #ccc;
    border:        none;
    cursor:        pointer;
    padding:       0;
    transition:    background 0.25s, transform 0.25s, width 0.25s;
    outline:       none;
}

.mds-dot.is-active {
    background: var(--mds-gold);
    transform:  scale(1.4);
    width:      12px;
    height:     12px;
}

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .mds-slider-outer { padding: 0 56px; }
    .mds-arrow-prev   { right: 4px; }
    .mds-arrow-next   { left:  4px; }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .mds-slider-outer { padding: 0 44px; }
    .mds-arrow        { width: 38px; height: 38px; }
    .mds-arrow svg    { width: 16px; height: 16px; }
    .mds-arrow-prev   { right: 2px; }
    .mds-arrow-next   { left:  2px; }
    .mds-card-img     { height: 220px; }
    .mds-title        { font-size: 1.7rem; }
    .mds-header       { margin-bottom: 30px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .mds-slider-outer  { padding: 0 36px; }
    .mds-arrow         { width: 33px; height: 33px; }
    .mds-arrow svg     { width: 14px; height: 14px; }
    .mds-card-body     { padding: 16px 14px 18px; }
    .mds-card-img      { height: 200px; }
    .mds-title         { font-size: 1.45rem; }
    .mds-badge         { font-size: 0.7rem; padding: 4px 14px; }
    .mds-name          { font-size: 1rem; }
    .mds-desc          { -webkit-line-clamp: 3; }
}

/* Very small */
@media (max-width: 360px) {
    .mds-slider-outer { padding: 0 30px; }
}

/* ── Elementor editor preview ── */
.elementor-editor-active .mds-section.mds-fullwidth {
    margin-left:  0 !important;
    width:        100% !important;
    max-width:    100% !important;
}