/*
Theme Name: EPSER Child
Theme URI: https://www.ju.edu.jo/
Template: epser-theme
Author: EPSER Website Team
Description: Child theme for the EPSER Research Group parent theme. Page template overrides, structured metadata display, the Journal/Conference publication taxonomy, reference-based Members and Publications designs, collaboration logo placeholders, Back to Top, and typography corrections (18px navigation, 17.5px minimum), justified long text, and high-contrast text colours. The parent theme is never modified.
Version: 1.7.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: epser-child
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

.section-heading { border-bottom: 2px solid var(--blue); padding-bottom: 12px; margin-bottom: 30px; font-family: var(--serif); font-size: 2rem; color: var(--blue); }

/* === EPSER Links — list layout === */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}
.link-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--white);
}
.link-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.link-item-header h3 {
    font-size: 1.4rem;
    color: var(--blue);
    margin: 0;
}
.link-external {
    background: var(--accent);
    color: var(--blue-deep);
    font-size: 17.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}
.link-description {
    color: var(--muted);
    font-size: 17.5px;
    line-height: 1.6;
    margin: 0;
}
.link-url {
    font-size: 17.5px;
    word-break: break-all;
    margin-top: 4px;
}
@media (max-width: 600px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* === EPSER Contact Us — map === */
.map-section {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--line);
}
.map-section h2 {
    font-size: 2rem;
    color: var(--blue);
    margin-bottom: 12px;
}
.map-section p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 24px;
}
.map-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(23, 59, 87, 0.12);
}
.map-wrapper iframe {
    width: 100%;
    height: 450px;
    border: 0;
    border-radius: 8px;
}
.map-credit {
    text-align: center;
    font-size: 17.5px;
    color: var(--muted);
    margin-top: 12px;
}
.map-credit a {
    color: var(--blue);
    text-decoration: underline;
}

/* ===== MEMBERS: vertical card per reference, details collapsed ===== */
.members-section { margin-bottom: 60px; }
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 32px 24px; align-items: start; }
.member-card { min-width: 0; background: var(--white); }
.member-photo-wrap { aspect-ratio: 377 / 415; overflow: hidden; background: linear-gradient(145deg, var(--blue-soft), var(--neutral)); }
.member-photo-wrap img.member-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-photo.placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 17.5px; }
.member-card-main { padding-top: 22px; min-width: 0; }
.member-position { margin: 0 0 6px; font-size: 17.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); line-height: 1.4; overflow-wrap: anywhere; }
.member-name { margin: 0 0 12px; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1.25; color: var(--blue); overflow-wrap: anywhere; }
.member-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 17.5px; font-weight: 700; cursor: pointer; }
.member-toggle:hover .member-toggle-label { text-decoration: underline; }
.member-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.member-toggle-arrow { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; flex: none; }
.member-toggle[aria-expanded="true"] .member-toggle-arrow { transform: rotate(225deg) translate(-2px, -2px); }
.member-card-body { padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line); }
.member-card-body[hidden] { display: none; }
.member-bio p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; font-size: 17.5px; }
.member-detail { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--neutral); color: var(--ink); font-size: 17.5px; overflow-wrap: anywhere; }
.member-detail strong { display: block; color: var(--blue); font-size: 17.5px; }
.profile-links { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--neutral); }
.profile-links li { padding: 6px 0; font-size: 17.5px; overflow-wrap: anywhere; }
.profile-links a { color: var(--blue); text-decoration: underline; }

/* ===== PUBLICATIONS: filter panel + list per reference (also Home) ===== */
.pub-filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 24px; background: var(--neutral); }
.pub-filter-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pub-filter label { font-size: 17.5px; font-weight: 700; color: var(--blue); }
.pub-filter input, .pub-filter select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: 17.5px; border-radius: 0; box-sizing: border-box; }
.pub-filter input:focus-visible, .pub-filter select:focus-visible, .pub-reset:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pub-reset { min-height: 48px; padding: 10px 22px; border: 1px solid var(--blue); background: transparent; color: var(--blue); font: inherit; font-size: 17.5px; font-weight: 700; cursor: pointer; }
.pub-reset:hover { background: var(--blue); color: var(--white); }
.pub-count { margin: 28px 0 0; color: var(--muted); font-size: 17.5px; }
.pub-list { border-top: 1px solid var(--line); margin-top: 12px; }
.pub-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 28px 10px; border-bottom: 1px solid var(--line); }
.pub-row[hidden] { display: none; }
.pub-row-year { font-family: var(--serif); font-size: 1.35rem; color: var(--blue); }
.pub-row-title { margin: 0 0 8px; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.pub-row-title a { color: var(--ink); }
.pub-row-title a:hover { color: var(--blue); text-decoration: underline; }
.pub-row-meta { margin: 0 0 12px; color: var(--muted); font-size: 17.5px; overflow-wrap: anywhere; }
.pub-row-link { color: var(--blue); font-size: 17.5px; font-weight: 700; }
.pub-row-link:hover { text-decoration: underline; }
.publications-list .content-empty { margin-top: 28px; }
.publications-list .content-empty[hidden] { display: none; }

/* ===== SPONSORS & COLLABORATIONS: logo/placeholder beside name ===== */
.sponsors-grid, .collaborations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.sponsor-item, .collaboration-item { display: flex; align-items: flex-start; gap: 24px; padding: 24px; border: 1px solid var(--line); background: var(--white); min-width: 0; }
.sponsor-content, .collaboration-content { min-width: 0; flex: 1; }
.sponsor-content h3, .collaboration-content h3 { margin: 0 0 8px; overflow-wrap: anywhere; }
.sponsor-description, .collaboration-description { margin: 0 0 16px; color: var(--muted); }
.logo-box { flex: none; width: 120px; height: 90px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--blue-soft), var(--neutral)); overflow: hidden; }
.logo-box img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; display: block; background: var(--white); padding: 6px; box-sizing: border-box; }
.logo-box .logo-placeholder { color: var(--muted); font-size: 17.5px; font-weight: 600; letter-spacing: .04em; }

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 50; width: 54px; height: 54px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--blue); color: var(--white); box-shadow: 0 8px 22px rgba(16,47,70,.28); cursor: pointer; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--blue-deep); }
.back-to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .back-to-top, .member-toggle-arrow { transition: none; } }

/* ===== HEADER: use available width; hamburger before overflow ===== */
.header-inner { width: min(1320px, calc(100% - 48px)); gap: clamp(32px, 4vw, 72px); }
.brand { flex: 0 0 auto; white-space: nowrap; }
.nav { flex: 0 1 auto; margin-left: auto; min-width: 0; gap: clamp(10px, 1.1vw, 22px); }
.nav > a, .nav > li, .nav-dropdown > a { white-space: nowrap; }

/* ===== JOIN EPSER: compact lime box, dark bold text (reference) ===== */
.join-green, .nav > li > a[href*="join-epser"] { width: auto; min-height: 44px; padding: 10px 22px; background: #d1e259; border: 1px solid #d1e259; border-radius: 2px; color: #1c2f45 !important; font-weight: 700; letter-spacing: 0; text-align: center; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.join-green:hover, .nav > li > a[href*="join-epser"]:hover { background: #c5d84c; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,47,70,.18); }
.join-green:focus-visible, .nav > li > a[href*="join-epser"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.join-green:active { transform: none; }

@media (max-width: 1320px) {
  .menu { display: block; margin-left: auto; }
  .nav { margin-left: 0; display: none; position: absolute; top: 84px; left: 0; right: 0; background: var(--white); padding: 18px 24px 28px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; box-shadow: var(--shadow); white-space: normal; }
  .nav.open { display: flex; }
  .nav > a:not(.button) { padding: 14px 0; }
  .nav > li { width: 100%; }
  .nav > li > a { padding: 14px 0; }
  .nav-dropdown { padding: 0; }
  .nav-dropdown > a { display: block; padding: 14px 0; }
  .dropdown-menu { display: flex; position: static; box-shadow: none; padding: 0 0 8px 14px; }
  .dropdown-menu a { padding: 8px 0; }
  .nav > a.join-green, .nav > li > a[href*="join-epser"] { margin: 14px 0 0; width: 100%; }
}
@media (max-width: 680px) { .nav { top: 72px; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .pub-filter { grid-template-columns: 1fr 1fr; }
  .pub-filter-search { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .pub-filter { grid-template-columns: 1fr; padding: 18px; }
  .pub-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .member-name { font-size: 1.4rem; }
  .sponsor-item, .collaboration-item { flex-direction: column; padding: 20px; }
  .logo-box { width: 100%; max-width: 160px; }
}

/* Sponsors: sample cards (layout preview only) */
.sponsor-sample { border-style: dashed; background: var(--neutral); }
.sample-badge { display: inline-block; margin-bottom: 8px; padding: 3px 10px; background: var(--white); border: 1px solid var(--line); color: var(--muted); font-size: 17.5px; font-weight: 600; }

/* =====================================================================
 * Rev 1.2 (2026-11-03)
 * ================================================================== */

/* --- Back to Top: slightly larger, same design; smaller on phones --- */
.back-to-top svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .back-to-top { width: 48px; height: 48px; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  .back-to-top svg { width: 20px; height: 20px; }
}

/* === Rev 1.3 === */

/* Sponsors: same list layout as Collaborations */
.sponsors-grid { grid-template-columns: 1fr; gap: 48px; }
.sponsor-item { gap: 38px; padding: 0; border: 0; background: transparent; align-items: flex-start; }
.sponsor-item .logo-box { width: 168px; height: auto; background: none; overflow: visible; }
.sponsor-item .logo-box img { width: 100%; height: auto; max-height: none; padding: 0; background: transparent; object-fit: contain; }
.sponsor-item .logo-box .logo-placeholder { width: 100%; aspect-ratio: 1; margin: 0; padding: 0; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue-soft), var(--neutral)); border: 1px dashed #b6c3ca; box-sizing: border-box; }
.sponsor-item .sponsor-content { padding-top: 12px; }

/* Links: old card look, one per row */
.links-grid { grid-template-columns: 1fr; }

@media (max-width: 600px) {
  .sponsors-grid { gap: 40px; }
  .sponsor-item { gap: 18px; }
  .sponsor-item .logo-box { width: 150px; }
  .sponsor-item .sponsor-content { padding-top: 0; }
}

/* === Rev 1.4 === */

/* Header: current page shown in a box */
@media (min-width: 1321px) {
  .nav { gap: 4px; }
  .nav > li { padding-block: 24px; }
  .nav > li > a:not([href*="join-epser"]) { padding: 8px 10px; border-bottom: 0; }
}
.nav > li > a:not([href*="join-epser"]):hover { background: var(--blue-soft); color: var(--blue); }
.nav > li.current-menu-item > a:not([href*="join-epser"]),
.nav > li.current_page_item > a:not([href*="join-epser"]),
.nav > li.current-menu-ancestor > a:not([href*="join-epser"]),
.nav > li.current-page-ancestor > a:not([href*="join-epser"]),
.nav > a.active { background: var(--blue); color: var(--white); }
@media (max-width: 1320px) {
  .nav > li.current-menu-item > a:not([href*="join-epser"]),
  .nav > li.current_page_item > a:not([href*="join-epser"]) { padding-inline: 12px; }
}

/* Header brand: "EPSER" + "Group" */
.header .brand small { font-size: 17.5px; font-weight: 500; letter-spacing: .11em; text-transform: uppercase; color: var(--blue); margin-top: 0; }

/* Footer newsletter */
.footer-newsletter { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 40px; align-items: center; padding: 44px 0; border-top: 1px solid rgba(255,255,255,.12); }
.footer-newsletter h3 { margin: 0 0 10px; font-size: 17.5px; text-transform: uppercase; letter-spacing: .13em; color: #e6edf2; }
.footer-newsletter p { margin: 0; color: #e6edf2; }
.newsletter-form { display: flex; gap: 12px; }
.newsletter-form input[type="email"] { flex: 1; min-width: 0; margin: 0; border: 1px solid #cbd5dc; border-radius: 0; background: var(--white); color: var(--ink); }
.newsletter-form .button { flex: none; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-msg { margin-top: 12px; color: var(--accent); font-weight: 600; }
@media (max-width: 800px) { .footer-newsletter { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; } }
@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* Visitors (Contact Us) */
.visitors-section { padding-top: 0; }
.visitors-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px 24px; }
.visitor-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--white); }
.visitor-flag { width: 40px; height: auto; flex: none; display: block; border: 1px solid var(--line); }
.visitor-code { font-weight: 700; color: var(--blue); letter-spacing: .04em; }
.visitor-count { margin-left: auto; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.visitors-total { margin: 28px 0 0; color: var(--ink); }
.visitors-total strong { color: var(--blue); }

/* === Rev 1.5: Contact form === */
.contact-form-section { padding-top: 0; }
.epser-contact { max-width: 860px; gap: 22px; }
.epser-contact .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: end; }
.epser-contact .form-field { min-width: 0; }
.epser-contact .form-field label { display: block; }
.epser-contact .req { color: #b3261e; }
.epser-contact .form-optional { font-weight: 500; color: var(--ink); }
.epser-contact .form-required-note { margin: 0; color: #b3261e; }
.epser-contact textarea { min-height: 170px; resize: vertical; line-height: 1.6; }
.epser-contact .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { max-width: 860px; margin: 0 0 24px; padding: 16px 20px; font-weight: 600; }
.form-status.form-status-ok { background: #e1efd9; color: #2f6634; border-left: 4px solid #2f6634; }
.form-status.form-status-error { background: #fbe9e7; color: #8a1f17; border-left: 4px solid #8a1f17; }
@media (max-width: 700px) {
  .epser-contact { padding: 25px 20px; }
  .epser-contact .form-row { grid-template-columns: 1fr; }
}

/* Form placed inside the "Research Inquiry" column */
.contact-form-embedded { margin-top: 28px; }
.contact-form-embedded .epser-contact .form-row + .form-row { grid-template-columns: 1fr; }

/* --- Clearer text: faded greys replaced by a near-black navy that fits
       the palette; light text on dark bands brightened to near-white --- */
:root { --muted: #1f2c38; }
::placeholder { color: #4a5865; opacity: 1; }
.affiliation { color: #eef3f6; }
.brand-light small { color: #e6edf2; }
.eyebrow.light { color: #eef3f6; }
.hero-content > p:not(.eyebrow) { color: #f3f7f9; }
.photo-credit { color: rgba(255,255,255,.95); }
.intro-grid p { color: #eef3f6; }
.research-card:hover p, .research-card:hover .card-link, .research-card:hover .index { color: #f3f7f9; }
.project-visual, .news-image { color: rgba(255,255,255,.95); }
.join-cta p { color: #eef3f6; }
.footer-grid h3 { color: #e6edf2; }
.footer-grid p { color: #e6edf2; }
.footer-bottom { color: #d8e2e8; }

/* --- Justified long text. :where() keeps specificity at zero, so the
       editor's own alignment (Align left / center / right, or inline
       text-align) always wins, and italic/bold/links keep working. --- */
:where(.intro-grid, .prose, .entry-content, .member-bio) p {
  text-align: justify;
  text-justify: inter-word;
}
:where(.member-bio) p { hyphens: auto; -webkit-hyphens: auto; }

/* === Rev 1.6 === */

/* Top bar: date & time | place ........ department */
.affiliation { background: #293a56; color: #eef3f6; }
.affiliation-inner { height: auto; min-height: 46px; justify-content: space-between; gap: 24px; }
.affiliation-left { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; }
.affiliation-inner span.affiliation-clock { display: inline-flex; align-items: center; gap: 16px; padding-right: 16px; margin-right: 16px; border-right: 1px solid rgba(255,255,255,.28); white-space: nowrap; }
.affiliation-time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .affiliation-inner { justify-content: flex-start; padding-block: 6px; }
  .affiliation-inner span.affiliation-clock { border-right: 0; margin-right: 0; padding-right: 0; }
  .affiliation-dept { display: none; }
}

/* Members: compact description (16px, tighter spacing) */
.member-card .member-card-body,
.member-card .member-card-body * { font-size: 16px; }
.member-card .member-card-body { padding-top: 10px; margin-top: 6px; }
.member-card .member-bio p,
.member-card .member-bio li { margin: 0 0 8px; line-height: 1.55; }
.member-card .member-bio ul,
.member-card .member-bio ol { margin: 0 0 8px; padding-left: 18px; }
.member-card .member-detail { padding: 5px 0; line-height: 1.5; }

/* News page + Research Projects: horizontal list (as on Sponsors) */
.epser-page-news .news-grid,
#research-projects .project-grid { grid-template-columns: 1fr; gap: 48px; }
.epser-page-news .news-card,
#research-projects .project-card { border: 0; background: transparent; }
.epser-page-news .news-card:hover,
#research-projects .project-card:hover { transform: none; box-shadow: none; }
.epser-page-news .news-card > a,
#research-projects .project-card > a { display: flex; gap: 38px; align-items: flex-start; }
.epser-page-news .news-card > a > img,
.epser-page-news .news-card > a > .project-visual,
#research-projects .project-card > a > img,
#research-projects .project-card > a > .project-visual { flex: none; width: 320px; height: 213px; aspect-ratio: auto; object-fit: cover; }
.epser-page-news .news-card > a > div:last-child,
#research-projects .project-card > a > div:last-child { padding: 6px 0 0; min-width: 0; }
.epser-page-news .news-card > a:hover h3,
#research-projects .project-card > a:hover h3 { text-decoration: underline; }
@media (max-width: 700px) {
  .epser-page-news .news-card > a,
  #research-projects .project-card > a { flex-direction: column; gap: 18px; }
  .epser-page-news .news-card > a > img,
  .epser-page-news .news-card > a > .project-visual,
  #research-projects .project-card > a > img,
  #research-projects .project-card > a > .project-visual { width: 100%; height: auto; aspect-ratio: 3 / 2; }
}

/* === Rev 1.7: Home page News + Projects as horizontal list === */
.home .news-grid,
.home .project-grid { grid-template-columns: 1fr; gap: 48px; }
.home .news-card,
.home .project-card { border: 0; background: transparent; }
.home .news-card:hover,
.home .project-card:hover { transform: none; box-shadow: none; }
.home .news-card > a,
.home .project-card > a { display: flex; gap: 38px; align-items: flex-start; }
.home .news-card > a > img,
.home .news-card > a > .project-visual,
.home .project-card > a > img,
.home .project-card > a > .project-visual { flex: none; width: 320px; height: 213px; aspect-ratio: auto; object-fit: cover; }
.home .news-card > a > div:last-child,
.home .project-card > a > div:last-child { padding: 6px 0 0; min-width: 0; }
.home .news-card > a:hover h3,
.home .project-card > a:hover h3 { text-decoration: underline; }
@media (max-width: 700px) {
  .home .news-card > a,
  .home .project-card > a { flex-direction: column; gap: 18px; }
  .home .news-card > a > img,
  .home .news-card > a > .project-visual,
  .home .project-card > a > img,
  .home .project-card > a > .project-visual { width: 100%; height: auto; aspect-ratio: 3 / 2; }
}

/* === Top bar: compact (optional) === */
.affiliation .affiliation-inner { min-height: 38px; }
.affiliation .affiliation-inner,
.affiliation .affiliation-inner * { font-size: 16.5px; }
/* Top bar aligned with the header edges */
.affiliation .affiliation-inner { width: min(1320px, calc(100% - 48px)); }

/* Brand logo: small in the header, compact in the footer */
.brand-logo { display: block; flex: none; height: 66px; width: auto; max-width: none; }
/* شعار الـ footer: 110px بدل 320px، حتى ينتهي عمود الشعار والنص مع نهاية روابط الأعمدة الأخرى */
.brand-light .brand-logo { height: 170px; }
.brand-light { display: block; margin-bottom: 14px; } /* المسافة بين الشعار والنص تحته */
@media (max-width: 680px) {
  .brand-logo { height: 56px; }
}
@media (max-width: 600px) {
  .brand-light .brand-logo { height: 90px; } /* الجوال */
}

/* محاذاة أعمدة الـ footer من الأعلى، حتى لا يُمدّ العمود الأول */
.footer-grid { align-items: start; }

/* --- Collaborations: logo size and order per the reference
       (logo on the left at ~168px wide, natural proportions; name on the
       right; one institution per row in order UJ, PSUT, BAU, AHU) --- */
.collaborations-grid { grid-template-columns: 1fr; gap: 48px; }
.collaboration-item { gap: 38px; padding: 0; border: 0; background: transparent; align-items: flex-start; }
.collaboration-item .logo-box { width: 168px; height: auto; background: none; overflow: visible; }
.collaboration-item .logo-box img { width: 100%; height: auto; max-height: none; padding: 0; background: transparent; object-fit: contain; }
.collaboration-item .logo-box .logo-placeholder { width: 100%; aspect-ratio: 1; margin: 0; padding: 0; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue-soft), var(--neutral)); border: 1px dashed #b6c3ca; box-sizing: border-box; }
.collaboration-item .collaboration-content { padding-top: 12px; }
@media (max-width: 600px) {
  .collaborations-grid { gap: 40px; }
  .collaboration-item { gap: 18px; }
  .collaboration-item .logo-box { width: 150px; }
  .collaboration-item .collaboration-content { padding-top: 0; }
}

/* Footer credit */
.footer-credit { padding-top: 14px; text-align: center; color: #c5d3dc; }
.footer-credit a { color: var(--accent); font-weight: 600; }
.footer-credit a:hover { text-decoration: underline; }