/*
 * Concurenți: galeria ediției și pagina fiecărui concurent.
 * Se încarcă doar pe șabloanele concurenti.html.twig și concurent.html.twig.
 * Butonul din meniu are stilurile lui în concurenti-v1.css (neschimbat).
 */

.esc-page {
    --esc-ink: #1c1819;
    --esc-muted: #59616a;
    --esc-rule: #e3e0dc;
    --esc-soft: #f4f2ef;
    --esc-photo: #e9e6e2;
    --esc-yellow: #ffd24c;
    --esc-dark: #1c1819;
    padding-block: 0 clamp(2.5rem, 6vw, 5rem);
    color: var(--esc-ink);
    /* Tema pune Lora pe <article>; aici textul rămâne ca în restul site-ului. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
}

.esc-page button,
.esc-page input {
    font-family: inherit;
}

.esc-page h1,
.esc-page h2,
.esc-page h3 {
    font-family: Lora, Georgia, serif;
    color: var(--esc-ink);
}

.esc-page :focus-visible {
    outline: 3px solid #1f5fa8;
    outline-offset: 3px;
}

.esc-kicker {
    margin: 0 0 .45rem;
    color: #0b6b4f;
    font: 700 .8rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ---------- Galerie: antet ---------- */

.esc-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--esc-rule);
}

.esc-head h1 {
    margin: 0;
    font-size: clamp(2.3rem, 4.8vw, 3.5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.02em;
}

.esc-head__intro p {
    max-width: 42rem;
    margin: .65rem 0 0;
    color: var(--esc-muted);
}

.esc-head__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.esc-count {
    color: var(--esc-muted);
    white-space: nowrap;
}

.esc-btn {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-height: 50px;
    padding: 0 1.3rem 0 .4rem;
    border: 0;
    border-radius: 999px;
    background: var(--esc-dark);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.esc-btn:hover { background: #3a3536; }
.esc-btn[hidden] { display: none; }

.esc-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--esc-yellow);
    color: #211b0e;
}

.esc-btn__icon svg { width: 18px; height: 18px; }

/* ---------- Grila de carduri ---------- */

.esc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem 1.5rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.esc-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.esc-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 14px;
    background: var(--esc-photo);
}

.esc-card__photo,
.esc-card__photo picture {
    display: block;
    width: 100%;
    height: 100%;
}

.esc-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: 50% 35%;
    transition: transform .45s ease;
}

.esc-card:hover .esc-card__photo img { transform: scale(1.03); }

.esc-card__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #8a929b;
}

.esc-card.is-current .esc-card__media { box-shadow: 0 0 0 4px var(--esc-yellow); }

.esc-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #211b0e;
    box-shadow: 0 4px 16px rgba(28, 24, 25, .3);
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease;
}

.esc-play[hidden] { display: none; }
.esc-play:hover { transform: scale(1.06); background: var(--esc-yellow); }
.esc-play[aria-pressed="true"] { background: var(--esc-yellow); }

.esc-ico-play,
.esc-ico-pause { display: inline-flex; }
.esc-ico-pause { display: none; }
[aria-pressed="true"] > .esc-ico-play { display: none; }
[aria-pressed="true"] > .esc-ico-pause { display: inline-flex; }

.esc-card__live {
    position: absolute;
    top: 12px;
    left: 12px;
    display: none;
    align-items: center;
    gap: .5rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: var(--esc-dark);
    color: var(--esc-yellow);
    font-size: .8rem;
    font-weight: 700;
    pointer-events: none;
}

.esc-card.is-playing .esc-card__live { display: inline-flex; }

.esc-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.esc-eq i {
    width: 3px;
    height: 12px;
    background: currentColor;
    transform-origin: bottom;
    animation: esc-eq 1s ease-in-out infinite;
}

.esc-eq i:nth-child(2) { animation-delay: -.35s; }
.esc-eq i:nth-child(3) { animation-delay: -.7s; }

@keyframes esc-eq {
    0%, 100% { transform: scaleY(.35); }
    50% { transform: scaleY(1); }
}

.esc-card__name {
    margin: .85rem 0 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.esc-card__name a { color: inherit; text-decoration: none; }
.esc-card__name a:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.esc-card__song {
    margin: .2rem 0 0;
    color: var(--esc-muted);
}

.esc-card__more { white-space: nowrap; font-size: .9em; }

/* Cardul de invitație */

.esc-card--invite { min-height: 100%; }

.esc-invite {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 240px;
    padding: 1.5rem;
    border: 3px dashed #f0b72f;
    border-radius: 14px;
    background: #fffbeb;
    color: #211b0e;
    text-align: center;
    text-decoration: none;
}

.esc-invite:hover { color: #211b0e; text-decoration: none; background: #fff4cc; }

.esc-invite__plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--esc-yellow);
    font: 700 2rem/1 Lora, Georgia, serif;
}

.esc-invite__title { font: 700 1.45rem/1.2 Lora, Georgia, serif; }
.esc-invite__text { max-width: 17rem; color: #4a3d00; }

.esc-invite__btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: .25rem;
    padding: 0 1.4rem;
    border-radius: 999px;
    background: var(--esc-dark);
    color: #fff;
    font-weight: 700;
}

.esc-note,
.esc-empty {
    margin: 2rem 0 0;
    color: var(--esc-muted);
    font-size: .95rem;
}

/* ---------- Bara de player din galerie ---------- */

.esc-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1031;
    border-top: 4px solid var(--esc-yellow);
    background: var(--esc-dark);
    color: #fff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
}

.esc-bar[hidden] { display: none; }

.esc-bar__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1.5fr) auto;
    align-items: center;
    gap: .6rem 1.25rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: .65rem 1rem;
}

.esc-bar__thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
}

.esc-bar__thumb[hidden] { display: none; }

.esc-bar__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.esc-bar__artist {
    overflow: hidden;
    color: #fff;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esc-bar__artist:hover { color: var(--esc-yellow); }

.esc-bar__title {
    overflow: hidden;
    color: #d1cccd;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esc-bar__controls {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.esc-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.esc-bar__btn:hover { background: #3a3536; }

.esc-bar__toggle {
    width: 50px;
    height: 50px;
    background: var(--esc-yellow);
    color: #211b0e;
}

.esc-bar__toggle:hover { background: #ffdf7a; }
.esc-bar__toggle svg { width: 22px; height: 22px; }

.esc-bar .esc-progress { color: #d1cccd; }
.esc-bar .esc-bar__close { color: #d1cccd; }

body.esc-bar-open { padding-bottom: 92px; }
body.esc-bar-open #back-to-top { bottom: 104px; }

/* ---------- Bara de progres (galerie și profil) ---------- */

.esc-progress {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--esc-muted);
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}

.esc-progress input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 24px;
    margin: 0;
    accent-color: #e5a900;
    cursor: pointer;
}

/* ---------- Pagina concurentului ---------- */

.esc-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    color: var(--esc-muted);
    font-weight: 600;
    text-decoration: none;
}

.esc-back:hover { color: var(--esc-ink); text-decoration: none; }

.esc-profile__grid {
    display: grid;
    align-items: center;
    gap: clamp(1.25rem, 3.5vw, 3.25rem);
    margin-top: .5rem;
}

.esc-profile__photo {
    overflow: hidden;
    border-radius: 18px;
    background: var(--esc-photo);
}

.esc-profile__photo picture { display: block; }

.esc-profile__photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    margin: 0;
    object-fit: cover;
}

.esc-profile__name {
    margin: 0;
    font-size: clamp(2.5rem, 5.6vw, 4.1rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.esc-tracks {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 1.6rem 0 0;
    padding: 0;
    list-style: none;
}

.esc-track__fallback-title {
    margin: 0 0 .4rem;
    font: 700 1.3rem/1.2 Lora, Georgia, serif;
}

.esc-track__native { width: 100%; }
.esc-track.is-enhanced .esc-track__fallback-title,
.esc-track.is-enhanced .esc-track__native { display: none; }

.esc-track__ui {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.2rem .9rem .9rem;
    border-radius: 18px;
    background: var(--esc-soft);
    transition: background-color .2s ease, color .2s ease;
}

.esc-track__ui[hidden] { display: none; }
.esc-track.is-playing .esc-track__ui { background: var(--esc-dark); color: #fff; }

.esc-track__play {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--esc-yellow);
    color: #211b0e;
    box-shadow: 0 3px 10px rgba(28, 24, 25, .16);
    cursor: pointer;
    transition: transform .15s ease;
}

.esc-track__play:hover { transform: scale(1.05); }

.esc-track__body { flex: 1 1 auto; min-width: 0; }

.esc-track__title {
    margin: 0 0 .3rem;
    font: 700 1.4rem/1.2 Lora, Georgia, serif;
    overflow-wrap: anywhere;
}

.esc-track.is-playing .esc-track__title { color: #fff; }
.esc-track.is-playing .esc-progress { color: #d1cccd; }

/* Distribuire */

.esc-share { margin-top: 1.6rem; }

.esc-share__label {
    margin: 0 0 .55rem;
    font-size: .95rem;
    font-weight: 700;
}

.esc-share__row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.esc-share__btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.esc-share__btn:hover { color: #fff; text-decoration: none; filter: brightness(1.1); }
.esc-share__btn[hidden] { display: none; }
.esc-share__btn--facebook { background: #1466d8; }
.esc-share__btn--whatsapp { background: #0f7a40; }
.esc-share__btn--telegram { background: #17719e; }
.esc-share__btn--x { background: #111; }
.esc-share__btn--native { background: var(--esc-dark); }
.esc-share__btn--copy { border-color: #c4c9cf; background: #fff; color: var(--esc-ink); }
.esc-share__btn--copy:hover { color: var(--esc-ink); filter: none; background: var(--esc-soft); }
.esc-share__x { font-size: 1rem; line-height: 1; }

.esc-share__status {
    min-height: 1.3em;
    margin: .45rem 0 0;
    color: #0b6b4f;
    font-size: .88rem;
}

.esc-bio {
    max-width: 46rem;
    margin-top: 2rem;
}

/* Chemarea la înscriere */

.esc-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-top: clamp(2.25rem, 5vw, 3.5rem);
    padding: 1.3rem 1.6rem;
    border-radius: 18px;
    background: var(--esc-dark);
    color: #fff;
}

.esc-cta p { margin: 0; font-size: 1.05rem; }

.esc-cta strong {
    margin-right: .35rem;
    color: var(--esc-yellow);
    font: 700 1.35rem/1.2 Lora, Georgia, serif;
}

.esc-cta a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 1.7rem;
    border-radius: 999px;
    background: var(--esc-yellow);
    color: #211b0e;
    font-weight: 700;
    text-decoration: none;
}

.esc-cta a:hover { background: #ffdf7a; color: #211b0e; text-decoration: none; }
.esc-cta a:focus-visible { outline-color: #fff; }

/* Alți concurenți */

.esc-others { margin-top: clamp(2.5rem, 5vw, 3.75rem); }

.esc-others__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1rem;
}

.esc-others h2 { margin: 0; font-size: 1.7rem; font-weight: 700; }
.esc-others__head a { font-size: 1rem; font-weight: 700; }
.esc-grid--small { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 1.25rem; margin-top: 1.1rem; }
.esc-grid--small .esc-card__name { margin-top: .65rem; font-size: 1.15rem; }
.esc-grid--small .esc-card__song { font-size: .92rem; }

/* ---------- Ecrane ---------- */

@media (min-width: 992px) {
    .esc-profile__grid.has-photo { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

@media (max-width: 991.98px) {
    .esc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
    .esc-grid--small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .esc-bar__inner {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        padding: .5rem .75rem .6rem;
    }

    .esc-bar__progress { grid-column: 1 / -1; order: 5; }
    .esc-bar__controls [data-esc-prev] { display: none; }
    body.esc-bar-open { padding-bottom: 132px; }
    body.esc-bar-open #back-to-top { bottom: 144px; }
}

@media (max-width: 575.98px) {
    .esc-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
    .esc-grid--small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .9rem; }
    .esc-head__actions { width: 100%; justify-content: space-between; }
    .esc-track__play { width: 60px; height: 60px; }
    .esc-track__title { font-size: 1.25rem; }
    .esc-cta { padding: 1.2rem; }
    .esc-cta a { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .esc-card__photo img,
    .esc-play,
    .esc-track__play,
    .esc-track__ui { transition: none; }
    .esc-card:hover .esc-card__photo img,
    .esc-play:hover,
    .esc-track__play:hover { transform: none; }
    .esc-eq i { animation: none; transform: scaleY(.7); }
}
