/* Kolory i podstawowe ustawienia */
:root {
  --navy: #17365b;
  --navy-deep: #102944;
  --green: #159653;
  --green-dark: #0e7040;
  --gold: #f0a900;
  --red: #cf174e;
  --coral: #ef5b50;
  --ink: #243342;
  --muted: #62717c;
  --cream: #f8f6ef;
  --sand: #eee8d9;
  --white: #fff;
  --shadow: 0 18px 50px rgba(23, 54, 91, .10);
  --radius: 22px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; color: var(--ink); background: #fff; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.7; overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.narrow-container { max-width: 1400px; }
.section-projects .container { width: min(1400px, calc(100% - 48px)); }
.skip-link { position: absolute; z-index: 1000; top: -60px; left: 16px; padding: 12px 18px; background: var(--navy); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* Przyklejone menu */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(23,54,91,.10); backdrop-filter: blur(12px); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; width: 178px; flex: 0 0 178px; }
.brand img { width: 178px; height: 82px; object-fit: contain; }
.primary-navigation { display: flex; align-items: center; gap: clamp(13px, 1.8vw, 26px); }
.primary-navigation a { text-decoration: none; font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; transition: color .2s ease; }
.primary-navigation a:hover { color: var(--green); }
.primary-navigation .nav-cta { color: #fff; background: var(--green); border-radius: 999px; padding: 12px 20px; box-shadow: 0 7px 18px rgba(21,150,83,.20); }
.primary-navigation .nav-cta:hover { color: #fff; background: var(--green-dark); }
.menu-toggle { display: none; width: 48px; height: 48px; border: 1px solid #d8e1dc; border-radius: 12px; background: #fff; padding: 11px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--navy); border-radius: 3px; transition: transform .2s ease, opacity .2s ease; }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #fbfaf5 0%, #f4f6ed 60%, #fdf8ec 100%); padding: 58px 0 72px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 54px; }
.hero-copy { padding: 24px 0; }
.eyebrow { margin: 0 0 12px; color: var(--green-dark); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.18; }
h1 { max-width: 650px; margin: 0 0 20px; font-size: clamp(2.6rem, 5vw, 4.6rem); letter-spacing: -.045em; }
.hero-lead { max-width: 600px; margin: 0; color: #405361; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.5; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 13px 25px; border: 2px solid transparent; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 15px; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 10px 22px rgba(21,150,83,.20); }
.button-primary:hover { background: var(--green-dark); }
.button-outline { color: var(--navy); border-color: var(--navy); background: transparent; }
.button-outline:hover { color: #fff; background: var(--navy); }
.hero-visual { position: relative; max-width: 490px; justify-self: end; width: 100%; }
.hero-visual > img { width: 100%; aspect-ratio: 1 / 1; max-height: none; object-fit: cover; object-position: center 35%; border-radius: 28px; box-shadow: var(--shadow); }
.hero-note { position: absolute; right: -20px; bottom: 28px; padding: 13px 19px; border-radius: 14px; background: #fff; color: var(--navy); font-weight: 800; box-shadow: var(--shadow); }
.note-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--gold); }
.hero-shape { display: none; }
.hero .eyebrow {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--green-dark) !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
    margin: 0 0 12px;
}



/* Wspólne ustawienia sekcji */
.section { padding: 94px 0; }
.section-heading { max-width: 780px; margin: 0 auto 42px; text-align: center; }
.section-heading h2, .about-copy h2 { margin: 0; font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.035em; }
.section-about { background: #fff; }
.about-grid { display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(42px, 7vw, 90px); }
.about-image-wrap { position: relative; max-width: 380px; }
.about-image-wrap img { width: 100%; aspect-ratio: 1 / 1; max-height: none; object-fit: cover; object-position: center 20%; border-radius: 28px; box-shadow: var(--shadow); }
.image-caption { position: absolute; bottom: 18px; left: 18px; right: 18px; padding: 10px 12px; text-align: center; border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.93); font-size: 13px; font-weight: 800; }
.about-copy .lead { margin: 22px 0 14px; color: var(--navy); font-size: 1.2rem; font-weight: 700; }
.about-copy p:not(.eyebrow) { max-width: 720px; text-align: justify; text-justify: inter-word; }

/* Kafelki filarów */
.section-pillars { background: var(--cream); }
.pillar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pillar-card { min-height: 300px; padding: 30px 25px; border: 1px solid rgba(23,54,91,.08); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 30px rgba(23,54,91,.05); transition: transform .2s ease, box-shadow .2s ease; }
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar-icon { display: grid; width: 52px; height: 52px; margin-bottom: 22px; place-items: center; border-radius: 16px; color: var(--green-dark); background: #e8f5ec; font-size: 30px; }
.pillar-card:nth-child(2) .pillar-icon { color: var(--red); background: #fbeaf0; }
.pillar-card:nth-child(3) .pillar-icon { color: var(--navy); background: #eaf0f8; }
.pillar-card:nth-child(4) .pillar-icon { color: #b37a00; background: #fff4d7; }
.pillar-card h3 { margin: 0 0 14px; font-size: 1.13rem; }
.pillar-card p { margin: 0; color: #596873; font-size: 15px; line-height: 1.65; text-align: justify; text-justify: inter-word; }

/* Wolontariat i darowizny */
.section-help { background: #fff; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.help-card { padding: clamp(28px, 4vw, 44px); border-radius: 26px; }
.volunteer-card { background: #edf6ef; }
.donation-card { background: #f8f3e7; }
.help-symbol { display: inline-grid; width: 54px; height: 54px; place-items: center; margin-bottom: 20px; border-radius: 18px; color: var(--green-dark); background: #fff; font-size: 29px; }
.donation-card .help-symbol { color: var(--red); }
.help-card h3 { margin: 0 0 16px; font-size: 1.7rem; }
.help-card > p { margin: 0 0 24px; color: #53636c; }
.volunteer-card > p { text-align: justify; text-justify: inter-word; }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--green-dark); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bank-box { padding: 22px; border: 1px solid #e2d8c2; border-radius: 18px; background: #fff; }
.bank-name { margin: 0 0 9px; color: var(--muted); font-size: 14px; font-weight: 700; }
.account-number { margin: 0 0 14px; color: var(--navy); font-size: clamp(1rem, 2.2vw, 1.45rem); font-weight: 850; letter-spacing: .035em; overflow-wrap: anywhere; word-break: break-word; font-variant-numeric: tabular-nums; }
.copy-button { min-height: 44px; padding: 9px 17px; border: 0; border-radius: 999px; color: #fff; background: var(--navy); font-weight: 750; cursor: pointer; }
.copy-button:hover { background: var(--navy-deep); }
.payment-title { margin: 16px 0 0; font-size: 14px; font-weight: 700; }
.copy-status { display: block; min-height: 1.4em; margin-top: 5px; color: var(--green-dark); font-size: 13px; }

/* Projekty – accordion */
.section-projects { background: var(--cream); }
.project-item { overflow: hidden; margin: 0 0 16px; border: 1px solid #e5e2d8; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(23,54,91,.04); }
.project-heading { margin: 0; }
.accordion-trigger { display: grid; width: 100%; grid-template-columns: 1fr auto 38px; gap: 18px; align-items: center; padding: 23px 25px; border: 0; background: #fff; text-align: left; cursor: pointer; }
.accordion-trigger:hover { background: #fbfcf9; }
.project-heading-text { color: var(--navy); font-size: 1.12rem; font-weight: 850; }
.project-meta { color: var(--muted); font-size: 13px; font-weight: 700; }
.accordion-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 25px; line-height: 1; transition: transform .2s ease; }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.project-panel { border-top: 1px solid #ecebe5; }
.project-content { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 28px; padding: 28px; }
.project-image-button { position: sticky; top: 110px; display: block; align-self: start; width: 100%; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: zoom-in; text-align: center; }
.project-image { display: block; width: 100%; max-height: 320px; object-fit: cover; object-position: center; border-radius: 14px; }
.zoom-hint { display: block; margin-top: 8px; color: var(--green-dark); font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.project-image.poster-image { object-fit: contain; background: #f7f6f1; }
.project-videos { padding: 0 28px 30px; }
.project-videos h4 { margin: 0 0 16px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.video-frame { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 12px; background: #e9eee9; box-shadow: 0 6px 18px rgba(23,54,91,.08); }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.image-lightbox { position: fixed; width: min(94vw, 1200px); max-width: none; max-height: 92vh; padding: 54px 18px 18px; border: 0; border-radius: 16px; background: #102944; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.image-lightbox::backdrop { background: rgba(8,20,32,.82); }
.image-lightbox img { display: block; max-width: 100%; max-height: calc(92vh - 80px); width: auto; height: auto; margin: auto; object-fit: contain; }
.lightbox-close { position: absolute; top: 8px; right: 12px; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #fff; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; }
.project-description p:first-child { margin-top: 0; }
.project-description h4 { margin: 26px 0 10px; font-size: 1.1rem; }
.project-description li { margin-bottom: 9px; }
.project-facts { padding-left: 22px; }

/* Kontakt */
.section-contact { background: #f4f7f2; }
.contact-card { display: grid; grid-template-columns: .7fr 1.3fr; gap: 42px; align-items: center; max-width: 980px; margin: auto; padding: clamp(26px, 4vw, 48px); border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.contact-brand { text-align: center; }
.contact-brand img { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; height: auto; margin: 0 auto 18px; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
.contact-brand h3 { margin: 0; font-size: 1.25rem; }
.contact-details { min-width: 0; }
.contact-row { display: grid; grid-template-columns: minmax(130px, .55fr) 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf0ed; }
.contact-row:last-child { border-bottom: 0; }
.contact-label { color: var(--muted); font-size: 14px; font-weight: 800; }
.contact-row a { color: var(--green-dark); font-weight: 700; overflow-wrap: anywhere; }

/* Stopka – media społecznościowe oraz pasek z danymi Fundacji */
.site-footer { padding: 42px 0 0; color: #edf3f6; background: #102944; }
.footer-social { padding-bottom: 34px; text-align: center; }
.footer-social h2 { margin: 0 0 22px; color: #fff; font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social-links a { display: inline-flex; min-width: 150px; min-height: 48px; align-items: center; justify-content: center; padding: 11px 22px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; color: #fff; font-weight: 800; text-decoration: none; transition: background .2s ease, border-color .2s ease; }
.social-links a:hover { border-color: var(--green); background: var(--green-dark); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 26px 0 30px; border-top: 1px solid rgba(237,243,246,.22); }
.footer-legal { min-width: 0; max-width: 1050px; }
.footer-legal p { margin: 0; color: #d2dce5; font-size: 13px; line-height: 1.65; }
.footer-legal .footer-foundation-name { margin-bottom: 5px; color: #edf3f6; font-size: 16px; font-weight: 650; }
.back-to-top { flex: 0 0 auto; color: #fff; font-size: 16px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.back-to-top:hover { color: #b9e2c9; }

/* Tablet */
@media (max-width: 1050px) {
  .primary-navigation { gap: 12px; }
  .primary-navigation a { font-size: 13px; }
  .primary-navigation .nav-cta { padding: 10px 15px; }
  .pillar-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-grid { gap: 32px; }
}

/* Menu mobilne i układy węższych ekranów */
@media (max-width: 820px) {
  html { scroll-padding-top: 78px; }
  .container { width: min(var(--container), calc(100% - 36px)); }
  .header-inner { min-height: 74px; }
  .brand { width: 140px; flex-basis: 140px; }
  .brand img { width: 140px; height: 68px; }
  .menu-toggle { display: block; }
  .primary-navigation { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 18px 20px; border-bottom: 1px solid #e5ebe6; background: #fff; box-shadow: 0 18px 24px rgba(16,41,68,.10); }
  .primary-navigation.is-open { display: flex; }
  .primary-navigation a { padding: 13px 12px; border-bottom: 1px solid #eef1ed; font-size: 16px; }
  .primary-navigation .nav-cta { margin-top: 12px; text-align: center; border: 0; }
  .hero { padding: 40px 0 55px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { padding: 0; }
  .hero-visual { justify-self: center; max-width: 560px; }
  .hero-visual > img { max-height: none; border-radius: 24px; object-position: center 30%; }
  .hero-note { right: 12px; bottom: 14px; }
  .section { padding: 72px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .about-image-wrap { max-width: 430px; margin: 0 auto; }
  .about-image-wrap img { max-height: none; border-radius: 24px; }
  .about-copy { max-width: 720px; }
  .help-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; gap: 28px; }
  .contact-brand img { width: 100%; max-width: 520px; height: auto; }
  
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .section-projects .container { width: calc(100% - 32px); }
  h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); }
  .hero-lead { font-size: 1.12rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; min-height: 54px; }
  .hero-visual > img { max-height: none; }
  .hero-note { right: 8px; bottom: 8px; font-size: 13px; }
  .section { padding: 62px 0; }
  .section-heading { margin-bottom: 30px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-card { min-height: auto; padding: 26px; }
  .help-card { padding: 26px 22px; }
  .bank-box { padding: 17px 14px; }
  .account-number { font-size: clamp(.95rem, 4.4vw, 1.25rem); letter-spacing: .01em; }
  .accordion-trigger { grid-template-columns: 1fr 34px; gap: 10px; padding: 19px 16px; }
  .project-heading-text { font-size: 1rem; }
  .project-meta { grid-column: 1; grid-row: 2; font-size: 12px; }
  .accordion-icon { grid-column: 2; grid-row: 1 / span 2; }
  .project-content { grid-template-columns: 1fr; padding: 20px 17px; gap: 20px; }
  .project-image-button { position: static; max-width: 300px; margin: auto; }
  .project-image { max-height: 360px; }
  .project-videos { padding: 0 17px 22px; }
  .video-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-card { padding: 24px 18px; }
  .contact-row { grid-template-columns: 1fr; gap: 3px; padding: 10px 0; }
}


@media (max-width: 640px) {
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 18px; }
  .back-to-top { align-self: flex-start; }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .container { width: calc(100% - 26px); }
  .section-projects .container { width: calc(100% - 26px); }
  .brand { width: 122px; flex-basis: 122px; }
  .brand img { width: 122px; }
  .menu-toggle { width: 44px; height: 44px; }
  .account-number { font-size: .88rem; letter-spacing: 0; }
  .bank-box { padding-inline: 11px; }
  .hero-note { position: static; display: inline-block; margin: 12px 0 0; }
}

/* Użytkownicy ograniczający ruch */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Dodatkowe dopracowanie: nagłówek Hero, filmy i logotypy partnerów */
#hero { scroll-margin-top: 92px; }
.brand { cursor: pointer; }
.hero-copy h1 { max-width: 100%; font-size: clamp(1.55rem, 3.2vw, 2.55rem); line-height: 1.12; }
.hero-copy h1 > span { display: block; }
.hero-copy h1 .hero-title-name { white-space: nowrap; font-size: .92em; }
.hero-note { display: none !important; }
.video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin-inline: 0; gap: 18px; }
.video-frame { width: 100%; }
.section-partners { background: #fff; padding-top: 76px; }
.section-partners .section-heading { max-width: 900px; }
.partner-logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: clamp(14px, 2vw, 28px); }
.partner-logo { display: flex; min-width: 0; min-height: 150px; align-items: center; justify-content: center; padding: 12px; border: 1px solid #edf0eb; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(23,54,91,.045); }
.partner-logo img { display: block; width: 100%; height: 120px; object-fit: contain; }
@media (max-width: 1050px) {
  .partner-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #hero { scroll-margin-top: 78px; }
  .hero-copy h1 { max-width: 100%; font-size: clamp(1.55rem, 4.4vw, 2.25rem); }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hero-copy h1 { max-width: 100%; font-size: clamp(1.28rem, 6vw, 1.75rem); }
  .hero-copy h1 .hero-title-name { font-size: .9em; }
  .partner-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .partner-logo { min-height: 112px; padding: 8px; border-radius: 12px; }
  .partner-logo img { height: 88px; }
}
@media (max-width: 360px) {
  .hero-copy h1 { font-size: 1.22rem; }
  .partner-logos { grid-template-columns: 1fr; }
  .partner-logo { min-height: 100px; }
  .partner-logo img { height: 82px; }
}
@media (max-width: 768px) {
    .project-videos .video-grid {
        grid-template-columns: 1fr !important;
    }
}

