/* ahen26 - top of the page: a compact one-row header and a hero that fits the first screen.
   Loaded after redesign.css and j6-compat.css, so it overrides the older float-based header rules.
   To go back to the previous look, remove the <link> of this file in index.php. */

:root { --header-h: 80px; }

/* ---------------------------------------------------------------------
   Header (tablet and desktop): logo | menu | phone | language, one row
   --------------------------------------------------------------------- */
@media (min-width: 768px) {
  header {
    height: var(--header-h);
    min-height: 0;
    padding: 0;
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(16,42,67,.06);
  }
  header .wrapper { height: 100%; }
  header .newheader {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
  }
  header .newheader::after { display: none; }   /* the clearfix would become an empty flex item */
  header .newheader > .moduletable,
  header .newheader > .moduletable_lang {
    float: none;
    clear: none;
    width: auto;
    margin: 0;
    padding: 0;
  }

  header .moduletable.logo { order: 1; flex: 0 0 auto; }
  header .moduletable.logo p { margin: 0; line-height: 0; }
  header .moduletable.logo img { display: block; height: 64px; width: auto; max-width: none; }

  header .moduletable.menu { order: 2; flex: 1 1 auto; display: flex; justify-content: center; }
  header .moduletable.menu ul.nav.menu { display: flex; align-items: center; gap: 2px; }
  header ul.nav.menu li { padding: 0 12px; }
  /* the underline is always there (transparent) so the item does not jump when it turns green */
  header ul.nav.menu li a { display: block; padding: 6px 0; border-bottom: 3px solid transparent; }
  header ul.nav.menu li.current a,
  header ul.nav.menu li.active a,
  header ul.nav.menu li:hover a,
  header ul.nav.menu li:focus a { border-bottom-color: var(--green); }

  header .moduletable.tel { order: 3; flex: 0 0 auto; }
  header .moduletable.tel p { margin: 0; white-space: nowrap; }

  header .moduletable_lang { order: 4; flex: 0 0 auto; }
  header ul.lang-inline { margin: 0; padding: 0; list-style: none; }
  header ul.lang-inline li { float: none; margin: 0; }
  header ul.lang-inline li a { padding: 0; box-sizing: border-box; }

  header a.header-donate { order: 5; flex: 0 0 auto; }
}

/* narrower laptops / tablets: drop the phone (it is in the footer too) so the menu and the donate button keep their room
   (up to 1199px: the English header - longer logo, longer menu - overflowed at 1100px with the donate button) */
@media (min-width: 768px) and (max-width: 1199px) {
  header .moduletable.tel { display: none; }
  header ul.nav.menu li { padding: 0 9px; }
}

/* ---------------------------------------------------------------------
   Header (phone): one 64px row - hamburger on the left, language next to it, logo on the right
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
  header { height: 64px !important; min-height: 0; padding: 0 !important; }
  header .moduletable.logo {
    position: absolute;
    inset-inline-start: auto;
    right: 14px;
    top: 0;
    width: auto;
    height: 64px;
    margin: 0;
    float: none;
    display: flex;
    align-items: center;
  }
  header .moduletable.logo p { margin: 0; line-height: 0; }
  header .moduletable.logo img { display: block; height: 40px; width: auto; max-width: none; }
  header .moduletable.menu:before { margin: 9px 10px; }
  header .moduletable_lang { position: absolute; left: 66px; top: 14px; width: auto; margin: 0; float: none; }
  header ul.lang-inline { margin: 0; padding: 0; }
  header ul.lang-inline li { margin: 0; }
  header ul.lang-inline li a { padding: 0; box-sizing: border-box; }   /* a stray 8px padding pushed "HE" out of the circle */
  .moduletable.menu.open ul.nav.menu { margin-top: 58px; }
}

/* ---------------------------------------------------------------------
   The one donate button that is always in view (a quiet pill; no floating button, none in the cards).
   --donate-deep: white text on it is 6:1 (the lighter --donate is 4:1).
   --------------------------------------------------------------------- */
header a.header-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 24px;
  border-radius: var(--r-pill);
  background: var(--donate-deep);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s var(--ease);
}
header a.header-donate:hover,
header a.header-donate:focus-visible { background: #9c2424; color: #fff; }
header a.header-donate:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
@media (max-width: 767px) {   /* between the language circle (left) and the logo (right) */
  header a.header-donate { position: absolute; left: 112px; top: 13px; height: 38px; padding: 0 18px; font-size: .95rem; }
}
@media (max-width: 380px) { header a.header-donate { left: 108px; padding: 0 12px; font-size: .9rem; } }
@media (max-width: 339px) { header a.header-donate { display: none; } }   /* no room next to the English logo; the footer has the link */

/* the one-sentence leads of the donate band (home) and of the donation page: balanced lines, no one-word last line */
.donate-band__lead,
.give-page .give-lead { text-wrap: balance; }

/* ---------------------------------------------------------------------
   Hero: header + hero fill the first screen (with a strip of the next section showing)
   --------------------------------------------------------------------- */
.hero {
  height: clamp(420px, calc(100vh - var(--header-h) - 56px), 700px);
  height: clamp(420px, calc(100svh - var(--header-h) - 56px), 700px);
}
@media (max-width: 1023px) {   /* tablet portrait: a shorter hero so the wide photos are not cropped to a slice */
  .hero { height: clamp(320px, 66vw, 560px); }
}
@media (max-width: 767px) {
  .hero { height: clamp(320px, 82vw, 440px); }   /* room for a three-line headline (English) under the sticky header */
  .hero-cta { font-size: 1.05rem; padding: 10px 30px; }
}

.hero-slide {
  background-image: var(--img);
  background-position: var(--pos, center);
  transform: scale(1);
  transition: opacity 1s var(--ease), transform 9s ease-out;   /* slow zoom while the slide is showing */
}
.hero-slide.is-active { transform: scale(1.06); }
@media (max-width: 767px) {
  .hero-slide { background-image: var(--img-m, var(--img)); }
}

/* the photos are clean now, so a soft gradient at the bottom carries the button and the dots */
.hero::after {
  background: linear-gradient(to top, rgba(7,31,43,.72) 0%, rgba(7,31,43,.28) 34%, rgba(7,31,43,0) 62%);
}
.hero-overlay { bottom: clamp(48px, 9vh, 92px); }

.hero-arrow {
  width: 46px;
  height: 46px;
  background: rgba(7,31,43,.38);   /* dark glass: readable on bright and dark photos alike */
  color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-arrow:hover { background: #fff; color: var(--ink); }

.hero-dots { bottom: 20px; align-items: center; }
.hero-dots button {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,.55);
  transition: width .3s var(--ease), background .3s var(--ease);
}
.hero-dots button.is-active { width: 28px; border-radius: var(--r-pill); background: #fff; transform: none; }

@media (max-width: 767px) {
  .hero-overlay { bottom: 40px; padding-inline: 56px; }   /* keep the text clear of the arrows */
  .hero-arrow { width: 36px; height: 36px; font-size: 1.4rem; }
  .hero-dots { bottom: 14px; }
}

/* ---------------------------------------------------------------------
   Hero message: the title, a sub-line and a quiet link (no button - the donation is asked in the text further down)
   --------------------------------------------------------------------- */
.hero-title { margin-bottom: 8px; letter-spacing: -.01em; text-wrap: balance; }   /* two short sentences break between the sentences, not in the middle of one */
.hero-sub {
  margin: 0 0 18px;
  color: rgba(255,255,255,.94);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 600;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
  text-wrap: balance;   /* two even lines instead of one long line and a single orphan word */
}
.hero-sub .nb { display: inline-block; }   /* each sentence stays whole when the line wraps */
.hero-more {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.hero-more:empty { display: none; }   /* no text (message hidden) - do not leave a lone arrow */
.hero-more::after { content: ' \2193'; }
.hero-more:hover,
.hero-more:focus-visible { color: #fff; text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------------
   Hero on a phone: the photo stays clean (it is a photo of people) and the message sits under it on the dark panel.
   Tablet and desktop keep the message over the photo.
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
  .hero { --hero-photo: clamp(240px, 70vw, 340px); height: auto; padding-top: var(--hero-photo); }
  .hero::after { display: none; }
  .hero-track { inset: 0 0 auto 0; height: var(--hero-photo); overflow: hidden; }
  .hero-arrow { top: calc(var(--hero-photo) / 2); }
  .hero-dots { top: calc(var(--hero-photo) - 28px); bottom: auto; }
  .hero-overlay { position: static; padding: 22px 20px 30px; }
  .hero-overlay:not(:has(.hero-title, .hero-sub)) { display: none; }   /* message hidden: the hero is only the photo */
  .hero-title { font-size: clamp(1.8rem, 8vw, 2.2rem); margin-bottom: 10px; text-shadow: none; }
  .hero-sub { margin-bottom: 16px; text-shadow: none; }
  .hero-more { text-shadow: none; }
}
