/* ==========================================================================
   IFSA 국제소방안전교류협회 — Design System
   Benchmark: 희망친구 기아대책 (kfhi.or.kr) layout & component hierarchy
   ========================================================================== */

:root {
  --ifsa-red: #e11d48;
  --ifsa-red-dark: #dc2626;
  --ifsa-red-deep: #be123c;
  --ifsa-navy: #0f172a;
  --ifsa-navy-soft: #1e293b;
  --ifsa-amber: #f59e0b;
  --ifsa-amber-soft: #fbbf24;
  --ifsa-bg: #ffffff;
  --ifsa-gray: #f8fafc;
  --ifsa-gray-2: #f1f5f9;
  --ifsa-line: #e2e8f0;
  --ifsa-muted: #64748b;
  --ifsa-radius: 1rem;
  --ifsa-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --ifsa-shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, 0.28);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  color: var(--ifsa-navy);
  word-break: keep-all;
  overflow-x: hidden;
}

/* ── Utility ─────────────────────────────────────────────── */
.shell { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1.25rem; }
.sec-anchor { scroll-margin-top: 7rem; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ifsa-red);
}
.eyebrow::before {
  content: ''; width: 1.75rem; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--ifsa-red), var(--ifsa-amber));
}
.eyebrow.on-dark { color: #fda4af; }
.sec-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.22; }
.sec-desc { color: var(--ifsa-muted); font-size: .98rem; line-height: 1.75; }

/* ── Badges / chips ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .68rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.badge-red    { background: var(--ifsa-red); color: #fff; }
.badge-amber  { background: var(--ifsa-amber); color: #422006; }
.badge-navy   { background: var(--ifsa-navy); color: #fff; }
.badge-soft-red   { background: #ffe4e6; color: #9f1239; }
.badge-soft-navy  { background: #e2e8f0; color: #1e293b; }
.badge-soft-amber { background: #fef3c7; color: #92400e; }
.badge-soft-green { background: #dcfce7; color: #166534; }

.pulse-dot { width: .45rem; height: .45rem; border-radius: 999px; background: #fff; animation: pulseDot 1.4s infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .35; transform: scale(.72);} }

/* ── Top utility bar ─────────────────────────────────────── */
#top-bar { background: var(--ifsa-navy); color: #cbd5e1; font-size: .76rem; }
#top-bar a { color: #cbd5e1; transition: color .2s; }
#top-bar a:hover { color: #fff; }
.lang-toggle { display: inline-flex; gap: .1rem; background: rgba(255,255,255,.1); border-radius: 999px; padding: .12rem; }
.lang-toggle button {
  padding: .16rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700;
  color: #cbd5e1; transition: all .2s;
}
.lang-toggle button.is-active { background: #fff; color: var(--ifsa-navy); }
.lang-toggle.dark { background: var(--ifsa-gray-2); }
.lang-toggle.dark button { color: var(--ifsa-muted); }
.lang-toggle.dark button.is-active { background: var(--ifsa-navy); color: #fff; }

/* ══ kfhi-style Header ═══════════════════════════════════ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ifsa-red); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 .7rem 0; font-weight: 700; font-size: .84rem;
}
.skip-link:focus { left: 0; }

.kh-header { position: relative; z-index: 70; width: 100%; transition: background .25s, box-shadow .25s; }
.kh-header-inner {
  width: 100%; max-width: 90rem; margin-inline: auto; padding-inline: 1.5rem;
  height: 5rem; display: flex; align-items: center; gap: 1.5rem;
}
.kh-header.kh-solid { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--ifsa-line); }
.kh-header.kh-overlay { position: absolute; top: 0; left: 0; right: 0; background: transparent; }
.kh-header.is-scrolled { box-shadow: var(--ifsa-shadow); }
.kh-header.kh-overlay.is-stuck {
  position: fixed; inset: 0 0 auto 0; background: #fff; border-bottom: 1px solid var(--ifsa-line);
  box-shadow: var(--ifsa-shadow); animation: slideDown .3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%);} to { transform: translateY(0);} }

.kh-brand { display: flex; align-items: center; gap: .7rem; flex: none; }
.kh-brand-icon {
  width: 2.5rem; height: 2.5rem; border-radius: .8rem; flex: none;
  display: grid; place-items: center; color: #fff; font-size: .95rem;
  background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-deep));
  box-shadow: 0 8px 18px -8px rgba(225,29,72,.85);
}
.kh-brand-icon svg { width: 1.75rem; height: 1.75rem; display: block; }
.kh-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.kh-brand-sub { font-size: .64rem; font-weight: 800; letter-spacing: .02em; color: var(--ifsa-red); }
.kh-brand-name { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; color: var(--ifsa-navy); white-space: nowrap; }

.kh-nav { display: none; align-items: center; gap: .25rem; margin-inline: auto; }
/* nav item stays static so its .kh-mega positions against .kh-header (full width) */
.kh-nav-item { position: static; }
.kh-nav-item.is-open > .kh-nav-link { color: var(--ifsa-red); }
.kh-nav-item.is-open > .kh-nav-link::after { transform: scaleX(1); }
.kh-header.kh-overlay:not(.is-stuck) .kh-nav-item.is-open > .kh-nav-link { color: var(--ifsa-red); }
.kh-nav-link {
  position: relative; padding: .6rem 1.15rem; font-size: 1rem; font-weight: 700;
  color: var(--ifsa-navy); border-radius: .6rem; transition: color .2s;
}
.kh-nav-link::after {
  content: ''; position: absolute; left: 1.15rem; right: 1.15rem; bottom: .1rem; height: 2.5px;
  border-radius: 3px; background: var(--ifsa-red); transform: scaleX(0); transform-origin: center;
  transition: transform .26s ease;
}
.kh-nav-link:hover, .kh-nav-link.is-current { color: var(--ifsa-red); }
.kh-nav-link:hover::after, .kh-nav-link.is-current::after { transform: scaleX(1); }

.kh-header.kh-overlay:not(.is-stuck) .kh-brand-name,
.kh-header.kh-overlay:not(.is-stuck) .kh-nav-link { color: #fff; }
.kh-header.kh-overlay:not(.is-stuck) .kh-brand-sub { color: #fda4af; }
.kh-header.kh-overlay:not(.is-stuck) .kh-icon-btn { color: #fff; border-color: rgba(255,255,255,.28); }
.kh-header.kh-overlay:not(.is-stuck) .kh-icon-btn:hover { background: rgba(255,255,255,.16); }

.kh-utils { display: flex; align-items: center; gap: .45rem; flex: none; }
.kh-icon-btn {
  width: 2.4rem; height: 2.4rem; border-radius: .7rem; display: grid; place-items: center;
  color: var(--ifsa-navy); border: 1px solid transparent; transition: all .2s; font-size: .95rem;
}
.kh-icon-btn:hover { background: var(--ifsa-gray-2); }
.kh-cta {
  background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-dark));
  color: #fff; font-weight: 800; font-size: .88rem; padding: .62rem 1.35rem;
  border-radius: 999px; box-shadow: 0 10px 22px -10px rgba(225,29,72,.9);
  transition: transform .2s, box-shadow .2s; white-space: nowrap;
}
.kh-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(225,29,72,1); }

/* Hover mega panel */
.kh-mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff;
  border-top: 1px solid var(--ifsa-line); box-shadow: var(--ifsa-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.kh-mega.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.kh-mega-inner {
  max-width: 90rem; margin-inline: auto; padding: 2rem 1.5rem;
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 2.5rem;
}
.kh-mega-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.kh-mega-col-head {
  display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ifsa-muted); padding-bottom: .6rem; margin-bottom: .4rem; border-bottom: 1px solid var(--ifsa-line);
}
.kh-mega-link { display: block; padding: .5rem .6rem; margin-left: -.6rem; border-radius: .6rem; transition: background .16s, transform .16s; }
.kh-mega-link:hover { background: var(--ifsa-gray); transform: translateX(.2rem); }
.kh-mega-link strong { display: block; font-size: .88rem; font-weight: 700; color: var(--ifsa-navy); }
.kh-mega-link span { display: block; font-size: .72rem; color: var(--ifsa-muted); margin-top: .12rem; line-height: 1.5; }
.kh-mega-feature {
  position: relative; border-radius: 1.1rem; overflow: hidden; min-height: 15rem;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.35rem; color: #fff;
}
.kh-mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.kh-mega-feature::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(15,23,42,.94), rgba(15,23,42,.35) 65%, rgba(15,23,42,.15)); }
.kh-mega-feature > * { position: relative; z-index: 2; }
.kh-mega-feature h4 { font-size: 1rem; font-weight: 800; line-height: 1.4; }
.kh-mega-feature p { font-size: .78rem; color: #cbd5e1; line-height: 1.6; margin-top: .4rem; }
.kh-mega-feature .mf-go { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 800; margin-top: .8rem; }

/* Full-screen drawer */
.kh-drawer {
  position: fixed; inset: 0; z-index: 120; display: flex; justify-content: flex-end;
  background: rgba(15,23,42,0); visibility: hidden; transition: background .3s, visibility .3s;
}
.kh-drawer.is-open { background: rgba(15,23,42,.55); visibility: visible; }
.kh-drawer-panel {
  width: 100%; max-width: 42rem; height: 100%; background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.22,.9,.3,1);
}
.kh-drawer.is-open .kh-drawer-panel { transform: translateX(0); }
.kh-drawer-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--ifsa-line); flex: none;
}
.kh-drawer-title { font-size: 1.05rem; font-weight: 800; }
.kh-drawer-close { width: 2.3rem; height: 2.3rem; border-radius: 999px; display: grid; place-items: center; background: var(--ifsa-gray-2); transition: all .2s; }
.kh-drawer-close:hover { background: var(--ifsa-red); color: #fff; }
.kh-drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem 2rem; align-content: start; }
.kh-drawer-head { display: block; font-size: 1.05rem; font-weight: 800; color: var(--ifsa-navy); padding-bottom: .55rem; border-bottom: 2px solid var(--ifsa-navy); margin-bottom: .8rem; }
.kh-drawer-group { margin-bottom: 1.1rem; }
.kh-drawer-group-head { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ifsa-red); margin-bottom: .35rem; }
.kh-drawer-group ul li a { display: block; padding: .38rem 0; font-size: .85rem; color: var(--ifsa-muted); font-weight: 500; transition: color .16s, padding-left .16s; }
.kh-drawer-group ul li a:hover { color: var(--ifsa-red); padding-left: .3rem; }
.kh-drawer-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.5rem; border-top: 1px solid var(--ifsa-line); background: var(--ifsa-gray);
}
.kh-scrim { position: fixed; inset: 0; z-index: 65; background: transparent; pointer-events: none; }
.kh-scrim.is-open { pointer-events: auto; }

@media (min-width: 1024px) { .kh-nav { display: flex; } .kh-utils { gap: .35rem; } }

.btn-donate-top {
  background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-dark));
  color: #fff; font-weight: 800; font-size: .9rem;
  padding: .72rem 1.4rem; border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(225,29,72,.9);
  transition: transform .2s, box-shadow .2s;
}
.btn-donate-top:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(225,29,72,1); }

#mobile-drawer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
#mobile-drawer.is-open { max-height: 80vh; overflow-y: auto; }

/* ── Hero carousel ───────────────────────────────────────── */
#hero { position: relative; background: var(--ifsa-navy); }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease;
  background-size: cover; background-position: center;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,23,42,.94) 8%, rgba(15,23,42,.78) 42%, rgba(15,23,42,.32) 100%);
}
.hero-copy { position: relative; z-index: 2; }
.hero-title { font-size: clamp(1.7rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.18; letter-spacing: -.03em; color: #fff; }
.hero-desc { color: rgba(226,232,240,.92); font-size: clamp(.9rem, 1.6vw, 1.06rem); line-height: 1.8; }

.hero-dot { width: .55rem; height: .55rem; border-radius: 999px; background: rgba(255,255,255,.4); transition: all .3s; }
.hero-dot.is-active { width: 2rem; background: #fff; }
.hero-arrow {
  width: 2.75rem; height: 2.75rem; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25); transition: all .22s;
}
.hero-arrow:hover { background: rgba(255,255,255,.3); transform: scale(1.06); }

/* ── Quick donation bar (overlapping) ────────────────────── */
#quick-donate { margin-top: -4.5rem; position: relative; z-index: 20; }
.qd-card { background: #fff; border-radius: 1.5rem; box-shadow: var(--ifsa-shadow-lg); border: 1px solid var(--ifsa-line); }
.qd-tab {
  padding: .6rem 1.1rem; border-radius: 999px; font-size: .86rem; font-weight: 700;
  color: var(--ifsa-muted); transition: all .22s; border: 1px solid transparent;
}
.qd-tab.is-active { background: var(--ifsa-navy); color: #fff; }
.qd-tab:not(.is-active):hover { background: var(--ifsa-gray-2); color: var(--ifsa-navy); }

.amount-btn {
  padding: .58rem .3rem; border-radius: .8rem; font-size: .86rem; font-weight: 700;
  border: 1.5px solid var(--ifsa-line); background: #fff; color: var(--ifsa-navy);
  transition: all .2s; width: 100%;
}
.amount-btn:hover { border-color: var(--ifsa-red); color: var(--ifsa-red); }
.amount-btn.is-active { background: #fff1f2; border-color: var(--ifsa-red); color: var(--ifsa-red); box-shadow: 0 0 0 3px rgba(225,29,72,.1); }

#qd-tooltip { background: var(--ifsa-gray); border-left: 3px solid var(--ifsa-red); transition: all .25s; }
#qd-tooltip.is-flash { animation: tooltipFlash .45s ease; }
@keyframes tooltipFlash { 0% { background: #ffe4e6; } 100% { background: var(--ifsa-gray); } }

.btn-rescue {
  background: linear-gradient(120deg, var(--ifsa-red), var(--ifsa-red-deep));
  color: #fff; font-weight: 800; border-radius: 1rem;
  padding: 1.05rem 1.5rem; box-shadow: 0 14px 32px -12px rgba(225,29,72,.95);
  transition: transform .2s, box-shadow .2s;
}
.btn-rescue:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(225,29,72,1); }

/* ── Campaign cards ─────────────────────────────────────── */
.filter-tab {
  padding: .5rem 1.05rem; border-radius: 999px; font-size: .84rem; font-weight: 700;
  background: #fff; border: 1.5px solid var(--ifsa-line); color: var(--ifsa-muted); transition: all .2s;
}
.filter-tab:hover { border-color: var(--ifsa-navy); color: var(--ifsa-navy); }
.filter-tab.is-active { background: var(--ifsa-red); border-color: var(--ifsa-red); color: #fff; }

.campaign-card {
  background: #fff; border-radius: 1.25rem; overflow: hidden;
  border: 1px solid var(--ifsa-line); box-shadow: var(--ifsa-shadow);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column; height: 100%;
}
.campaign-card:hover { transform: translateY(-6px); box-shadow: var(--ifsa-shadow-lg); }
.campaign-card.is-hidden { display: none; }
.campaign-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.campaign-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.campaign-card:hover .campaign-thumb img { transform: scale(1.07); }
.campaign-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.55), transparent 55%);
}
.thumb-badges { position: absolute; top: .85rem; left: .85rem; z-index: 2; display: flex; gap: .35rem; flex-wrap: wrap; }
.thumb-region {
  position: absolute; bottom: .8rem; left: .9rem; z-index: 2;
  color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  display: flex; align-items: center; gap: .35rem;
}
.tag-chip { font-size: .72rem; font-weight: 700; color: var(--ifsa-red); }

.progress-track { height: .55rem; border-radius: 999px; background: var(--ifsa-gray-2); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--ifsa-amber-soft), var(--ifsa-red));
  transition: width 1.2s cubic-bezier(.22,.9,.3,1);
}

/* ── Impact / agenda tabs ───────────────────────────────── */
.stat-tile {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 1.15rem; padding: 1.35rem 1.1rem; transition: all .3s;
}
.stat-tile:hover { background: rgba(255,255,255,.11); transform: translateY(-4px); }
.stat-value { font-size: clamp(1.6rem, 3.2vw, 2.15rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }

.agenda-tab {
  display: flex; align-items: flex-start; gap: .8rem; width: 100%; text-align: left;
  padding: 1rem 1.1rem; border-radius: 1rem; border: 1.5px solid var(--ifsa-line);
  background: #fff; transition: all .25s;
}
.agenda-tab:hover { border-color: #fda4af; }
.agenda-tab.is-active { border-color: var(--ifsa-red); background: #fff1f2; box-shadow: 0 10px 26px -16px rgba(225,29,72,.8); }
.agenda-tab .at-en { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ifsa-red); }
.agenda-tab .at-label { font-size: .92rem; font-weight: 700; }

.agenda-panel { display: none; }
.agenda-panel.is-active { display: block; animation: fadeUp .45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: translateY(0);} }

.kpi-chip { background: rgba(255,255,255,.9); border-radius: .9rem; padding: .7rem .9rem; box-shadow: var(--ifsa-shadow); }

/* ── ESG split banner ───────────────────────────────────── */
.esg-card {
  position: relative; border-radius: 1.5rem; overflow: hidden; min-height: 20rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.75rem; color: #fff; box-shadow: var(--ifsa-shadow-lg);
  transition: transform .3s;
}
.esg-card:hover { transform: translateY(-5px); }
.esg-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .7s; }
.esg-card:hover img { transform: scale(1.06); }
.esg-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(15,23,42,.95) 6%, rgba(15,23,42,.7) 48%, rgba(15,23,42,.28) 100%);
}
.esg-card > * { position: relative; z-index: 2; }
.esg-benefit {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: .7rem; padding: .5rem .7rem; font-size: .76rem; font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ── Stories ────────────────────────────────────────────── */
.story-main { position: relative; border-radius: 1.4rem; overflow: hidden; display: block; min-height: 26rem; }
.story-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.story-main:hover img { transform: scale(1.05); }
.story-main::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.94) 4%, rgba(15,23,42,.6) 45%, rgba(15,23,42,.12) 100%);
}
.story-main > .sm-body { position: absolute; inset: auto 0 0 0; padding: 1.85rem; z-index: 2; color: #fff; }

.story-row {
  display: flex; gap: 1rem; align-items: center; padding: .8rem; border-radius: 1rem;
  border: 1px solid transparent; transition: all .25s;
}
.story-row:hover { background: #fff; border-color: var(--ifsa-line); box-shadow: var(--ifsa-shadow); }
.story-row img { width: 6.2rem; height: 5.2rem; object-fit: cover; border-radius: .85rem; flex: none; }

/* ── Transparency / cert ────────────────────────────────── */
.cert-card {
  background: #fff; border: 1px solid var(--ifsa-line); border-radius: 1.15rem;
  padding: 1.4rem; display: flex; gap: 1rem; box-shadow: var(--ifsa-shadow);
  transition: transform .28s, border-color .28s;
}
.cert-card:hover { transform: translateY(-4px); border-color: #fda4af; }
.cert-icon {
  width: 3rem; height: 3rem; border-radius: .9rem; flex: none; display: grid; place-items: center;
  font-size: 1.15rem; color: #fff;
  background: linear-gradient(135deg, var(--ifsa-navy), var(--ifsa-navy-soft));
}
.cert-card:first-child .cert-icon { background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-deep)); }
.cert-card:nth-child(2) .cert-icon { background: linear-gradient(135deg, var(--ifsa-amber), #d97706); }

.donut-wrap { position: relative; width: 12.5rem; height: 12.5rem; margin-inline: auto; }
.donut-svg { transform: rotate(-90deg); }
.donut-seg { transition: stroke-dashoffset 1.4s cubic-bezier(.22,.9,.3,1), stroke-width .25s; cursor: pointer; }
.donut-seg:hover { stroke-width: 30; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }

/* ── Sticky right quick menu ────────────────────────────── */
#side-quick { position: fixed; right: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 55; }
.sq-btn {
  width: 4.6rem; padding: .7rem .3rem; display: grid; justify-items: center; gap: .25rem;
  background: #fff; border: 1px solid var(--ifsa-line); color: var(--ifsa-navy);
  font-size: .68rem; font-weight: 800; transition: all .22s;
}
.sq-btn:first-child { border-radius: .9rem .9rem 0 0; }
.sq-btn:last-child { border-radius: 0 0 .9rem .9rem; }
.sq-btn + .sq-btn { border-top: 0; }
.sq-btn:hover { background: var(--ifsa-navy); color: #fff; }
.sq-btn i { font-size: .95rem; }
.sq-btn.is-primary { background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-deep)); color: #fff; border-color: var(--ifsa-red); }
.sq-btn.is-primary:hover { filter: brightness(1.08); }

/* ── Footer ─────────────────────────────────────────────── */
#site-footer { background: var(--ifsa-navy); color: #94a3b8; }
#site-footer h4 { color: #fff; font-size: .88rem; font-weight: 800; margin-bottom: .9rem; }
#site-footer a { font-size: .82rem; color: #94a3b8; transition: color .2s; }
#site-footer a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); }
.newsletter-input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: .8rem; padding: .7rem .9rem; color: #fff; font-size: .84rem; width: 100%;
}
.newsletter-input::placeholder { color: #64748b; }
.newsletter-input:focus { outline: none; border-color: var(--ifsa-red); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.72);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop.is-open { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-panel {
  background: #fff; border-radius: 1.4rem; width: 100%; max-width: 34rem;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--ifsa-shadow-lg);
  animation: modalUp .35s cubic-bezier(.22,.9,.3,1);
}
.modal-panel.modal-wide { max-width: 52rem; }
@keyframes modalUp { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  width: 2.2rem; height: 2.2rem; border-radius: 999px; display: grid; place-items: center;
  background: var(--ifsa-gray-2); color: var(--ifsa-navy); transition: all .2s;
}
.modal-close:hover { background: var(--ifsa-red); color: #fff; }

.form-input, .form-select {
  width: 100%; border: 1.5px solid var(--ifsa-line); border-radius: .8rem;
  padding: .7rem .85rem; font-size: .88rem; transition: border-color .2s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--ifsa-red); }
.form-label { font-size: .78rem; font-weight: 700; color: var(--ifsa-muted); margin-bottom: .35rem; display: block; }

.disclosure-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.disclosure-table th {
  background: var(--ifsa-gray-2); color: var(--ifsa-navy); font-weight: 800;
  padding: .7rem .6rem; text-align: left; white-space: nowrap;
}
.disclosure-table td { padding: .7rem .6rem; border-bottom: 1px solid var(--ifsa-line); }

/* ── Toast ──────────────────────────────────────────────── */
#ifsa-toast {
  position: fixed; left: 50%; bottom: 2rem; transform: translate(-50%, 140%);
  z-index: 200; background: var(--ifsa-navy); color: #fff;
  padding: .85rem 1.3rem; border-radius: 999px; font-size: .86rem; font-weight: 700;
  box-shadow: var(--ifsa-shadow-lg); display: flex; align-items: center; gap: .55rem;
  transition: transform .4s cubic-bezier(.22,.9,.3,1);
}
#ifsa-toast.is-show { transform: translate(-50%, 0); }

/* ── Reveal on scroll ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ══ kfhi-style Footer ══════════════════════════════════ */
.kh-footer { background: var(--ifsa-navy); color: #94a3b8; }
.kh-footer-top { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.kh-footer-head {
  display: block; color: #fff; font-size: .92rem; font-weight: 800;
  margin-bottom: 1rem; transition: color .2s;
}
.kh-footer-head:hover { color: var(--ifsa-red); }
.kh-footer-link { font-size: .8rem; color: #94a3b8; transition: color .18s, padding-left .18s; }
.kh-footer-link:hover { color: #fff; padding-left: .2rem; }
.kh-social {
  width: 2.25rem; height: 2.25rem; border-radius: .6rem; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #cbd5e1; transition: all .2s;
}
.kh-social:hover { background: var(--ifsa-red); color: #fff; transform: translateY(-2px); }
.kh-footer-bottom { background: rgba(0,0,0,.18); }
.newsletter-input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: .8rem; padding: .7rem .9rem; color: #fff; font-size: .84rem; width: 100%;
}
.newsletter-input::placeholder { color: #64748b; }
.newsletter-input:focus { outline: none; border-color: var(--ifsa-red); }

/* ══ Inner page: hero + breadcrumb ══════════════════════ */
.page-hero { position: relative; background: var(--ifsa-navy); overflow: hidden; }
.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,23,42,.95) 6%, rgba(15,23,42,.72) 46%, rgba(15,23,42,.36) 100%);
}
.page-hero-inner { position: relative; z-index: 2; padding: 3.25rem 0 3.75rem; }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.2; }
.page-hero p.lead { color: rgba(226,232,240,.9); font-size: clamp(.88rem, 1.5vw, 1rem); line-height: 1.75; margin-top: .9rem; max-width: 46rem; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .74rem; color: #94a3b8; }
.crumbs a { color: #94a3b8; transition: color .2s; }
.crumbs a:hover { color: #fff; }
.crumbs i { font-size: .55rem; opacity: .6; }
.crumbs .cur { color: #fff; font-weight: 700; }

/* Inner page: sub nav (LNB) */
.lnb { display: flex; flex-wrap: wrap; gap: .4rem; }
.lnb-link {
  padding: .55rem 1rem; border-radius: 999px; font-size: .84rem; font-weight: 700;
  background: #fff; border: 1.5px solid var(--ifsa-line); color: var(--ifsa-muted); transition: all .2s;
  white-space: nowrap;
}
.lnb-link:hover { border-color: var(--ifsa-navy); color: var(--ifsa-navy); }
.lnb-link.is-active { background: var(--ifsa-navy); border-color: var(--ifsa-navy); color: #fff; }

/* Inner page: content typography */
.prose-ifsa { font-size: .95rem; line-height: 1.95; color: #334155; }
.prose-ifsa p { margin-bottom: 1.15rem; }
.prose-ifsa h3 { font-size: 1.15rem; font-weight: 800; color: var(--ifsa-navy); margin: 2rem 0 .9rem; }
.prose-ifsa strong { color: var(--ifsa-navy); font-weight: 800; }

/* Info card / list */
.info-card {
  background: #fff; border: 1px solid var(--ifsa-line); border-radius: 1.1rem;
  padding: 1.5rem; box-shadow: var(--ifsa-shadow); transition: transform .28s, border-color .28s;
}
.info-card:hover { transform: translateY(-4px); border-color: #fda4af; }

/* Global branch card (국기 + 국가 상징 이미지) */
.branch-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.branch-card-media {
  position: relative; aspect-ratio: 16 / 10; background: var(--ifsa-slate, #f1f5f9); overflow: hidden;
}
.branch-card-symbol {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}
.branch-card:hover .branch-card-symbol { transform: scale(1.06); }
.branch-card-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .28) 0%, rgba(15, 23, 42, 0) 38%, rgba(15, 23, 42, .42) 100%);
  pointer-events: none;
}
.branch-card-flag {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  width: 2.9rem; height: 2.05rem; border-radius: .4rem; overflow: hidden;
  background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .3); border: 1px solid rgba(255, 255, 255, .85);
}
.branch-card-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.branch-card-region { position: absolute; bottom: .7rem; right: .7rem; z-index: 2; margin: 0; }
.branch-card-body { padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.info-icon {
  width: 2.9rem; height: 2.9rem; border-radius: .85rem; flex: none; display: grid; place-items: center;
  font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-deep));
}
.info-icon.navy { background: linear-gradient(135deg, var(--ifsa-navy), var(--ifsa-navy-soft)); }
.info-icon.amber { background: linear-gradient(135deg, var(--ifsa-amber), #d97706); }

/* Step flow */
.step-item { position: relative; padding-left: 3.5rem; }
.step-num {
  position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: #fff;
  background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-deep));
}
.step-item:not(:last-child)::before {
  content: ''; position: absolute; left: 1.24rem; top: 2.6rem; bottom: -.6rem; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--ifsa-line) 0 5px, transparent 5px 10px);
}

/* Article body */
.article-hero { border-radius: 1.4rem; overflow: hidden; }
.article-hero img { width: 100%; height: auto; max-height: 30rem; object-fit: cover; }

/* Timeline */
.tl-year { font-size: 1.35rem; font-weight: 800; color: var(--ifsa-red); letter-spacing: -.02em; }
.tl-dot { width: .7rem; height: .7rem; border-radius: 999px; background: var(--ifsa-red); flex: none; margin-top: .42rem; }
.tl-line { position: absolute; left: .32rem; top: .9rem; bottom: -.9rem; width: 2px; background: var(--ifsa-line); }

/* Table (notice / disclosure) */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--ifsa-gray-2); color: var(--ifsa-navy); font-weight: 800; font-size: .82rem;
  padding: .8rem .75rem; text-align: left; white-space: nowrap;
}
.data-table td { padding: .85rem .75rem; border-bottom: 1px solid var(--ifsa-line); font-size: .86rem; color: #475569; }
.data-table tbody tr { transition: background .18s; }
.data-table tbody tr:hover { background: var(--ifsa-gray); }
.pin-badge { font-size: .66rem; font-weight: 800; color: #fff; background: var(--ifsa-red); padding: .14rem .45rem; border-radius: .35rem; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--ifsa-line); }
.faq-q {
  display: flex; align-items: flex-start; gap: .8rem; width: 100%; text-align: left;
  padding: 1.15rem .25rem; font-size: .92rem; font-weight: 700; color: var(--ifsa-navy); transition: color .2s;
}
.faq-q:hover { color: var(--ifsa-red); }
.faq-q i.chev { margin-left: auto; transition: transform .25s; color: var(--ifsa-muted); }
.faq-item.is-open .faq-q i.chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.is-open .faq-a { max-height: 24rem; }
.faq-a-inner { padding: 0 .25rem 1.15rem 2.1rem; font-size: .86rem; line-height: 1.85; color: var(--ifsa-muted); }

/* Org chart */
.org-box {
  border-radius: 1rem; padding: 1rem 1.1rem; text-align: center;
  background: #fff; border: 1.5px solid var(--ifsa-line); transition: all .25s;
}
.org-box:hover { border-color: var(--ifsa-red); box-shadow: var(--ifsa-shadow); }
.org-box.top { background: var(--ifsa-navy); color: #fff; border-color: var(--ifsa-navy); }
.org-box.chair { background: linear-gradient(135deg, var(--ifsa-red), var(--ifsa-red-deep)); color: #fff; border-color: var(--ifsa-red); }
.org-connector { width: 2px; height: 1.6rem; background: var(--ifsa-line); margin-inline: auto; }

/* Map placeholder */
.map-frame { border-radius: 1.1rem; overflow: hidden; border: 1px solid var(--ifsa-line); box-shadow: var(--ifsa-shadow); }
.map-frame iframe { width: 100%; height: 22rem; border: 0; display: block; }

/* Search modal input */
.search-big {
  width: 100%; border: 0; border-bottom: 2px solid var(--ifsa-line); padding: .9rem .2rem;
  font-size: 1.15rem; font-weight: 700; color: var(--ifsa-navy); transition: border-color .2s;
}
.search-big:focus { outline: none; border-color: var(--ifsa-red); }
.search-sug { display: block; padding: .55rem .7rem; border-radius: .6rem; font-size: .84rem; color: var(--ifsa-muted); transition: all .16s; }
.search-sug:hover { background: var(--ifsa-gray); color: var(--ifsa-red); padding-left: 1rem; }

/* CTA band */
.cta-band {
  position: relative; border-radius: 1.5rem; overflow: hidden; padding: 2.5rem 2rem;
  background: linear-gradient(120deg, var(--ifsa-navy), #1e293b);
}
.cta-band::before {
  content: ''; position: absolute; right: -3rem; top: -3rem; width: 16rem; height: 16rem;
  border-radius: 999px; background: radial-gradient(circle, rgba(225,29,72,.5), transparent 70%);
}

/* Pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.pager button, .pager span {
  min-width: 2.4rem; height: 2.4rem; border-radius: .6rem; display: grid; place-items: center;
  font-size: .84rem; font-weight: 700; color: var(--ifsa-muted); border: 1px solid var(--ifsa-line); transition: all .2s;
}
.pager .is-active { background: var(--ifsa-red); border-color: var(--ifsa-red); color: #fff; }
.pager button:hover { border-color: var(--ifsa-red); color: var(--ifsa-red); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1023px) {
  #side-quick { display: none; }
  #quick-donate { margin-top: -2.5rem; }
  .kh-header-inner { height: 4.25rem; padding-inline: 1rem; }
  .kh-brand-name { font-size: .88rem; }
  .kh-mega { display: none; }
}
@media (max-width: 640px) {
  .hero-title { line-height: 1.24; }
  .story-row img { width: 5rem; height: 4.2rem; }
  .donut-wrap { width: 10.5rem; height: 10.5rem; }
  .kh-drawer-body { grid-template-columns: 1fr; }
  .kh-cta { padding: .55rem 1rem; font-size: .82rem; }
}
@media print {
  #side-quick, #quick-donate, .kh-drawer, .kh-mega { display: none !important; }
}
