/* ============================================================
   FLITZEN - Charity / Giving Back page
   Extends styles.css - Mayfair Editorial, monochrome
   ============================================================ */

/* ---------- HERO ---------- */
.charity-hero {
  padding-top: clamp(122px, 15vw, 188px);
  padding-bottom: clamp(30px, 4vw, 56px);
}
/* breadcrumb component (base lives in works.css; company pages don't load it) */
.crumbs { display: flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--gray-2); }
.crumbs a { color: var(--gray-1); transition: color 0.3s var(--ease); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--gray-3); }
.crumbs .here { color: var(--ink); }
.charity-hero .crumbs { margin-bottom: clamp(24px, 3vw, 40px); }
.charity-hero .eyebrow { display: block; margin-bottom: clamp(14px, 1.6vw, 22px); }
.charity-h1 {
  font-size: clamp(56px, 11vw, 176px);
  letter-spacing: -0.03em;
  line-height: 0.9;
}
.charity-hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: end;
  margin-top: clamp(30px, 3.6vw, 56px);
  padding-top: clamp(24px, 2.6vw, 36px);
  border-top: 1px solid var(--line);
}
.charity-hero-foot .lead { max-width: 46ch; margin: 0; color: var(--gray-1); }
.charity-hero-foot .hero-meta { margin-top: 0; border-top: none; padding-top: 0; }

/* ---------- CAUSES ---------- */
.causes-list {
  margin-top: clamp(34px, 4.4vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 5vw, 96px);
}
.cause {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
}
.cause--flip .cause-media { order: 2; }

/* ---------- PHOTO GALLERY (main image + thumbnails) ---------- */
.cause-gallery { display: flex; flex-direction: column; gap: clamp(8px, 0.9vw, 12px); }
.cg-main {
  display: block; width: 100%; margin: 0; padding: 0; border: 0;
  position: relative; overflow: hidden; cursor: zoom-in;
  aspect-ratio: 4 / 3; border-radius: var(--r-lg);
  background: var(--paper-3);
}
.cg-main-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s var(--ease);
}
.cg-main:hover .cg-main-img { transform: scale(1.035); }
.cg-main-img.failed { opacity: 0; }
.cg-zoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: rgba(14, 14, 14, .58); color: #fff; border-radius: 50%;
  font-size: 15px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.cg-main:hover .cg-zoom,
.cg-main:focus-visible .cg-zoom { opacity: 1; transform: none; }
.cg-thumbs { display: flex; gap: clamp(8px, 0.8vw, 10px); }
.cg-thumb {
  flex: 1 1 0; min-width: 0; margin: 0; padding: 0; border: 0; cursor: pointer;
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; border-radius: var(--r-sm); background: var(--paper-3);
  outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color .25s var(--ease), transform .25s var(--ease);
}
.cg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .68; transition: opacity .25s var(--ease); }
.cg-thumb:hover { transform: translateY(-2px); }
.cg-thumb:hover img { opacity: 1; }
.cg-thumb.is-active { outline-color: var(--ink); }
.cg-thumb.is-active img { opacity: 1; }

/* lightbox overlay */
.cg-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(14, 14, 14, .93);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.cg-lightbox.is-open { display: flex; }
.cg-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-md); }
.cg-lb-close {
  position: absolute; top: clamp(12px, 2vw, 24px); right: clamp(12px, 2vw, 24px);
  width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff;
  transition: background .25s var(--ease);
}
.cg-lb-close:hover { background: rgba(255, 255, 255, .28); }
.cg-lb-close svg { width: 22px; height: 22px; }

.cause-tag {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gray-2);
  margin-bottom: clamp(12px, 1.4vw, 18px);
}
.cause-name {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1;
  margin: 0 0 clamp(14px, 1.6vw, 22px);
}
.cause-body p {
  color: var(--gray-1);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.66; margin: 0; max-width: 52ch;
}

/* ---------- FEATURED PLEDGE ---------- */
.charity-featured {
  margin-top: clamp(40px, 5vw, 88px);
  padding: clamp(20px, 2.2vw, 30px);
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.charity-featured .cf-media { width: 100%; }
/* gallery on the dark panel: active thumb outline goes light */
.charity-featured .cg-thumb.is-active { outline-color: var(--paper); }
.charity-featured .cg-thumb,
.charity-featured .cg-main { background: rgba(255, 255, 255, .08); }
.charity-featured .cf-body { padding: clamp(8px, 2vw, 40px) clamp(8px, 2vw, 34px) clamp(8px, 2vw, 40px) 0; }
.charity-featured .cf-eyebrow {
  display: block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gray-3);
  margin-bottom: clamp(18px, 2vw, 26px);
}
.cf-quote {
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 34px);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.22;
  margin: 0;
  color: var(--paper);
}
.cf-quote em { font-style: italic; }
.cf-meta {
  margin-top: clamp(20px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 4px;
}
.cf-name {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(17px, 1.4vw, 21px); color: var(--paper);
}
.cf-role { font-size: clamp(13px, 1vw, 15px); color: var(--gray-3); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .charity-hero-foot { grid-template-columns: 1fr; gap: 22px; }
  .cause { grid-template-columns: 1fr; gap: 20px; }
  .cause--flip .cause-media { order: 0; }
  .cause-gallery .cg-main { aspect-ratio: 16 / 10; }
  .charity-featured { grid-template-columns: 1fr; gap: 22px; padding: clamp(20px, 5vw, 30px); }
  .charity-featured .cf-body { padding: 0 4px 8px; }
}
