/* ============================================================
   Site-wide overrides & fixes.
   Loaded after each page's inline <style>, so plain-specificity
   rules here win over the per-page copies.
   ============================================================ */

/* Page header (.pagehead) — hold a steady height and background crop
   no matter how long the title / subtitle runs. The text block is
   centred in the band, so a one-line and a three-line header match. */
.pagehead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-height: 300px;
  padding-top: 52px;
  padding-bottom: 52px;
}

.pagehead>.wrap {
  width: 100%
}

/* fill the track; its own max-width + margin:auto still centre it */

@media (max-width: 640px) {
  .pagehead {
    min-height: 0;
    padding-top: 40px;
    padding-bottom: 36px;
  }
}

/* Breadcrumbs added to pages that had none (.auto-crumb) — take the text
   colour of wherever they sit, so they read on dark heroes and light pages. */
.crumb.auto-crumb {
  font-size: .8rem;
  color: inherit;
  opacity: .8;
  margin: 0 0 14px;
  line-height: 1.5
}

.crumb.auto-crumb a {
  color: inherit;
  text-decoration: none
}

.crumb.auto-crumb a:hover {
  text-decoration: underline
}

.auto-crumb-wrap {
  padding-top: 28px
}

/* emails & phone numbers in page text (auto-linked by layout.php, or written as links) */
a.auto-link,
.prose a[href^="mailto:"],
.prose a[href^="tel:"] {
  color: var(--maroon, #8A1C1D);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  unicode-bidi: isolate
}

a.auto-link:hover {
  color: var(--maroon-dk, #6E1516)
}

/* ============================================================
   One page banner (.pagehead) for every page — same size, colour,
   photo tint and type as the "About MEU" banner (the reference).
   Loaded after each page's own CSS, so these win over per-page copies.
   ============================================================ */
.pagehead {
  background: var(--maroon-deep, #4A0E0F) !important;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 0 !important;
  min-height: 300px;
  padding-top: 52px !important;
  padding-bottom: 52px !important
}

.pagehead::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .2
}

/* no default photo: a page that sets none keeps the plain dark maroon, like "About MEU"
   (:where() keeps it weaker than any page rule, so pages with their own photo still show it) */
:where(.pagehead)::after {
  background-image: none
}

.pagehead>.wrap {
  position: relative;
  z-index: 2
}

.pagehead h1 {
  font-size: clamp(2rem, 5vw, 3.1rem) !important;
  line-height: 1.08;
  color: #fff
}

.pagehead .sub {
  color: rgba(255, 255, 255, .9);
  margin-top: 14px;
  max-width: 640px;
  font-size: 1.06rem
}

.pagehead .crumb {
  font-size: .8rem;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 14px
}

@media (max-width:640px) {
  .pagehead {
    min-height: 0;
    padding-top: 40px !important;
    padding-bottom: 36px !important
  }
}

/* department pages: vision / mission / goals (from the MEU CMS) */
.dvmo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px
}

@media(max-width:720px) {
  .dvmo {
    grid-template-columns: 1fr
  }
}

.dvmo-card {
  background: #fff;
  border: 1px solid var(--line, #E2D5D2);
  border-top: 4px solid var(--maroon, #8A1C1D);
  border-radius: 12px;
  padding: 16px 18px
}

.dvmo-card h4 {
  color: var(--maroon, #8A1C1D);
  font-size: 1rem;
  margin-bottom: 6px
}

.dvmo-card p {
  font-size: .94rem;
  line-height: 1.8
}

.dvmo-h3 {
  font-size: 1rem;
  color: var(--maroon-deep, #4A0E0F);
  margin: 20px 0 10px
}

.dvmo-goals {
  padding-inline-start: 22px;
  display: grid;
  gap: 8px;
  font-size: .93rem;
  line-height: 1.75
}

.dvmo-goals b {
  color: var(--maroon-deep, #4A0E0F)
}

/* site search page (/search) */
.ss-sec {
  padding: 40px 0 70px
}

.ss-form {
  display: flex;
  gap: 10px;
  max-width: 760px
}

.ss-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--line, #E2D5D2);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink, #2A2122)
}

.ss-form input:focus {
  outline: none;
  border-color: var(--maroon, #8A1C1D);
  box-shadow: 0 0 0 3px rgba(138, 28, 29, .12)
}

.ss-form button {
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: var(--maroon, #8A1C1D);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer
}

.ss-form button:hover {
  background: var(--maroon-dk, #6E1516)
}

.ss-count {
  margin: 18px 0 8px;
  color: var(--muted, #6E6463);
  font-size: .95rem
}

.ss-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 900px
}

.ss-item {
  display: block;
  padding: 18px 20px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line, #E2D5D2);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s
}

.ss-item:hover {
  border-color: var(--maroon, #8A1C1D);
  box-shadow: 0 8px 22px rgba(74, 14, 15, .08)
}

.ss-title {
  display: block;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--maroon, #8A1C1D)
}

.ss-url {
  display: block;
  font-size: .78rem;
  color: var(--muted, #6E6463);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
  margin: 2px 0 6px
}

.ss-snip {
  display: block;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--grey, #4C4D4E)
}

.ss-snip mark {
  background: rgba(201, 162, 39, .35);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px
}

/* Phones: small caption labels (eyebrows, side-menu headings, login captions) are .68–.76rem
   in the page CSS, about 11px, which is hard to read, especially in Arabic. Raise them to ~13px. */
@media (max-width: 640px) {
  .eyebrow,
  .fmenu-label,
  .sidep .ptitle,
  .pane-menu .grp h6,
  .pane-menu .qmenu h6,
  .login-form label>span,
  .fact .l {
    font-size: .8rem
  }
}

/* Slider dots are 10–11px; give them a finger-sized hit area without changing how they look */
.cdot,
.al-dot {
  position: relative
}

.cdot::after,
.al-dot::after {
  content: "";
  position: absolute;
  inset: -12px -5px
}

.spot-controls button {
  flex: none
}

/* Two-column pages (.layout: side menu + content) stack into one column on small screens. A grid
   column grows to fit its widest child (a wide table, a long word), pushing the page off-screen;
   min-width:0 keeps each column to the screen width. */
@media (max-width: 900px) {
  .layout>* {
    min-width: 0
  }
}
