/* === DOS TEAM (2.5 cards carousel + overlay + centered text) === */

body.page-template-template-DosNewStyle .dos-team-section {
    background: #d64a33;
    color: #fff;
    padding: 80px 0;
    overflow: hidden;
}

body.page-template-template-DosNewStyle .dos-team-title {
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 44px;
    margin-bottom: 40px;
    position: relative;
}

/* navigation (counter + arrows) */
body.page-template-template-DosNewStyle .dos-team-nav {
    position: absolute;
    right: 12px;
    top: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    user-select: none;
    z-index: 2;
}
body.page-template-template-DosNewStyle .dos-team-btn {
    width: 40px; height: 40px; border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,.7);
    background: transparent; color: #fff; font-size: 18px;
    line-height: 38px; text-align: center; cursor: pointer;
    transition: all .25s ease;
}
body.page-template-template-DosNewStyle .dos-team-btn:hover { background: rgba(255,255,255,.15); }
body.page-template-template-DosNewStyle .dos-team-counter { opacity: .9; font-weight: 600; }

/* scroller */
body.page-template-template-DosNewStyle .dos-team-scroller {
    display: flex; gap: 48px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 32px;
    margin: 0 -60px;
}
body.page-template-template-DosNewStyle .dos-team-scroller::-webkit-scrollbar { display: none; }

/* === Cards base === */
body.page-template-template-DosNewStyle .dos-team-card {
    position: relative;
    flex: 0 0 calc((min(1200px, 90vw) - 2 * 48px) / 2.5);
    min-width: calc((min(1200px, 90vw) - 2 * 48px) / 2.5);
    aspect-ratio: 4/5;
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    opacity: 0;
    animation: dosFadeInUp .6s ease forwards;
}

/* entrance animation */
@keyframes dosFadeInUp {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}
body.page-template-template-DosNewStyle .dos-team-card:nth-child(1){ animation-delay: .05s }
body.page-template-template-DosNewStyle .dos-team-card:nth-child(2){ animation-delay: .10s }
body.page-template-template-DosNewStyle .dos-team-card:nth-child(3){ animation-delay: .15s }
body.page-template-template-DosNewStyle .dos-team-card:nth-child(4){ animation-delay: .20s }
body.page-template-template-DosNewStyle .dos-team-card:nth-child(5){ animation-delay: .25s }

/* image & states */
body.page-template-template-DosNewStyle .dos-team-card img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .35s ease, filter .35s ease;
    will-change: transform, filter;
    backface-visibility: hidden;
    transform: translateZ(0);
}
body.page-template-template-DosNewStyle .dos-team-card.is-active img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1.05);
}
body.page-template-template-DosNewStyle .dos-team-card:not(.is-active) img {
    filter: brightness(0.86) saturate(0.95);
}

/* overlay */
body.page-template-template-DosNewStyle .dos-team-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 10%, rgba(0,0,0,.45) 60%, rgba(0,0,0,.85) 100%);
    color: #fff;
    padding: 24px 24px 80px;
    display: flex; flex-direction: column;
    justify-content: flex-end; align-items: center;
    text-align: center; gap: 8px;
    opacity: 0;
    transform: translateY(10px) translateZ(0);
    transition: opacity .45s ease, transform .45s ease, background .25s ease;
    will-change: opacity, transform;
    backface-visibility: hidden;
}
body.page-template-template-DosNewStyle .dos-team-card.is-active .dos-team-overlay {
    opacity: 1; transform: translateY(0) translateZ(0);
    transition-delay: .08s;
}

/* overlay texts */
body.page-template-template-DosNewStyle .dos-team-name,
body.page-template-template-DosNewStyle .dos-team-role,
body.page-template-template-DosNewStyle .dos-team-bio {
    color: #fff; text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
    margin: 0 auto; max-width: 90%;
}
body.page-template-template-DosNewStyle .dos-team-name { font-size: 24px; font-weight: 800; letter-spacing: .2px; margin: 0; }
body.page-template-template-DosNewStyle .dos-team-role { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .95; margin: 0; }
body.page-template-template-DosNewStyle .dos-team-bio  {
    font-size: 14px; line-height: 1.55; max-width: 40ch; color: #f5f5f5; opacity: .95;
    margin: 6px 0 0; max-height: 10.5em; overflow: hidden;
    transition: opacity .3s ease, transform .4s ease;
}
body.page-template-template-DosNewStyle .dos-team-card.is-active .dos-team-bio { opacity: 1; transform: translateY(0); }
body.page-template-template-DosNewStyle .dos-team-card:not(.is-active) .dos-team-bio { opacity: .9; transform: translateY(4px); }

/* Κρύψε τίτλο/ρόλο/bio στη 2η και 3η κάρτα (κρατάμε overlay για ομοιομορφία) */
body.page-template-template-DosNewStyle #dosTeamScroller .dos-team-card:nth-child(2) .dos-team-overlay,
body.page-template-template-DosNewStyle #dosTeamScroller .dos-team-card:nth-child(3) .dos-team-overlay {
    /* αν θες εντελώς “γυμνή” εικόνα: */
    display: none !important;
}


/* Hover ONLY on active */
@media (hover: hover) {
    body.page-template-template-DosNewStyle .dos-team-card.is-active:hover img { transform: scale(1.07); }
    body.page-template-template-DosNewStyle .dos-team-card.is-active:hover .dos-team-overlay {
        background: linear-gradient(180deg, rgba(0,0,0,0.0) 15%, rgba(0,0,0,.45) 60%, rgba(0,0,0,.7) 100%);
    }
}

/* ====== Tablet (≤ 992px) ====== */
@media (max-width: 992px) {
    body.page-template-template-DosNewStyle .dos-team-scroller { gap: 28px; margin: 0 -24px; padding-bottom: 24px; }
    body.page-template-template-DosNewStyle .dos-team-card { flex: 0 0 75vw; min-width: 75vw; aspect-ratio: 3/4; border-radius: 14px; }
    body.page-template-template-DosNewStyle .dos-team-overlay { padding: 20px 18px 54px; background: linear-gradient(180deg, rgba(0,0,0,0.0) 8%, rgba(0,0,0,.42) 58%, rgba(0,0,0,.80) 100%); }
    body.page-template-template-DosNewStyle .dos-team-overlay .name { font-size: 20px; }
    body.page-template-template-DosNewStyle .dos-team-overlay .role { font-size: 12px; letter-spacing: 1px; }
    body.page-template-template-DosNewStyle .dos-team-overlay .bio  { font-size: 14px; line-height: 1.5; max-width: 44ch; max-height: 10em; }
    body.page-template-template-DosNewStyle .dos-team-btn { width:44px; height:44px; line-height:42px; font-size:18px; }
}

/* ====== Mobile (≤ 600px) ====== */
@media (max-width: 600px) {
    body.page-template-template-DosNewStyle .dos-team-scroller { gap: 18px; margin: 0 -16px; padding-bottom: 18px; }
    body.page-template-template-DosNewStyle .dos-team-card { flex: 0 0 86vw; min-width: 86vw; aspect-ratio: 3/4; border-radius: 12px; }
    body.page-template-template-DosNewStyle .dos-team-overlay { padding: 18px 14px 48px; background: linear-gradient(180deg, rgba(0,0,0,0.0) 5%, rgba(0,0,0,.38) 55%, rgba(0,0,0,.78) 100%); }
    body.page-template-template-DosNewStyle .dos-team-overlay .name { font-size: 18px; }
    body.page-template-template-DosNewStyle .dos-team-overlay .role { font-size: 11px; letter-spacing: .9px; }
    body.page-template-template-DosNewStyle .dos-team-overlay .bio  { font-size: 13px; max-height: 9.5em; }
    body.page-template-template-DosNewStyle .dos-team-nav { position: static; margin-top: 8px; display: flex; justify-content: flex-end; gap: 8px; }
}

/* ====== Small Mobile (≤ 380px) ====== */
@media (max-width: 380px) {
    body.page-template-template-DosNewStyle .dos-team-card { flex: 0 0 90vw; min-width: 90vw; aspect-ratio: 3/4; }
    body.page-template-template-DosNewStyle .dos-team-overlay .name { font-size: 17px; }
    body.page-template-template-DosNewStyle .dos-team-overlay .bio  { max-height: 9em; }
}

/* General mobile polish */
body.page-template-template-DosNewStyle .dos-team-scroller { overscroll-behavior-x: contain; }
body.page-template-template-DosNewStyle .dos-team-scroller.is-scrolling { scroll-snap-type: none !important; }

/* Stabilization helpers */
body.page-template-template-DosNewStyle .dos-team-card { will-change: transform; backface-visibility: hidden; contain: layout paint; }
body.page-template-template-DosNewStyle .dos-team-overlay { will-change: opacity, transform; backface-visibility: hidden; transform: translateZ(0); }
