/* Small adjustments so Echoes of Ubuntu content fits the Charitics layout. */

.eou-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  background: #fff;
  color: var(--ul-p);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.eou-skip:focus {
  top: 12px;
}

.echoes-wordmark {
  font-family: var(--font-quicksand), "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 1.15vw, 22px);
  letter-spacing: -0.04em;
  color: var(--ul-p);
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.echoes-brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

.echoes-brand__icon {
  display: block;
  flex-shrink: 0;
  width: clamp(44px, 3.8vw, 56px);
  height: auto;
  max-height: clamp(48px, 4.2vw, 60px);
  object-fit: contain;
  object-position: center;
}

/* Header emblem: fixed square slot so flex/width caps never clip the circle */
.echoes-brand__icon-slot {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  /* Match echoes-logo-icon-header.png aspect ratio (561×593) */
  width: clamp(52px, 4.4vw, 62px);
  height: clamp(55px, 4.65vw, 66px);
  overflow: visible;
}

.echoes-brand__icon--header,
.echoes-brand__icon-slot .echoes-brand__icon {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}

.echoes-brand__icon-slot .echoes-brand__icon--header {
  /* Inset within the slot so the full gold ring stays inside the header bar */
  transform: scale(0.9);
  transform-origin: center center;
}

/* Header lockup: full emblem visible — no vertical clip */
.echoes-brand--header {
  align-items: center;
  gap: clamp(8px, 0.85vw, 14px);
  overflow: visible;
}

.logo-container .echoes-brand--header {
  padding: clamp(8px, 0.65vw, 12px) 0 clamp(6px, 0.5vw, 10px);
  overflow: visible;
}

.echoes-brand--header .echoes-brand__name {
  align-self: center;
  margin: 0;
}

.ul-header,
.ul-header-2,
.ul-header-2 .ul-header-bottom,
.ul-header-2 .ul-header-bottom-wrapper,
.ul-header-2 .ul-header-bottom .ul-header-container {
  overflow: visible;
}

.ul-header-2 .logo-container {
  position: relative;
  z-index: 5;
}

.ul-header-2 .ul-header-bottom .ul-header-container {
  align-items: center;
  padding-block: clamp(16px, 1.35vw, 26px);
}

.ul-header-2 .ul-header-bottom.sticky .ul-header-container {
  padding-block: clamp(12px, 1.05vw, 20px);
}

.ul-header-2 .logo-container {
  display: flex;
  align-items: center;
  overflow: visible;
  min-height: 64px;
  min-width: min-content;
}

/* Charitics decorative shapes can clip the emblem on non–header-2 pages */
.ul-header:not(.ul-header-2) .logo-container::before,
.ul-header:not(.ul-header-2) .logo-container::after {
  display: none;
}

.ul-header:not(.ul-header-2) .logo-container {
  overflow: visible;
}

.echoes-brand__name {
  line-height: 1.08;
  white-space: nowrap;
}

.logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: min-content;
  overflow: visible;
}

.ul-footer-about {
  overflow: visible;
}

.logo-container .echoes-brand {
  padding: clamp(6px, 0.5vw, 10px) 0;
}

.ul-header-2 .logo-container .echoes-brand__name {
  color: var(--ul-black);
}

.echoes-brand:hover .echoes-brand__name {
  color: var(--ul-primary);
}

.echoes-brand:hover .echoes-brand__icon {
  opacity: 0.92;
}

.ul-sidebar-header-logo {
  overflow: visible;
  min-width: 0;
  flex: 1;
}

.ul-sidebar-header-logo .echoes-brand {
  gap: 12px;
  max-width: calc(100% - 48px);
}

.ul-sidebar-header-logo .echoes-brand__name {
  font-size: clamp(15px, 4.2vw, 20px);
  white-space: normal;
}

.echoes-wordmark.echoes-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  white-space: normal;
}

.echoes-logo img {
  display: block;
  width: clamp(112px, 9.5vw, 156px);
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* Official full lockup (tree + Echoes of Ubuntu) in the header / mobile sidebar */
.echoes-logo--header {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  overflow: visible;
}

.echoes-logo--header img {
  display: block;
  height: clamp(58px, 4.85vw, 78px);
  width: auto;
  max-width: min(220px, 38vw);
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

.logo-container .echoes-logo--header img {
  height: clamp(58px, 4.85vw, 78px);
}

.ul-sidebar-header-logo .echoes-logo--header {
  max-width: calc(100% - 48px);
}

.ul-sidebar-header-logo .echoes-logo--header img {
  height: clamp(52px, 14vw, 68px);
  max-width: 100%;
}

.echoes-logo--full img {
  width: clamp(128px, 10.5vw, 168px);
  height: auto;
}

.ul-footer-about .echoes-logo--full img {
  width: clamp(132px, 11vw, 176px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.eou-team-member-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.eou-team-member-link:focus-visible {
  outline: 2px solid var(--ul-primary);
  outline-offset: 4px;
  border-radius: clamp(15px, 1.05vw, 20px);
}

.eou-team-bio-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: clamp(18px, 1.6vw, 28px);
}

.echoes-wordmark:hover {
  color: var(--ul-primary);
}

.echoes-logo:hover img {
  opacity: 0.92;
}

.echoes-wordmark--light,
.echoes-wordmark--light:hover {
  color: #fff;
}

.echoes-tagline {
  color: var(--ul-primary);
  font-family: var(--font-quicksand), "Trebuchet MS", sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}

.ul-footer-about .echoes-wordmark {
  max-width: none;
  font-size: clamp(18px, 1.2vw, 24px);
}

section[id],
div[id] {
  scroll-margin-top: 100px;
}

.ul-donations .ul-section-title,
.ul-donations .ul-section-descr {
  color: #fff;
}

.ul-section-descr + .ul-section-descr,
.ul-about-tab-descr + .ul-about-tab-descr {
  margin-top: 12px;
}

#children .ul-section-heading,
.ul-team .ul-section-heading {
  align-items: flex-start;
}

#children .ul-section-heading .left,
.ul-team .ul-section-heading .left {
  max-width: 760px;
}

/* Our Team page: flat grid — template stagger / .ul-inner-team negative margins
   pulled even cards (e.g. Lorraine Simpson) into the section intro. */
.eou-team-listing .ul-section-heading {
  margin-bottom: clamp(24px, 2.5vw, 40px);
}

.eou-team-listing .ul-team-row {
  margin-top: clamp(8px, 1vw, 16px);
}

.eou-team-listing .ul-team-row .col .ul-team-member {
  margin-top: 0 !important;
}

.ul-team-member-img img {
  object-fit: cover;
  object-position: center center;
  background-color: #f3f3f3;
}

/* Meet the children: tall portraits — anchor from top so faces are not cropped */
#children .ul-team-member-img img {
  object-position: center top;
}

#children .ul-team-member-img img[data-photo="children/02.jpg"] {
  object-position: center 12%;
}

[data-member-slug="keith-gallinger"] .ul-team-member-img img,
.ul-team-details-img img[data-photo*="team/04.jpg"] {
  object-position: center 22%;
}

.eou-cost {
  font-family: var(--font-quicksand), "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 4.2vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ul-primary);
  margin: 0 0 6px;
}

.eou-cost-label {
  display: block;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.eou-text-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 800;
  color: var(--ul-primary);
}

.eou-text-link:hover {
  color: var(--ul-black);
}

.ul-cta-descr {
  color: #fff;
  max-width: 760px;
  margin: 0 auto clamp(18px, 1.8vw, 28px);
}

.ul-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.eou-simple-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0;
}

.eou-simple-links a {
  font-weight: 700;
  color: var(--ul-black);
}

.eou-simple-links a:hover {
  color: var(--ul-primary);
}

.ul-review-descr {
  margin-bottom: 18px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ul-primary);
  outline-offset: 3px;
}

@media (max-width: 1199px) and (min-width: 992px) {
  .ul-header-nav {
    gap: 16px;
  }

  .ul-header-nav a {
    font-size: 14px;
  }

  .echoes-wordmark {
    font-size: 16px;
  }
}

body {
  overflow-x: hidden;
}

.eou-nav-donate {
  display: none;
}

@media (max-width: 575.98px) {
  .echoes-logo--header {
    max-width: calc(100vw - 108px);
  }

  .echoes-logo--header img {
    height: clamp(48px, 13vw, 58px);
    max-width: 100%;
  }

  .eou-nav-donate {
    display: block;
  }

  .ul-header-actions {
    margin-left: auto;
    position: relative;
    z-index: 5;
  }

  .ul-banner:not(.ul-banner-2) .ul-banner-txt {
    width: 100%;
    max-width: calc(100vw - 36px);
  }

  .ul-header-2 .ul-header-top-social .title {
    font-size: 12px;
    line-height: 1.3;
    text-align: right;
  }
}

@media (min-width: 576px) {
  .ul-header-2 .echoes-wordmark {
    font-size: clamp(18px, 1.35vw, 26px);
  }
}

.ul-header-2 .ul-header-nav {
  gap: clamp(12px, 1.05vw, 22px);
}

.ul-header-2 .ul-header-nav a {
  font-size: clamp(13px, 0.84vw, 15px);
}

.eou-amount-note,
.eou-form-status {
  margin-top: 16px;
  max-width: 680px;
}

.eou-empty-copy {
  max-width: 720px;
}

[data-related] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ul-header-2 .ul-header-top-social .title {
  color: #fff;
  font-weight: 700;
}

.ul-volunteer-block .ul-volunteer-descr + .ul-volunteer-descr {
  margin-top: 12px;
}

.ul-about-txt h3 {
  margin-top: 22px;
}

.ul-contact-form-wrapper .ul-section-descr {
  color: #fff;
}

.ul-contact-form-wrapper .ul-section-descr + .ul-section-descr {
  margin-top: 12px;
}

.ul-contact-form-wrapper .ul-btn {
  background-color: #fff;
  color: var(--eou-charcoal);
}

.ul-testimonial-2-overview .ul-section-title {
  font-size: clamp(22px, 1.7vw, 34px);
  line-height: 1.25;
  margin-bottom: 16px;
}

.ul-donate-form-wrapper-2 .eou-cost {
  color: #fff;
}

.eou-gallery__lead {
  max-width: 42rem;
  margin: clamp(12px, 1vw, 18px) auto 0;
}

.eou-gallery__item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: clamp(14px, 1.1vw, 22px);
  line-height: 0;
  background: var(--ul-black);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.eou-gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.22));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.eou-gallery__item:hover,
.eou-gallery__item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.eou-gallery__item:hover::after,
.eou-gallery__item:focus-visible::after {
  opacity: 1;
}

.eou-gallery__item img {
  width: 100%;
  height: clamp(260px, 28vw, 360px);
  object-fit: cover;
  /* Bias upward so group portraits keep faces in frame */
  object-position: center 28%;
  transition: transform 0.45s ease;
}

.eou-gallery__item img[data-gallery-focus="top"] {
  object-position: center top;
}

.eou-gallery__item img[data-gallery-focus="upper"] {
  object-position: center 16%;
}

.eou-gallery__item img[data-gallery-focus="mid"] {
  object-position: center 40%;
}

.eou-gallery__item:hover img,
.eou-gallery__item:focus-visible img {
  transform: scale(1.02);
  transform-origin: center 30%;
}

.eou-gallery__item:focus-visible {
  outline: 2px solid var(--ul-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .wow {
    animation: none !important;
    visibility: visible !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Mission page: initiative photos on stats circle hover (replaces template stat-bg.png) */
.ul-stats-item.eou-stats-item--water {
  background-image: url(../img/donation-1.jpg);
}

.ul-stats-item.eou-stats-item--education {
  background-image: url(../img/donation-2.jpg);
}

.ul-stats-item.eou-stats-item--health {
  background-image: url(../img/donation-3.jpg);
}

.ul-stats-item.eou-stats-item--dignity {
  background-image: url(../img/donation-4.jpg);
}

/* Our Story stats row (about.html) */
.ul-stats-item.eou-stats-item--about-1991 {
  background-image: url(../img/about-1991-community.jpg);
}

.ul-stats-item.eou-stats-item--forest {
  background-image: url(../img/mission-img.jpg);
}

.ul-stats-item.eou-stats-item--culture {
  background-image: url(../img/donation-2.jpg);
}

.ul-stats-item.eou-stats-item--today {
  background-image: url(../img/donation-4.jpg);
}

/* Our Story: 1991 stat opens heritage tab; button reset */
button.ul-stats-item.eou-stats-tab-trigger {
  width: 100%;
  padding: 15px;
  cursor: pointer;
  font: inherit;
  color: var(--white);
  appearance: none;
  -webkit-appearance: none;
}

button.ul-stats-item.eou-stats-tab-trigger i,
button.ul-stats-item.eou-stats-tab-trigger .number,
button.ul-stats-item.eou-stats-tab-trigger .txt {
  color: inherit;
}

button.ul-stats-item.eou-stats-tab-trigger:focus-visible {
  outline: 2px solid var(--ul-primary);
  outline-offset: 4px;
}

/* Contact phone + email: keep one line, avoid broken hyphen wraps in footer bar */
.eou-contact-phone,
.eou-contact-phone-line,
.eou-contact-phone-line a,
[data-eou-phone] a,
.ul-footer-top-contact-info-address[data-eou-phone] a,
.ul-contact-info [data-eou-phone] a {
  white-space: nowrap;
}

.ul-footer-top-contact-infos {
  row-gap: clamp(14px, 1.2vw, 22px);
}

.ul-footer-top-contact-info:has([data-eou-phone]),
.ul-footer-top-contact-info:has([data-eou-email]) {
  flex-shrink: 0;
}

.eou-contact-phone-line,
.ul-footer-top-contact-info-address[data-eou-phone] {
  line-height: 1.25;
  font-size: clamp(15px, 0.95vw, 19px);
  font-weight: 700;
}

.ul-footer-top-contact-info-address[data-eou-email],
.ul-footer-top-contact-info-address[data-eou-email] a {
  white-space: nowrap;
  font-size: clamp(13px, 0.85vw, 17px);
  font-weight: 700;
  word-break: keep-all;
}

@media screen and (max-width: 575px) {
  .ul-footer-top-contact-infos {
    flex-direction: column;
    align-items: flex-start;
  }

  .ul-footer-top-contact-info {
    width: 100%;
  }

  .ul-footer-top-contact-info-address[data-eou-email] a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
