/* ==========================================================================
   Rallye des Fennecs — inner pages: page hero, route stages, programme
   timeline, rules, forms, gallery, news, contact, 404.
   ========================================================================== */

/* ---------- Page hero ---------- */
.pagehero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #fff; min-height: clamp(380px, 62vh, 620px); display: flex; align-items: flex-end; padding: calc(var(--topbar-h) + 60px) 0 clamp(70px, 8vw, 120px); }
.pagehero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.pagehero__media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; filter: saturate(1.1) contrast(1.05); }
.pagehero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 11, 10, .75), rgba(13, 11, 10, .25) 40%, rgba(13, 11, 10, .88)), linear-gradient(90deg, rgba(13, 11, 10, .6), transparent 70%); }
[dir="rtl"] .pagehero__media::after { background: linear-gradient(180deg, rgba(13, 11, 10, .75), rgba(13, 11, 10, .25) 40%, rgba(13, 11, 10, .88)), linear-gradient(270deg, rgba(13, 11, 10, .6), transparent 70%); }
.pagehero__inner { position: relative; z-index: 2; }
.pagehero__title { font: 800 clamp(2.1rem, 5.6vw, 5rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: -.03em; max-width: 18ch; text-shadow: 0 8px 36px rgba(0, 0, 0, .5); }
body.rdf-lang-ar .pagehero__title { line-height: 1.4; max-width: 22ch; }
.pagehero__lead { margin-top: 1.2rem; max-width: 64ch; font-size: clamp(1rem, 1.3vw, 1.15rem); color: rgba(255, 255, 255, .86); }
.pagehero__actions { margin-top: 1.6rem; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Route: stage list ---------- */
.stagelist .container { display: grid; gap: 22px; }
.stage { position: relative; display: grid; grid-template-columns: minmax(200px, 300px) 1fr minmax(180px, 230px); gap: clamp(18px, 3vw, 36px); align-items: stretch; padding: 14px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 24px 50px -36px rgba(0, 0, 0, .5); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.stage:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -34px rgba(0, 0, 0, .55); }
.stage__media { position: relative; border-radius: calc(var(--radius-lg) - 8px); overflow: hidden; min-height: 220px; background: var(--coal); }
.stage__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stage:hover .stage__media img { transform: scale(1.07); }
.stage__n { position: absolute; inset: 14px auto auto 14px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--red); color: #fff; font: 800 1.5rem/1 var(--f-display); box-shadow: 0 10px 24px -8px rgba(226, 57, 27, .8); transform: skewX(-8deg); }
[dir="rtl"] .stage__n { inset: 14px 14px auto auto; }
.stage__body { padding: 14px 6px 10px; display: flex; flex-direction: column; gap: 10px; }
.stage__meta { font: 700 .66rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.stage__title { font: 800 clamp(1.25rem, 2.2vw, 1.9rem)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
body.rdf-lang-ar .stage__title { text-transform: none; }
.stage__type { font-weight: 800; color: var(--ink); }
.stage__body p:not(.stage__meta):not(.stage__type) { color: var(--muted-dark); font-size: .96rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border-radius: 999px; background: var(--paper-2); font-size: .74rem; font-weight: 800; }
.kpis { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-dark); }
.kpis dt { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); }
.kpis dd { font-size: .8rem; color: var(--muted-dark); }
.kpis dd b { font: 800 1.35rem/1.2 var(--f-display); color: var(--ink); letter-spacing: -.02em; }
.stage__map { align-self: center; width: 100%; height: auto; padding: 8px; border-radius: 18px; background: var(--ink); overflow: visible; }
.stage--return { background: #fff; }
@media (max-width: 980px) { .stage { grid-template-columns: 1fr 1fr; } .stage__body { grid-column: 1 / -1; grid-row: 2; } .stage__map { max-width: 260px; justify-self: center; } }
@media (max-width: 560px) { .stage { grid-template-columns: 1fr; } .stage__map { justify-self: stretch; max-width: none; } }

/* ---------- Programme timeline ---------- */
.program { background: var(--paper); }
.timeline { position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 62px; width: 3px; background: repeating-linear-gradient(180deg, var(--red) 0 12px, transparent 12px 20px); opacity: .5; }
.tl { position: relative; display: grid; grid-template-columns: 126px 1fr; gap: 22px; align-items: start; }
.tl__date { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 126px; padding: 14px 8px; border-radius: 18px; background: var(--ink); color: #fff; text-align: center; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.tl__date small { font: 700 .6rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--fox-2); }
.tl__date b { font: 800 2.6rem/1.05 var(--f-display); letter-spacing: -.04em; }
.tl__date span { font-size: .72rem; color: var(--muted); }
.tl--welcome .tl__date { background: var(--red); }
.tl--welcome .tl__date small, .tl--welcome .tl__date span { color: #fff; }
.tl__card { padding: 22px 24px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 20px 44px -34px rgba(0, 0, 0, .5); transition: transform .4s var(--ease); min-width: 0; }
.tl:hover .tl__card { transform: translateX(6px); }
[dir="rtl"] .tl:hover .tl__card { transform: translateX(-6px); }
.tl__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.tl__stage { font: 700 .64rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.tl__card h2 { font: 800 clamp(1.05rem, 1.8vw, 1.45rem)/1.15 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
body.rdf-lang-ar .tl__card h2 { text-transform: none; }
.tl__map { width: 130px; height: 62px; flex: none; overflow: visible; }
.tl__map path { fill: none; stroke: var(--red); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; }
.tl__map circle { fill: var(--ink); } .tl__map circle.end { fill: var(--red); }
.tl__items {
	display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--red) var(--paper);
}
.tl__items::-webkit-scrollbar { height: 6px; }
.tl__items::-webkit-scrollbar-track { background: var(--paper); border-radius: 6px; }
.tl__items::-webkit-scrollbar-thumb { background: var(--red); border-radius: 6px; }
.tl__items li { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--paper); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.tl__items time { font: 800 .74rem/1 var(--f-display); color: var(--red); min-width: 56px; white-space: nowrap; }
.tl__ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--ink); color: var(--fox-2); }
.tl__ico .ico { width: 16px; height: 16px; }
@media (max-width: 720px) {
	.timeline::before { inset-inline-start: 6px; }
	.tl { grid-template-columns: 1fr; gap: 10px; padding-inline-start: 22px; }
	.tl__date { width: auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 16px; border-radius: 14px; text-align: start; }
	.tl__date b { font-size: 1.7rem; }
	.tl__map { display: none; }
	.tl__items { flex-direction: column; align-items: stretch; overflow-x: visible; padding-bottom: 0; }
	.tl__items li { white-space: normal; }
	.tl__items .tl__ico { order: -1; }
	.tl__items time { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.2; }
	.tl__time-sep { display: none; }
}

/* ---------- Rules ---------- */
.rules .container > * + * { margin-top: clamp(26px, 3.5vw, 44px); }
.rules .h3 { margin-bottom: 4px; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.key { padding: 24px; border-radius: var(--radius); background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.key::after { content: ""; position: absolute; inset: auto -30px -30px auto; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(226, 57, 27, .4), transparent 70%); }
.key__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--red); margin-bottom: 16px; }
.key h3 { font: 700 .9rem/1.2 var(--f-display); text-transform: uppercase; margin-bottom: 8px; }
body.rdf-lang-ar .key h3 { text-transform: none; font-size: 1.05rem; }
.key p { font-size: .88rem; color: var(--muted); }
.rules__cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.rules__cols--b { grid-template-columns: 1fr 1.3fr; }
.rcard { padding: clamp(22px, 3vw, 34px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 24px 50px -38px rgba(0, 0, 0, .5); }
.rcard .h3 { margin-bottom: 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: start; padding: 12px 10px; border-bottom: 1px dashed var(--line-dark); vertical-align: middle; font-size: .92rem; }
.table th { width: 96px; white-space: nowrap; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 7px 12px; border-radius: 10px; font: 800 .78rem/1 var(--f-display); transform: skewX(-8deg); }
.badge--red { background: var(--red); color: #fff; }
.points { display: grid; gap: 7px; }
.points li { display: grid; grid-template-columns: 30px 1fr 76px; align-items: center; gap: 12px; }
.points__pos { font: 800 .82rem/1 var(--f-display); color: var(--muted-dark); }
.points__bar { height: 12px; border-radius: 6px; background: var(--paper-2); position: relative; overflow: hidden; }
.points__bar::after { content: ""; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, var(--red), var(--fox)); border-radius: inherit; transform-origin: left; }
[dir="rtl"] .points__bar::after { transform-origin: right; }
.points b { font: 800 1rem/1 var(--f-display); text-align: end; }
.points small { font-size: .6rem; color: var(--muted-dark); }
.rcard .note { margin-top: 16px; }
.rcard--prize { background: linear-gradient(135deg, var(--ink), #2a1a12); color: #fff; border: 0; }
.rcard--prize .h3 .ico { color: var(--fox-2); }
.prizes { display: grid; gap: 14px; }
.prizes li { padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 4px; }
.prizes b { font: 700 .9rem/1.2 var(--f-display); text-transform: uppercase; color: var(--fox-2); }
body.rdf-lang-ar .prizes b { text-transform: none; }
.prizes span { font-size: .9rem; color: var(--muted); }
.officials { display: grid; gap: 0; }
.officials > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px dashed var(--line-dark); }
.officials > div:last-child { border: 0; }
.officials dt { font-size: .82rem; color: var(--muted-dark); }
.officials dd { font-weight: 800; text-align: end; font-size: .9rem; }
.accordion { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
@media (max-width: 720px) { .accordion { grid-template-columns: 1fr; } }
.accordion details { border-radius: 16px; background: #fff; border: 1px solid var(--line-dark); overflow: hidden; transition: box-shadow .3s; }
.accordion details[open] { box-shadow: 0 24px 44px -30px rgba(0, 0, 0, .5); border-color: rgba(226, 57, 27, .4); }
.accordion summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 800; }
.accordion summary::-webkit-details-marker { display: none; }
.acc__n { flex: none; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--fox-2); font: 700 .62rem/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; }
.acc__t { flex: 1; }
.acc__chev { transition: transform .4s var(--ease); color: var(--red); }
details[open] .acc__chev { transform: rotate(180deg); }
.acc__body { padding: 0 22px 22px; color: var(--muted-dark); }
.acc__body > * + * { margin-top: .8rem; }
.acc__body ul { list-style: disc; padding-inline-start: 1.3rem; display: grid; gap: .4rem; }
@supports (interpolate-size: allow-keywords) {
	:root { interpolate-size: allow-keywords; }
	.accordion details::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
	.accordion details[open]::details-content { block-size: auto; }
}
.rulescta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(26px, 4vw, 44px); border-radius: var(--radius-lg); color: #fff; background: repeating-linear-gradient(115deg, var(--red) 0 22px, #d4301a 22px 44px); box-shadow: 0 30px 60px -30px rgba(226, 57, 27, .8); }
.rulescta .h3 { color: #fff; margin-bottom: 6px; }
.rulescta .btn--red { background: #fff; color: var(--ink); box-shadow: none; }
@media (max-width: 1000px) { .keys { grid-template-columns: 1fr 1fr; } .rules__cols, .rules__cols--b { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .keys { grid-template-columns: 1fr; } .officials > div { flex-direction: column; gap: 2px; } .officials dd { text-align: start; } }

/* ---------- Forms ---------- */
.register__grid { display: grid; grid-template-columns: clamp(340px, 30vw, 410px) 1fr; gap: clamp(24px, 3.5vw, 48px); align-items: start; }
.register__form { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.register__side { position: sticky; top: calc(var(--topbar-h) + 22px); }
.sidecard { padding: 26px 24px; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(160deg, #1d1713, #0d0b0a); }
.sidecard .h4 { margin-bottom: 18px; color: var(--fox-2); }
.checklist { display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; font-size: .9rem; }
.checklist .ico { color: #40e07a; margin-top: 2px; }
.sidecard > p { display: flex; gap: 12px; font-size: .84rem; color: var(--muted); padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.sidecard > p .ico { color: var(--fox-2); margin-top: 2px; }
.sidecard__deadline { color: var(--sand) !important; font-weight: 800; }
.form { display: grid; gap: 22px; }
.fset { margin: 0; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 24px 50px -40px rgba(0, 0, 0, .5); min-inline-size: 0; }
.fset legend { display: inline-flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 .76rem/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; margin-inline-start: -6px; }
body.rdf-lang-ar .fset legend { text-transform: none; letter-spacing: 0; font-size: 1rem; padding-inline: 8px 18px; }
.fset__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--red); }
.fset__ico .ico { width: 16px; height: 16px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 22px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field__label { font-size: .8rem; font-weight: 800; letter-spacing: .01em; }
.field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
	width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid #d8cbb5; background: #fffdf9; color: var(--ink); font-size: .95rem; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fox); box-shadow: 0 0 0 4px rgba(255, 122, 26, .2); background: #fff; }
.field input:user-valid:not([type="file"]):not([type="checkbox"]), .field select:user-valid { border-color: rgba(31, 157, 85, .6); }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid, .field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--red); background: #fff6f3; }
.field input[type="date"] {
	position: relative;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23ff7a1a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
	background-repeat: no-repeat;
	background-position: calc(100% - 14px) 50%;
	padding-inline-end: 44px;
}
[dir="rtl"] .field input[type="date"] {
	background-position: 14px 50%;
}
.field input[type="date"]::-webkit-calendar-picker-indicator {
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
	color: transparent;
	background: transparent;
	cursor: pointer;
}
.field__err { min-height: 0; font-size: .78rem; font-weight: 700; color: var(--red); }
.field__err:empty { display: none; }
.select { position: relative; }
.select select { appearance: none; padding-inline-end: 44px; cursor: pointer; }
.select .ico { position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--muted-dark); transition: transform .3s var(--ease); z-index: 2; }
.select.is-open .ico { transform: translateY(-50%) rotate(180deg); color: var(--fox); }
.cs__head { display: flex; align-items: center; width: 100%; height: 52px; padding: 0 44px 0 16px; border: 2px solid var(--line-dark); border-radius: 12px; background: #fff; cursor: pointer; transition: all .2s var(--ease); user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink); }
.select.is-open .cs__head { border-color: var(--fox); box-shadow: 0 0 0 4px rgba(255, 122, 26, .2); }
.select select:focus + .cs__head { border-color: var(--fox); box-shadow: 0 0 0 4px rgba(255, 122, 26, .2); }
.select select:user-invalid + .cs__head, .field.is-invalid .cs__head { border-color: var(--red); background: #fff6f3; }
.cs__text { overflow: hidden; text-overflow: ellipsis; }
.cs__list { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 99; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--line-dark); border-radius: 12px; box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .2s var(--ease); scrollbar-width: thin; scrollbar-color: var(--fox) transparent; }
.cs__list::-webkit-scrollbar { width: 6px; }
.cs__list::-webkit-scrollbar-thumb { background: var(--fox); border-radius: 6px; }
.select.is-open .cs__list { opacity: 1; visibility: visible; transform: none; }
.cs__search { padding: 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; border-radius: 12px 12px 0 0; }
.cs__search input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line-dark); border-radius: 8px; font-size: 0.9rem; outline: none; transition: border-color .2s; }
.cs__search input:focus { border-color: var(--fox); box-shadow: 0 0 0 3px rgba(255, 122, 26, .1); }
.cs__opt { padding: 12px 16px; font-size: .9rem; font-weight: 500; cursor: pointer; color: var(--ink); transition: background .2s, color .2s; }
.cs__opt:hover { background: #fffdf9; color: var(--fox); }
.cs__opt.is-selected { background: #fffdf9; color: var(--fox); font-weight: 800; }
.cs__opt.is-disabled { color: var(--muted); cursor: not-allowed; background: transparent !important; }
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-row > input { flex: 1 1 auto; min-width: 0; }
.phone-row .phone-cc { flex: 0 0 128px; }
.phone-row .phone-cc .cs__head { padding: 0 34px 0 12px; font-size: .92rem; }
.phone-row .phone-cc .ico { inset-inline-end: 10px; }
.phone-row .phone-cc .cs__list { right: auto; width: min(320px, 82vw); text-align: start; }
.file { display: block; cursor: pointer; }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file__ui { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; border: 1.5px dashed #c9b99e; background: #fffdf9; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.file__ui > .ico { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--ink); color: var(--fox-2); }
.file:hover .file__ui { border-color: var(--fox); background: #fff; }
.file input:focus-visible + .file__ui { box-shadow: 0 0 0 4px rgba(255, 122, 26, .3); border-color: var(--fox); }
.file__txt { display: grid; min-width: 0; }
.file__txt b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__txt small { font-size: .72rem; color: var(--muted-dark); }
.field--file.has-file .file__ui { border-style: solid; border-color: var(--green); background: #f2fbf5; }
.field--file.has-file .file__ui > .ico { background: var(--green); color: #fff; }
.field--file.is-invalid .file__ui { border-color: var(--red); background: #fff6f3; }

/* Camera button next to file input */
.file-row { display: flex; gap: 10px; align-items: stretch; }
.file-row .file { flex: 1; min-width: 0; }
.file-row .file__ui { height: 100%; }
.file__cam {
	position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	min-width: 76px; padding: 8px 12px; border: 0; border-radius: 12px; cursor: pointer; color: #fff;
	background: linear-gradient(135deg, var(--ink), #2a1f18); box-shadow: 0 10px 22px -12px rgba(13, 11, 10, .8);
	font: 700 .62rem/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; overflow: hidden;
	transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.file__cam::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--red), #ff5a2a); opacity: 0; transition: opacity .25s; }
.file__cam > * { position: relative; }
.file__cam .ico { width: 22px; height: 22px; color: var(--fox-2); transition: color .25s, transform .3s var(--ease); }
.file__cam:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(226, 57, 27, .8); }
.file__cam:hover::before { opacity: 1; }
.file__cam:hover .ico { color: #fff; transform: scale(1.08); }
.file__cam:focus-visible { outline: 3px solid rgba(255, 122, 26, .55); outline-offset: 2px; }
body.rdf-lang-ar .file__cam { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.file__thumb { width: 38px; height: 38px; flex: none; border-radius: 8px; object-fit: cover; border: 2px solid var(--green); }
.field--file.has-thumb .file__ui > .ico { display: none; }

/* Scanner dialog */
.scanner { width: min(94vw, 760px); max-width: none; max-height: 96dvh; margin: auto; padding: 0; border: 0; border-radius: 24px; background: transparent; color: #fff; overflow: visible; }
.scanner::backdrop { background: rgba(8, 6, 5, .88); backdrop-filter: blur(10px); }
.scanner[open] { animation: popIn .35s var(--ease); }
.scanner [hidden] { display: none !important; }
.scanner__box { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 24px; background: linear-gradient(160deg, #1f1712, #0d0b0a); border: 1px solid rgba(255, 154, 61, .3); box-shadow: 0 40px 100px rgba(0, 0, 0, .7); max-height: 96dvh; }
.scanner__head { display: flex; align-items: center; gap: 12px; }
.scanner__head > div { flex: 1; min-width: 0; }
.scanner__badge { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: linear-gradient(135deg, var(--red), #ff5a2a); }
.scanner__badge .ico { width: 22px; height: 22px; }
.scanner__title { font: 800 1rem/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.scanner__doc { font-size: .8rem; color: var(--sand); margin-top: 3px; }
.scanner__x { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; transition: background .2s, transform .2s; }
.scanner__x:hover { background: var(--red); transform: rotate(90deg); }
.scanner__stage { position: relative; flex: 1 1 auto; aspect-ratio: 4 / 3; max-height: 62dvh; border-radius: 18px; overflow: hidden; background: #000; display: grid; place-items: center; }
.scanner__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner__stage.is-mirror .scanner__video { transform: scaleX(-1); }
.scanner__shot { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); background: #fff; }
.scanner.is-review .scanner__stage { background: repeating-linear-gradient(45deg, #15100c 0 12px, #1b140f 12px 24px); padding: 14px; }
.scanner__frame { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 80%; aspect-ratio: 1.42; border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); pointer-events: none; transition: width .3s var(--ease), height .3s var(--ease); }
.scanner__frame i { position: absolute; width: 34px; height: 34px; border: 4px solid var(--fox); }
.scanner__frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scanner__frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scanner__frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scanner__frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scanner__laser { position: absolute; left: 4%; right: 4%; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--fox-2), transparent); box-shadow: 0 0 14px 2px rgba(255, 122, 26, .7); animation: scanLaser 2.4s ease-in-out infinite alternate; }
.scanner__msg { position: absolute; inset: auto 16px 16px; z-index: 2; padding: 10px 14px; border-radius: 12px; background: rgba(13, 11, 10, .8); backdrop-filter: blur(8px); font-size: .86rem; text-align: center; }
.scanner__stage.is-flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: scanFlash .45s ease-out forwards; pointer-events: none; }
.scanner__hint { font-size: .8rem; color: var(--muted); text-align: center; }
.scanner.is-review .scanner__hint { display: none; }
.scanner__bar { display: grid; }
.scanner__live { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.scanner__tool { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font: 700 .7rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.scanner__tool:last-child { justify-self: end; grid-column: 3; }
.scanner__tool:hover, .scanner__tool[aria-pressed="true"] { background: var(--fox); color: var(--ink); }
.scanner__tool .ico { width: 18px; height: 18px; }
.scanner__shutter { grid-column: 2; width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; cursor: pointer; transition: transform .15s; }
.scanner__shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, var(--red), #ff5a2a); box-shadow: 0 0 24px rgba(255, 90, 42, .6); transition: transform .15s; }
.scanner__shutter:hover span { transform: scale(.92); }
.scanner__shutter:active { transform: scale(.94); }
.scanner__shutter:disabled { opacity: .4; cursor: wait; }
.scanner__review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.scanner__enh { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--sand); cursor: pointer; }
.scanner__enh input { width: 18px; height: 18px; accent-color: var(--fox); }
body.rdf-lang-ar .scanner__title, body.rdf-lang-ar .scanner__tool { text-transform: none; letter-spacing: 0; }
body.rdf-lang-ar .scanner__title { font-size: 1.15rem; }
@keyframes scanLaser { from { top: 4%; } to { top: 96%; } }
@keyframes scanFlash { from { opacity: .9; } to { opacity: 0; } }
@media (max-width: 640px) {
	.scanner { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
	.scanner__box { height: 100%; max-height: none; border-radius: 0; border: 0; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
	.scanner__stage { aspect-ratio: auto; max-height: none; flex: 1 1 0; min-height: 0; }
	.scanner__review .btn { flex: 1; justify-content: center; }
	.scanner__enh { order: -1; width: 100%; justify-content: center; }
}
@media (max-width: 420px) { .file__cam { min-width: 62px; padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) { .scanner__laser { animation: none; top: 50%; } .scanner[open] { animation: none; } }
.radios { display: grid; gap: 10px; }
.radio, .check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .92rem; font-weight: 600; }
.radio { padding: 14px 16px; border-radius: 12px; border: 1.5px solid #d8cbb5; background: #fffdf9; transition: border-color .2s, background-color .2s; }
.radio:has(input:checked) { border-color: var(--red); background: #fff6f3; }
.radio input, .check input { accent-color: var(--red); width: 20px; height: 20px; margin-top: 2px; flex: none; }
.field--check { padding: 16px 18px; border-radius: 14px; background: var(--paper-2); }
.form__submit { justify-self: start; }
.form__submit[disabled] { opacity: .7; }
.notice { margin-bottom: 18px; padding: 14px 18px; border-radius: 12px; background: var(--paper-2); font-weight: 700; color: var(--ink); border: 1px solid var(--line-dark); }
.notice--error { background: #fff0ec; border-color: rgba(226, 57, 27, .4); color: #a2200a; }
.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: clamp(34px, 5vw, 64px) clamp(20px, 4vw, 40px); border-radius: var(--radius-lg); background: linear-gradient(145deg, #ffffff, #fdfbf7); border: 1px solid rgba(31, 157, 85, .25); box-shadow: 0 40px 80px -30px rgba(31, 157, 85, .15), 0 10px 20px -10px rgba(0, 0, 0, .05); animation: popIn .6s var(--ease); }
.success p { font-weight: 700; font-size: 1.15rem; color: var(--ink); margin: 0; }
.success__ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--green), #26b966); color: #fff; box-shadow: 0 12px 24px -8px rgba(31, 157, 85, .6), 0 0 0 8px rgba(31, 157, 85, .12); flex: none; margin-bottom: 8px; }
.success__ico .ico { width: 30px; height: 30px; stroke-width: 3; color: #fff; }
.success__ref { display: inline-block; padding: 6px 16px; border-radius: 10px; background: var(--ink); color: var(--fox-2); font-family: var(--f-display); font-size: 1.1rem; letter-spacing: 1px; }

.recap-card { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 14px; padding: 18px 16px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); }
.recap-card__head { display: flex; align-items: center; gap: 14px; }
.recap-card__ico { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 13px; background: #fffdf9; border: 1px solid var(--line); color: var(--fox); }
.recap-card__ico .ico { width: 22px; height: 22px; }
.recap-card__title { display: grid; gap: 4px; }
.recap-card__tag { justify-self: start; padding: 3px 8px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); font: 700 .55rem/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); }
.recap-card h3 { font: 800 .95rem/1.15 var(--f-display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); margin: 0; }
.recap-card__figures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.recap-card__fig { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.recap-card__fig dt { font: 700 .55rem/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark); }
.recap-card__fig dd { margin: 0; font: 700 .85rem/1.3 var(--f-body); color: var(--ink); overflow-wrap: anywhere; }
.recap-card__fig--full { grid-column: 1 / -1; }
.recap-card__note { font-size: .8rem; color: var(--muted-dark); margin: 0; padding-top: 12px; border-top: 1px dashed var(--line); }

@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
@media (max-width: 960px) { .register__grid { grid-template-columns: 1fr; } .register__side { position: static; } }
@media (max-width: 600px) { .fgrid { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery { padding-top: clamp(50px, 6vw, 90px); }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); grid-auto-flow: dense; gap: 16px; }
.gitem:nth-child(5n + 1) { grid-column: span 2; }
.gitem a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--coal); isolation: isolate; box-shadow: 0 24px 40px -30px rgba(0, 0, 0, .6); }
.gitem:nth-child(5n + 1) a { aspect-ratio: auto; height: 100%; min-height: 240px; }
.gitem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gitem a:hover img { transform: scale(1.08); }
.gitem__tag { position: absolute; inset: 14px auto auto 14px; padding: 6px 11px; border-radius: 999px; background: rgba(13, 11, 10, .7); backdrop-filter: blur(8px); font: 700 .58rem/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: #fff; }
[dir="rtl"] .gitem__tag { inset: 14px 14px auto auto; }
.gitem__tag--real { background: var(--red); }
.gitem__cap { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; font-size: .82rem; font-weight: 700; color: #fff; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85)); }
.gitem:target a { outline: 4px solid var(--fox); outline-offset: 4px; }
@media (max-width: 640px) { .gitem:nth-child(5n + 1) { grid-column: span 1; } .gitem:nth-child(5n + 1) a { aspect-ratio: 4 / 3; height: auto; } }
.lightbox { width: min(96vw, 1400px); max-width: none; max-height: 94vh; margin: auto; padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.lightbox::backdrop { background: rgba(8, 6, 5, .92); backdrop-filter: blur(10px); }
.lightbox figure { display: grid; gap: 14px; justify-items: center; }
.lightbox img { max-height: 80vh; width: auto; max-width: 100%; border-radius: 18px; box-shadow: 0 40px 100px rgba(0, 0, 0, .8); animation: popIn .4s var(--ease); }
.lightbox figcaption { font-weight: 700; text-align: center; max-width: 70ch; }
.lb__btn { position: fixed; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .26); color: #fff; backdrop-filter: blur(8px); transition: background-color .2s, transform .3s var(--ease); }
.lb__btn:hover { background: var(--red); transform: scale(1.1); }
.lb__close { top: 20px; inset-inline-end: 20px; }
.lb__prev { top: 50%; inset-inline-start: 20px; translate: 0 -50%; }
.lb__next { top: 50%; inset-inline-end: 20px; translate: 0 -50%; }

/* ---------- News ---------- */
.ncards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.news-empty { grid-column: 1 / -1; justify-self: center; width: min(100%, 560px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: clamp(36px, 6vw, 64px) clamp(22px, 4vw, 48px); margin-block: clamp(10px, 4vw, 40px); background: none; border: 0; box-shadow: none; }
.news-empty__ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--ink); color: var(--fox-2); box-shadow: 0 0 0 10px rgba(255, 122, 26, .12); margin-bottom: 6px; }
.news-empty__ico .ico { width: 38px; height: 38px; }
.news-empty__title { font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.2; }
.news-empty__text { color: var(--muted-dark); line-height: 1.7; max-width: 42ch; margin: 0; }
.news-empty .btn { margin-top: 10px; }
.ncard { border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--line-dark); display: flex; flex-direction: column; box-shadow: 0 24px 44px -34px rgba(0, 0, 0, .5); transition: transform .4s var(--ease); }
.ncard:hover { transform: translateY(-6px); }
.ncard__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.ncard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ncard:hover .ncard__img img { transform: scale(1.07); }
.ncard__body { padding: 22px 24px 26px; display: grid; gap: 10px; }
.ncard time { font: 700 .66rem/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.ncard h2 { font: 800 1.1rem/1.2 var(--f-display); text-transform: uppercase; letter-spacing: -.01em; }
body.rdf-lang-ar .ncard h2 { text-transform: none; font-size: 1.25rem; }
.ncard p { color: var(--muted-dark); font-size: .92rem; }
.more { display: inline-flex; align-items: center; gap: 8px; font: 700 .7rem/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.more .ico { transition: transform .3s var(--ease); }
.more:hover .ico { transform: translateX(5px); }
.article__wrap { max-width: 820px; display: grid; gap: 28px; }
.article__img img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }
.prose { font-size: 1.05rem; color: #2a2420; }
.prose > * + * { margin-top: 1.1rem; }
.prose ul { list-style: disc; padding-inline-start: 1.4rem; display: grid; gap: .4rem; }
.prose a { color: var(--red); text-decoration: underline; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.contact__info > * + * { margin-top: 24px; }
.ccards { display: grid; gap: 14px; }
.ccard { display: flex; gap: 18px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line-dark); }
.ccard img { width: 96px; flex: none; border-radius: 10px; }
.ccard div { display: grid; gap: 4px; }
.ccard b { font-size: .95rem; }
.ccard span { font-size: .84rem; color: var(--muted-dark); }
.clinks { display: grid; gap: 12px; }
.clinks li { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.clinks .ico { color: var(--fox-2); width: 1.5em; height: 1.5em; }
.clinks span { display: grid; }
.clinks small { font: 700 .6rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.clinks a { font-weight: 800; }
.clinks a:hover { color: var(--fox-2); }
.contact__form { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.contact__form .form { padding: clamp(22px, 3vw, 36px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line-dark); box-shadow: 0 30px 60px -44px rgba(0, 0, 0, .5); }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.notfound { position: relative; isolation: isolate; min-height: 100svh; display: grid; place-items: center; padding: 120px 0 80px; text-align: center; color: #fff; overflow: hidden; }
.notfound__media { position: absolute; inset: 0; z-index: -1; }
.notfound__media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(1.1); }
.notfound__inner { display: grid; justify-items: center; gap: 18px; }
.notfound__code { font: 800 clamp(6rem, 24vw, 18rem)/.85 var(--f-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 3px rgba(255, 214, 160, .7); }

/* Times keep their left-to-right order inside RTL pages (e.g. 17:00 – 19:00). */
.tl__items time { unicode-bidi: isolate; direction: ltr; }

/* ---------- Flatpickr Theme Overrides ---------- */
.flatpickr-calendar { font-family: inherit; border: 1px solid var(--line-dark); border-radius: 12px; box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15); padding: 10px; background: #fff; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay { background: var(--fox) !important; border-color: var(--fox) !important; color: #fff !important; }
.flatpickr-months .flatpickr-month { color: var(--ink); fill: var(--ink); }
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 800; }
.flatpickr-day { color: var(--coal); border-radius: 8px; }
.flatpickr-day:hover, .flatpickr-day.prevMonthDay:hover, .flatpickr-day.nextMonthDay:hover, .flatpickr-day:focus, .flatpickr-day.prevMonthDay:focus, .flatpickr-day.nextMonthDay:focus { background: var(--paper); border-color: var(--paper); }
