/* Project additions on top of v5 (style.css / inner.css stay untouched so a new v5 drop can be copied over). */

/* flash message (website/includes/alert.blade.php) */
.v5-alert{position:fixed;z-index:1100;top:20px;inset-inline-end:20px;max-width:min(420px,calc(100vw - 32px));display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:12px;font:600 15px/1.6 Cairo,sans-serif;box-shadow:0 12px 32px rgba(16,32,64,.18);color:#fff}
.v5-alert--ok{background:#1F7A4D}
.v5-alert--err{background:#B3261E}
.v5-alert-x{margin-inline-start:auto;background:none;border:0;color:inherit;font-size:22px;line-height:1;cursor:pointer;padding:0 2px}

/* footer newsletter keeps the existing name + email + reCAPTCHA fields */
.v5-nl{display:flex;flex-direction:column;gap:10px}
.v5-nl .foot-19{height:44px} /* v5 sized the input by stretching beside the button; the name row has no button */
.v5-field-error{margin:0;color:#F3B4AE;font-size:13px}

/* v5's blue focus ring (#1F5FBF) is ~2.6:1 on the navy top bar/header/footer; light gold keeps it visible (>3:1) */
.top-1 :focus-visible,.base-2 :focus-visible,.foot-1 :focus-visible,.in-mast :focus-visible{outline-color:var(--gold-l,#E3C77F)}

.top-8{box-sizing:border-box} /* the language switch is a link here; v5 used a <button>, which is border-box by default */

/* ---- Phase 4 ---- inner pages: admin rich text, news detail, Laravel pager */
/* Admin editor HTML (news details, single pages): readable prose, media never overflows, old Bootstrap grid keeps its border-box */
.in-rich{max-width:none;overflow-wrap:anywhere}
.in-rich,.in-rich *,.in-rich ::before,.in-rich ::after{box-sizing:border-box}
.in-rich img,.in-rich video,.in-rich iframe{max-width:100%!important;height:auto}
.in-rich iframe{aspect-ratio:16/9;height:auto!important;width:100%}
.in-rich h1,.in-rich h2,.in-rich h3,.in-rich h4,.in-rich h5{color:var(--navy);font-weight:800;line-height:1.5;margin:28px 0 12px}
.in-rich h1,.in-rich h2{font-size:clamp(22px,2vw,28px)}
.in-rich h3,.in-rich h4,.in-rich h5{font-size:19px}
.in-rich ul,.in-rich ol{margin:0 0 16px;padding-inline-start:1.4em}
.in-rich li{margin-bottom:6px}
.in-rich a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.in-rich table{display:block;width:100%!important;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 20px;font-size:15.5px;line-height:1.7}
.in-rich th,.in-rich td{border:1px solid var(--line);padding:8px 12px;vertical-align:top}
.in-rich th{background:var(--sand);color:var(--navy)}
.in-rich .row{margin-inline:0}
.in-rich .container,.in-rich .container-fluid{width:auto;max-width:100%;padding-inline:0} /* Bootstrap 3 .container has fixed widths; admin HTML sometimes pastes one in */
.in-rich [style*="width"]:not(img):not(table):not(td):not(th){max-width:100%}
.in-article{max-width:900px;display:flex;flex-direction:column;gap:20px;align-items:flex-start}
.in-article-img{margin:0;width:100%}
.in-article-img img{display:block;width:100%;max-height:560px;object-fit:cover;border-radius:24px;background:var(--paper)}
.in-article .in-rich{width:100%}
.in-pg{text-decoration:none}
.in-pager,.in-pg-list{flex-wrap:wrap} /* server pager can have more links than inner.js trims to */
/* publications shelf + detail */
.in-shelf-intro{margin:-8px 0 24px}
.in-book-detail{display:grid;grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:clamp(24px,4vw,56px);align-items:start}
.in-book-detail .in-cover{margin:0}
.in-book-info{display:flex;flex-direction:column;gap:16px}
.in-book-facts{margin:0;display:grid;gap:12px}
.in-book-facts div{display:grid;grid-template-columns:minmax(120px,max-content) minmax(0,1fr);gap:16px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.in-book-facts dt{font-weight:800;color:var(--gold-ink)}
.in-book-facts dd{margin:0;color:var(--navy);overflow-wrap:anywhere}
.in-book-stores-h{margin:0;font-weight:800;color:var(--navy)}
.in-book-stores{display:flex;flex-wrap:wrap;gap:12px;margin:0}
.in-book-stores img{height:44px;width:auto;display:block}
.in-book-summary{margin-top:clamp(32px,4vw,56px)}
.in-book-related{margin-top:clamp(40px,5vw,72px)}
.in-book-related .in-h2{margin-bottom:24px}
.in-book-back{margin:0 0 20px}
@media (max-width:640px){.in-book-detail{grid-template-columns:minmax(0,1fr)}.in-book-detail .in-cover{max-width:220px}}
/* calls for proposals (announcement) */
.in-banner{display:block;width:100%;height:auto;border-radius:24px;margin-bottom:clamp(32px,4vw,48px)}
.in-tag{display:inline-block;margin-inline-start:6px;padding:1px 10px;border-radius:999px;font-size:12.5px;font-weight:700;color:var(--navy);background:color-mix(in srgb,var(--tag) 30%,#fff);border:1px solid var(--tag);vertical-align:middle;white-space:nowrap}
.in-dossier:first-child{border-top:none;padding-top:0}
.in-dossier>h2{margin-bottom:20px}
.in-dossier-img{display:block;max-width:220px;height:auto;border-radius:16px;margin:0 0 20px}
.in-dossier-form{margin-top:24px}
.in-speakers{list-style:none;margin:24px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}
.in-speaker{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px solid var(--line);border-radius:20px;background:#fff;color:var(--navy)}
.in-speaker img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:14px}
.in-speaker span{font-size:14px;color:var(--muted)}
.in-speaker summary{cursor:pointer;font-weight:700;color:var(--blue)}
/* admin single pages (About, Programmes…): sections, embeds, card grids */
.in-banner--full{max-height:320px;object-fit:cover}
.in-toc--pages{margin-bottom:0}
.in-aside nav+.in-aside-h{margin-top:32px}
.in-page-body{min-width:0}
.in-embed{display:block;width:100%;min-height:400px;border:0;overflow:hidden;transition:height .2s}
.in-speakers[style*="--cols"]{grid-template-columns:repeat(auto-fill,minmax(max(200px,calc((100% - (var(--cols) - 1) * 20px) / var(--cols))),1fr))}
/* mobile TOC pills: admin section titles can be a full sentence; let a pill wrap instead of growing to 700px */
@media (max-width:1000px){.in-toc a{white-space:normal;max-width:min(300px,75vw);line-height:1.5}.in-toc{align-items:stretch}}

/* ---- Phase 5 ---- (pages with no v5 design: search, 404, ask the librarian, courses, prize, registration, conference) */
.v5-sr-group+.v5-sr-group{margin-top:clamp(40px,5vw,64px)}
.v5-sr-group .in-files{margin-top:0}
.v5-form-narrow{max-width:880px;margin-inline:auto}
.v5-form-login{max-width:480px;margin-inline:auto;grid-template-columns:minmax(0,1fr)}
/* reCAPTCHA is a fixed 304px iframe; on phones the form's padding leaves less than that */
@media (max-width:400px){.in-form .g-recaptcha{transform:scale(.88);transform-origin:0 0}[dir=rtl] .in-form .g-recaptcha{transform-origin:100% 0}}
/* courses / prize detail: admin header + footer images, wider sidebar, boxed sections, lesson accordion, writer */
.v5-banner{margin:0 0 clamp(32px,4vw,56px)}
.v5-banner img{display:block;width:100%;height:auto;border-radius:24px}
.v5-banner--foot{margin:clamp(40px,5vw,64px) 0 0}
.v5-split-wide{grid-template-columns:320px minmax(0,1fr)}
.v5-side{display:flex;flex-direction:column;gap:18px}
.v5-side-img{display:block;width:100%;height:auto;border-radius:20px}
.v5-side-rich{font-size:15.5px;line-height:1.9;color:#33425C}
.v5-tags{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.v5-tags li{padding:4px 14px;border-radius:999px;background:var(--sand);font-size:14px;font-weight:700;color:var(--gold-ink)}
.v5-box{margin:32px 0 0}
.v5-sec-h{margin:clamp(40px,5vw,56px) 0 20px}
.v5-acc{border-top:2px solid var(--gold)}
.v5-acc details{border-bottom:1px solid var(--sand-line)}
.v5-acc summary{display:flex;justify-content:space-between;gap:16px;padding:18px 4px;font-size:17px;line-height:1.6;font-weight:800;color:var(--navy);cursor:pointer;list-style:none}
.v5-acc summary::-webkit-details-marker{display:none}
.v5-acc summary::after{content:"+";flex:none;font-size:22px;line-height:1.2;color:var(--gold-ink)}
.v5-acc details[open] summary::after{content:"−"}
.v5-acc details>div{padding:0 4px 20px;font-size:16px;line-height:1.9;color:#33425C}
.v5-person{display:grid;grid-template-columns:140px minmax(0,1fr);gap:24px;align-items:start}
.v5-person img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:20px;background:var(--paper)}
.v5-person b{display:block;margin-bottom:8px;font-size:19px;color:var(--navy)}
/* registration badge page: values are e-mails and long names */
.v5-reg{margin:0}
.v5-reg dd{overflow-wrap:anywhere}
@media (max-width:1000px){.v5-split-wide{grid-template-columns:minmax(0,1fr)}}
@media (max-width:640px){.v5-person{grid-template-columns:96px minmax(0,1fr);gap:16px}}

/* ---- Phase 7 ---- Bootstrap 3 is gone from the public site. The single-page form partials (singlePage/contact_us,
   contactUs/{contactUs,custom,registration}) are shared with the admin registration screen, which still needs their
   Bootstrap markup, so the few classes they use get v5 styling here, scoped to single-page sections. */
.in-dossier .row{display:flex;flex-wrap:wrap;gap:0 20px;margin:0;width:100%}
.in-dossier [class*="col-"]{flex:1 1 100%;min-width:0;box-sizing:border-box}
@media (min-width:760px){
  .in-dossier .col-md-2{flex-basis:calc(16.66% - 20px)}.in-dossier .col-md-3{flex-basis:calc(25% - 20px)}
  .in-dossier .col-md-4{flex-basis:calc(33.33% - 20px)}.in-dossier .col-md-5{flex-basis:calc(41.66% - 20px)}
  .in-dossier .col-md-6{flex-basis:calc(50% - 20px)}.in-dossier .col-md-8{flex-basis:calc(66.66% - 20px)}
  .in-dossier .col-md-12{flex-basis:100%}
}
.in-dossier .mb-3,.in-dossier .input_con{margin-bottom:18px}
.in-dossier h3{margin:28px 0 14px;font-size:19px;font-weight:800;color:var(--navy)}
.in-dossier .form-label{display:block;margin-bottom:8px;font-size:15px;font-weight:700;color:var(--navy)}
.in-dossier .form-label.required::after{content:" *";color:#B3261E}
.in-dossier .form-control,.in-dossier .input,.in-dossier textarea{width:100%;box-sizing:border-box;min-height:50px;padding:12px 16px;border:1.5px solid var(--line);border-radius:14px;background:#fff;font:inherit;font-size:16px;color:var(--navy)}
.in-dossier .form-control:focus,.in-dossier .input:focus,.in-dossier textarea:focus{outline:2px solid var(--focus);outline-offset:1px;border-color:var(--blue)}
.in-dossier .form-check{display:inline-flex;align-items:center;gap:8px;margin:0 0 8px;margin-inline-end:20px}
.in-dossier .form-check-label{line-height:1.8}
.in-dossier .text-danger,.in-dossier .invalid-feedback{display:block;margin-top:6px;font-size:13.5px;color:#B3261E}
.in-dossier .pt-5{padding-top:24px}.in-dossier .px-4,.in-dossier .px-3{padding-inline:0}.in-dossier .pb-4{padding-bottom:16px}
.in-dossier .border{border-top:1px solid var(--line);margin:24px 0}
.in-dossier .m_hide,.in-dossier .clear10x,.in-dossier .clear20x{display:none}
.in-dossier .g-recaptcha{margin:8px 0 16px}
/* components/alerts (also used by admin): Bootstrap alert look without Bootstrap */
.alert{position:relative;margin:0 0 20px;padding:14px 48px 14px 18px;border-radius:14px;font-weight:600;line-height:1.7}
[dir=rtl] .alert{padding:14px 18px 14px 48px}
.alert-success{background:#E7F4EC;color:#1F5E3B}.alert-danger{background:#FBE9E7;color:#8C1D18}
.alert .close{position:absolute;top:10px;inset-inline-end:12px;background:none;border:0;font-size:22px;line-height:1;color:inherit;cursor:pointer}
/* single-page gallery section: file cards use .in-grid/.in-card; the image strip replaces the owl carousel */
.v5-gallery-files{margin-bottom:24px}
.v5-gallery-strip{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:12px;overscroll-behavior-x:contain}
.v5-gallery-strip a{flex:0 0 min(420px,80%);scroll-snap-align:start}
.v5-gallery-strip img{display:block;width:100%;height:clamp(220px,28vw,340px);object-fit:cover;border-radius:20px;background:var(--paper)}

/* ---- Phase 3 ---- homepage: admin slideshow headings are long sentences, not the 6-word v5 title */
.hero-5.hero-long,.hero-20.hero-long{font-size:clamp(28px,4.4vw,52px);line-height:1.5}

/* ---- Production data ---- the admin menu has 8 top items (v5 has 5) and the admin logo is wider than the v5 one */
.top-4 img{max-height:30px;width:auto;vertical-align:middle}
.about-17{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
@media (min-width:1001px){
  .nav-7{min-width:max-content;gap:clamp(8px,1.1vw,18px)} /* items keep their width; the search box shrinks instead of overlapping them */
}
/* inner.js adds .is-tight when the admin menu and the full search box don't fit: show the round search button; the field drops down below the header, right-aligned */
@media (min-width:1001px){
  .nav-2.is-tight{position:relative;gap:clamp(14px,1.8vw,24px)}
  .is-tight .nav-7{gap:clamp(8px,0.9vw,10px)}
  /* last resort: the wide English admin logo shrinks only when even the compact search does not fit */
  .is-tight .nav-3{flex-shrink:1;min-width:0}
  .is-tight .nav-4{max-width:100%;object-fit:contain;object-position:left}
  [dir=rtl] .is-tight .nav-4{object-position:right}
  .is-tight .nav-13{width:46px;min-width:46px;padding:3px;justify-content:center}
  .is-tight .nav-14{position:absolute;width:0;opacity:0;pointer-events:none}
  .is-tight .nav-13:focus-within .nav-14{top:calc(100% + 8px);right:0;width:min(340px,90vw);height:48px;padding:0 18px;opacity:1;pointer-events:auto;border:1px solid rgba(186,147,54,.6);border-radius:999px;background:var(--navy,#0B1F3A);box-shadow:0 18px 40px rgba(0,0,0,.35);z-index:20}
  [dir=rtl] .is-tight .nav-13:focus-within .nav-14{right:auto;left:0}
}

/* ---- Inner pages ---- v5 sets the cream background through [data-gl] around <main> */
.in-body{background:#FAF6EE}
/* About (establishment-of-gaserc): admin rich text styled like v5 about.html — bold paragraphs act as section headings, the <ol> is the tasks list, the image paragraph is the org chart */
.in-about .in-rich{font-size:17px;line-height:1.95;color:#33425C}
.in-about .in-rich *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;text-align:start!important}
.in-about .in-rich :is(p,div){margin:0 0 18px;max-width:74ch}
.in-about .in-rich :is(p,div):has(strong):not(:has(img)){max-width:none;margin:clamp(40px,5vw,72px) 0 24px;font-size:clamp(26px,2.4vw,34px)!important;line-height:1.4!important;font-weight:800;color:var(--navy)}
.in-about .in-rich :is(p,div):has(strong):not(:has(img)):nth-child(-n+3){margin-top:0}
.in-about .in-rich ol{list-style:none;margin:8px 0 0;padding:0;counter-reset:task;border-top:2px solid var(--gold)}
.in-about .in-rich ol li{counter-increment:task;position:relative;padding-inline-start:72px!important;margin:0;padding:18px 0;border-bottom:1px solid var(--sand-line);max-width:84ch}
.in-about .in-rich ol li::before{content:counter(task,decimal-leading-zero);position:absolute;inset-inline-start:0;top:18px;font-size:15px;font-weight:800;line-height:2.3;color:var(--gold-ink)}
.in-about .in-rich :is(p,div):has(img){max-width:none;margin-top:24px;padding:clamp(24px,3vw,40px);background:#fff;border:1px solid var(--sand-line);border-radius:24px;text-align:center!important}
.in-about .in-rich :is(p,div):has(img) img{width:100%!important;margin:0 auto}
@media (max-width:640px){.in-about .in-rich ol li{padding-inline-start:48px!important;font-size:16px}}
/* pages embedded in a single-page section (?iframe=1): the parent page gives the title and spacing; no site JS there, so no title search */
.is-embed .in-body{padding:0 0 8px}
.is-embed .in-wrap{padding:0}
.is-embed .in-tools{display:none}
