/* contests_v2.css: loaded AFTER home_v2.css on the contests page. Only what the homepage stylesheet does not already cover. */

/* ───────── hero ───────── */
.pzc .hero-c .hero-media { height: min(70svh, 720px); min-height: 420px }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 26px; margin-top: 20px }
.hero-stats li { display: flex; align-items: baseline; gap: 8px; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .4) }
.hero-stats b { font: 700 clamp(1.5rem, 3vw, 2.1rem)/1 var(--f-d); letter-spacing: -.02em }
.hero-stats span { font: 500 .95rem var(--f-d); opacity: .92 }
@media(max-width:800px) { .hero-stats { justify-content: flex-start } }
@media(max-width:600px) { .pzc .hero-c .hero-media { height: min(78svh, 640px) } .hero-stats { margin-top: 12px; gap: 6px 18px } }

/* ───────── filter bar ───────── */
.cfilter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: clamp(22px, 3vw, 36px) }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px }
.cf-chips button { min-height: 42px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: 600 .92rem var(--f-d); cursor: pointer; transition: background .2s, color .2s, border-color .2s }
.cf-chips button:hover { border-color: var(--teal) }
.cf-chips button.on { background: var(--teal); border-color: var(--teal); color: #fff }
.cf-search input { width: min(100%, 360px); min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 500 .96rem var(--f-d) }
.cf-search input:focus { outline: 3px solid var(--teal); outline-offset: 2px; border-color: var(--teal) }
.cf-empty { text-align: center; color: var(--mute); padding: 28px 0; font: 500 1rem var(--f-d) }
.cp[hidden], .cgroup[hidden], .cf-empty[hidden], .actions[hidden] { display: none }

/* ───────── groups ───────── */
.cgroup + .cgroup { margin-top: clamp(44px, 6vw, 84px) }
.cg-h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: clamp(1.3rem, 2.4vw, 1.85rem); letter-spacing: -.015em }
.cg-h .cnt { font: 700 .9rem var(--f-d); padding: 2px 12px; border-radius: 999px; background: var(--film); color: var(--ink) }
.clist { display: grid; gap: clamp(18px, 2.4vw, 30px) }

/* ───────── one contest ───────── */
.cp { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: start; padding: clamp(16px, 2.6vw, 30px); background: var(--alt); border: 1px solid var(--line); border-radius: 30px 30px 30px 6px; min-width: 0 }
.cp * { min-width: 0 }
.cp.is-closed { background: transparent; border-style: dashed }
.cp.hl { outline: 3px solid var(--film); outline-offset: 4px }
.cp-poster { display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: var(--deco); border-radius: 22px 22px 22px 80px; cursor: zoom-in }
.cp-poster img { width: 100%; height: auto; max-height: 560px; object-fit: contain }
.cp.is-closed .cp-poster img { filter: saturate(.75) }
.cp-poster.ph { aspect-ratio: 4/5; display: grid; place-items: center; cursor: default; background: var(--teal-d); color: rgba(255, 255, 255, .9) }
.cp-poster.ph b { font: 700 clamp(3rem, 8vw, 5rem)/1 var(--f-d); letter-spacing: -.04em }

.cp-main { overflow-wrap: anywhere }
.cp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px }
.cp h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; text-wrap: balance; hyphens: auto; overflow-wrap: anywhere }
.cp-tag { margin-top: 8px; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--ink2) }
.cdn { display: inline-block; max-width: 100%; margin-top: 14px; padding: 7px 16px; border-radius: 999px; background: var(--deco); color: var(--teal-d); font: 600 .98rem var(--f-d); font-variant-numeric: tabular-nums }
.cp.is-closed .cdn { display: none }

.cp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px 22px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line) }
.cp-facts dt { font-size: .82rem; font-weight: 500; color: var(--mute) }
.cp-facts dd { font: 600 1rem/1.35 var(--f-d); overflow-wrap: anywhere }
.lt { display: block; margin-top: 2px; font: 500 .84rem var(--f-d); color: var(--mute) }
.lt:empty { display: none }
.cp .chips { margin-top: 16px }
.cp-desc { margin-top: 16px; color: var(--ink2); overflow-wrap: anywhere }
.cp-desc.is-clamped { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent) }
.cp-desc.is-clamped.open { max-height: none; -webkit-mask-image: none; mask-image: none }
.cp-readmore { margin-top: 6px; font: 600 .95rem var(--f-d) }

.cp .actions { margin-top: 18px }
.cp .actions.sm-row { margin-top: 10px; gap: 8px }
.cp .btn { height: auto; min-height: 46px; padding: 10px 24px; max-width: 100%; white-space: normal; line-height: 1.2 }
.cp .btn.sm { min-height: 38px; padding: 7px 16px }
.cp .btn.is-off { opacity: .65; cursor: default; pointer-events: none }
.cp .mini { margin-top: 12px }

/* ───────── details inside a contest ───────── */
.cp-more { grid-column: 1 / -1; margin-top: 6px; border-top: 1px solid var(--line) }
.acc { border-bottom: 1px solid var(--line) }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 2px; font: 600 1.05rem var(--f-d); cursor: pointer; list-style: none }
.acc summary::-webkit-details-marker { display: none }
.acc summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-right: 4px; border: solid var(--teal); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); transition: transform .25s var(--ease) }
.acc[open] summary::after { transform: rotate(-135deg) }

.pzh ol.prizes { list-style: none; counter-reset: pz; display: grid; gap: 10px; margin-top: 10px }
.prizes li { counter-increment: pz; position: relative; padding: 14px 16px 14px 60px; background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px }
.prizes li::before { content: counter(pz); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--film); color: var(--ink); font: 700 .95rem var(--f-d) }
.prizes b { display: block; font: 600 1.05rem var(--f-d) }
.prizes span { display: block; margin-top: 2px }
.pzh ol.steps-l { list-style: decimal; padding-left: 1.4em; display: grid; gap: 8px }
.pzh ol.tl { list-style: none; border-left: 3px solid var(--film); margin-left: 6px; padding-left: 20px; display: grid; gap: 16px }
.tl li { position: relative }
.tl li::before { content: ""; position: absolute; left: -29px; top: .45em; width: 11px; height: 11px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--teal) }
.tl b { display: block; font: 600 1rem var(--f-d) }
.tl span { display: block }
.tl small { display: block; color: var(--mute); font-size: .92rem }
.pt { display: grid; gap: 8px }
.pt div { display: flex; flex-wrap: wrap; gap: 4px 12px }
.pt dt { color: var(--mute); font-size: .92rem }
.pt dd { font: 600 1rem var(--f-d) }
.qa + .qa { margin-top: 16px }
.qa h4 { font: 600 1rem var(--f-d); color: var(--ink) }
.qa p { margin-top: 4px }

/* ───────── how it works ───────── */
.pzh ol.how { list-style: none; counter-reset: hw; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px }
.how li { counter-increment: hw; position: relative; padding: 64px 22px 24px; background: var(--alt); border: 1px solid var(--line); border-radius: 26px 26px 26px 6px }
.how li:nth-child(2) { border-radius: 26px 26px 6px 26px }
.how li:nth-child(3) { border-radius: 6px 26px 26px 26px }
.how li:nth-child(4) { border-radius: 26px 6px 26px 26px }
.how li::before { content: counter(hw); position: absolute; left: 22px; top: 18px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font: 700 1.05rem var(--f-d) }
.how h3 { font-size: 1.15rem }
.how p { margin-top: 6px; color: var(--ink2) }

/* ───────── enlarged image ───────── */
dialog.lb { border: 0; padding: 0; background: transparent; width: min(96vw, 1100px); max-width: 96vw; max-height: 94dvh; overflow: visible; color: #fff }
dialog.lb[open] { display: grid; gap: 12px; justify-items: center }
dialog.lb::backdrop { background: rgba(8, 16, 13, .8) }
.lb img { max-width: 100%; max-height: 78dvh; width: auto; height: auto; object-fit: contain; border-radius: 6px; background: #fff }
.lb-cap { text-align: center; font: 500 1rem/1.4 var(--f-d); max-width: 70ch; overflow-wrap: anywhere }
.lb-x { position: absolute; right: -4px; top: -48px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer }
@media(max-width:700px) { .lb-x { right: 4px } }

/* ───────── small screens ───────── */
@media(max-width:860px) {
    .cp { grid-template-columns: 1fr }
    .cp-media { max-width: 380px }
    .cp-poster img { max-height: 440px }
}
@media(max-width:420px) {
    .cp { border-radius: 24px 24px 24px 6px }
    .cp .actions .btn:not(.sm) { width: 100% }
    .cf-chips button { padding: 0 14px }
}
@media(prefers-reduced-motion:reduce) { .acc summary::after { transition: none } }


/* ═════════ v2.1: typography, new shapes, certificate marquee, jury cards ═════════ */

/* reading text (rules, regulations, descriptions): a clean sans with comfortable spacing */
.cp .rich, .acc-b { font-family: var(--f-pro); font-weight: 500; font-size: 1rem; line-height: 1.75; color: var(--ink2); overflow-wrap: anywhere }
.acc-b { padding: 2px 2px 24px; max-width: 74ch }
.cp .rich p + p, .acc-b p + p { margin-top: .85em }
.cp .rich strong { font-weight: 700; color: var(--ink) }
.cp .rich h4 { margin: 1.5em 0 .35em; font: 700 1.04rem/1.3 var(--f-d); color: var(--ink); letter-spacing: -.005em }
.cp .rich h4:first-child { margin-top: .2em }
.pzh .cp .rich ul:not([class]), .pzh .cp .rich ol:not([class]) { margin: .7em 0; padding-left: 1.35em }
.pzh .cp .rich ul:not([class]) { list-style: disc }
.pzh .cp .rich ol:not([class]) { list-style: decimal }
.cp .rich ul:not([class]) > li, .cp .rich ol:not([class]) > li { padding-left: .2em }
.cp .rich ul:not([class]) > li + li, .cp .rich ol:not([class]) > li + li { margin-top: .4em }
.cp .rich ul:not([class]) > li::marker, .cp .rich ol:not([class]) > li::marker { color: var(--teal); font-weight: 700 }
.cp-tag { font-family: var(--f-t); font-style: italic }

/* contest panels: each one has its own shape, and every second one is mirrored */
.cp { box-shadow: 0 24px 50px -38px rgba(7, 73, 61, .55) }
.cp.is-open { border-color: rgba(11, 110, 92, .38) }
.cp.is-soon { border-color: rgba(242, 194, 48, .8) }
.clist > .cp:nth-child(4n+1) .cp-poster { border-radius: 22px 22px 22px 96px }
.clist > .cp:nth-child(4n+2) .cp-poster { border-radius: 96px 22px 22px 22px }
.clist > .cp:nth-child(4n+3) .cp-poster { border-radius: 50% 50% 22px 22px / 28% 28% 22px 22px }
.clist > .cp:nth-child(4n+4) .cp-poster { border-radius: 22px 96px 22px 22px }
.clist > .cp:nth-child(4n+3) .cp-poster.ph { border-radius: 50% 50% 22px 22px / 28% 28% 22px 22px }
@media(min-width:861px) {
    .clist > .cp:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 300px) }
    .clist > .cp:nth-child(even) .cp-media { grid-column: 2; grid-row: 1 }
    .clist > .cp:nth-child(even) .cp-main { grid-column: 1; grid-row: 1 }
}
.cp-facts { padding: 18px 20px; background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 22px 22px 22px 6px }
.cp.is-closed .cp-facts { background: transparent }
.cp-facts dt { text-transform: none; letter-spacing: 0 }
.cg-h { position: relative; padding-bottom: 12px }
.cg-h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 4px; background: var(--film) }

/* hero: "closing next" */
.hero-next { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: 100%; margin-top: 20px; padding: 10px 18px; border-radius: 999px 999px 999px 8px; background: rgba(255, 255, 255, .94); color: var(--ink); text-decoration: none; font: 600 .96rem/1.3 var(--f-d); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5) }
.hero-next span:first-child { color: var(--teal-d); font-weight: 700 }
.hero-next b { font-weight: 700; overflow-wrap: anywhere }
.hero-next .hn-t { color: var(--ink2); font-variant-numeric: tabular-nums }
.hero-next:hover { background: var(--film) }
@media(min-width:801px) { .hero-cap .hero-next { align-self: flex-end } }

/* certificates: endless marquee, paused only while the pointer is over it */
.cmarq { overflow: hidden; padding: 12px 0 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent) }
.pzh ul.cmarq-track { list-style: none; display: flex; align-items: flex-start; width: max-content; animation: cmarq var(--dur, 80s) linear infinite; will-change: transform; backface-visibility: hidden }
@keyframes cmarq { to { transform: translate3d(-50%, 0, 0) } }
.cmarq:hover .cmarq-track, .cmarq.is-held .cmarq-track, .cmarq.is-off .cmarq-track, .cmarq:has(a:focus-visible) .cmarq-track { animation-play-state: paused }
.cc { --h: clamp(190px, 24vw, 300px); flex: 0 0 auto; width: min(calc(var(--r) * var(--h)), 84vw); margin-right: clamp(18px, 2.6vw, 34px) }
.cc a, .cc .cc-in { display: block; text-decoration: none; color: inherit }
.cc img { display: block; width: 100%; height: auto; aspect-ratio: var(--r); object-fit: contain; background: #fff; border-radius: 6px; box-shadow: 0 16px 32px -16px rgba(15, 26, 23, .55); transition: transform .35s var(--ease), box-shadow .35s var(--ease) }
.cc a:hover img, .cc a:focus-visible img { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 26px 40px -18px rgba(15, 26, 23, .6) }
.cc a { cursor: pointer }
.cc-t { display: block; margin-top: 12px; font-size: .95rem; line-height: 1.35; overflow-wrap: anywhere }
.cc-t b { display: block; font: 600 .98rem/1.25 var(--f-d) }
.cc-t small { display: block; margin-top: 2px; color: var(--mute); font-size: .9rem }
@media(prefers-reduced-motion:reduce) {
    .cmarq { overflow-x: auto; -webkit-mask-image: none; mask-image: none }
    .pzh ul.cmarq-track { animation: none; width: auto }
    .cc[aria-hidden="true"] { display: none }
}

/* jury inside a contest: cards that handle long roles and country names */
.pzh ul.cj { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 14px }
.cj li { display: flex; min-width: 0 }
.cjcard { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 14px; row-gap: 3px; align-content: start; align-items: start; width: 100%; padding: 14px 16px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 22px 22px 22px 6px; text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .2s }
a.cjcard:hover { transform: translateY(-3px); border-color: var(--teal) }
.cjav { grid-row: 1 / span 3; width: 54px; height: 54px }
.cjav b { font-size: 1.1rem }
.cjn { grid-column: 2; font: 700 1rem/1.25 var(--f-d); color: var(--ink); overflow-wrap: anywhere }
a.cjcard:hover .cjn { text-decoration: underline; text-underline-offset: 3px }
.cjr { grid-column: 2; font: 500 .92rem/1.4 var(--f-pro); color: var(--ink2); overflow-wrap: anywhere }
.cjk { grid-column: 2; justify-self: start; max-width: 100%; margin-top: 4px; padding: 2px 11px; border-radius: 999px; background: var(--deco); color: var(--teal-d); font: 600 .8rem/1.4 var(--f-d); overflow-wrap: anywhere }

/* homepage-style jury and monthly blocks: long names and countries wrap instead of overflowing */
.pzc .juror { width: min(240px, 46%) }
.pzc .juror-in > *, .pzc .month > * { max-width: 100%; overflow-wrap: anywhere }
.pzc .juror-name, .pzc .month-name { text-wrap: balance }

/* featured / curated sets: their own shapes. Big curves only on the TOP corners, so the photographer's
   picture, badge and counts at the bottom are never cut off. */
.pzc .fgrid { --b: clamp(34px, 8vw, 96px) }
.pzc .fcard:nth-child(6n+1) { --rc: var(--b) 8px 22px 22px }
.pzc .fcard:nth-child(6n+2) { --rc: 8px var(--b) 22px 22px }
.pzc .fcard:nth-child(6n+3) { --rc: 50% 50% 22px 22px / 24% 24% 22px 22px }
.pzc .fcard:nth-child(6n+4) { --rc: var(--b) var(--b) 22px 22px }
.pzc .fcard:nth-child(6n+5) { --rc: 0 var(--b) 22px 22px }
.pzc .fcard:nth-child(6n+6) { --rc: var(--b) 0 22px 22px }
.pzc .fcard-img img { max-height: 560px; object-fit: cover }
.pzc .fcard-meta { padding: 64px 24px 22px }
.pzc .who { flex: 1 1 100%; min-width: 0 }
.pzc .who-t { min-width: 0 }
.pzc .who-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere }
.pzc .fcard-meta .badge { flex: none }
@media(max-width:560px) { .pzc .fgrid { columns: 1 } }
.fgrid { transition: opacity .2s }
.pzc .jgal.is-loading, .pzc .fgrid.busy { opacity: .45 }
.pzc .jgal .tile:nth-child(7n+3) { border-radius: 14px 40px 14px 14px }
.pzc .jgal .tile:nth-child(7n+6) { border-radius: 40px 14px 14px 14px }


/* ═════════ v2.2: phone fixes ═════════ */
/* hero: everything lines up on the left on small screens, stats become tidy small blocks */
.hero-stats { gap: 10px 24px }
.hero-stats li { flex-direction: column; align-items: flex-start; gap: 0 }
.hero-stats b { font-size: clamp(1.4rem, 3vw, 2rem) }
.hero-stats span { font-size: .88rem; line-height: 1.25 }
.hero-next { border-radius: 24px 24px 24px 6px }
@media(max-width:800px) {
    .pzc .hero-cap { align-items: flex-start }
    .hero-stats { justify-content: flex-start; gap: 8px 22px }
    .hero-next { margin-top: 14px }
}
@media(max-width:600px) { .hero-stats { margin-top: 12px } .hero-next { padding: 9px 14px; font-size: .9rem } }

/* contest card on a phone: the poster no longer pushes the title off the screen */
@media(max-width:860px) {
    .cp-media { max-width: none }
    .cp-poster:not(.ph) { width: auto; max-width: 100%; display: inline-block }
    .cp-poster img { width: auto; max-width: 100%; max-height: 300px; margin: 0 }
    .cp-poster.ph { aspect-ratio: 16/6; max-width: 100% }
    .cp-poster.ph b { font-size: 2.6rem }
}
@media(max-width:600px) {
    .cp { padding: 14px; gap: 14px }
    .cp-facts { padding: 14px 16px }
    .cp .actions .btn.sm { flex: 1 1 auto }
    .cf-search input { width: 100% }
    .cf-search { flex: 1 1 100% }
    .pzc .jump-btn { min-height: 40px; padding: 0 16px; font-size: .85rem }
    .acc summary { padding: 14px 2px }
    .cjcard { padding: 12px 14px }
}
