/*
 * Mobile navigation and responsive adjustments.
 *
 * Loaded last, so rules here override the per-section stylesheets.
 */

/* Releases the desktop min-height reservations so sections shrink to content. */
@media (max-width: 991px) {
	.mission,
	.impact,
	.tax,
	.donation,
	.partners {
		min-height: auto;
		display: block;
	}
}

@media (max-width: 768px) {
	.site-header__toggle {
		display: flex;
		position: relative;
		z-index: 10000;
	}

	.site-header__panel {
		position: fixed;
		top: 0;
		right: 0;
		width: min(320px, 85vw);
		max-width: 100%;
		height: 100vh;
		height: 100dvh;
		flex-direction: column;
		align-items: stretch;
		padding: 80px 24px 32px;
		background: #ffffff;
		box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
		clip-path: inset(0 0 0 100%);
		visibility: hidden;
		pointer-events: none;
		transition: clip-path 0.35s ease, visibility 0s linear 0.35s;
		overflow-y: auto;
		overscroll-behavior: contain;
		z-index: 9998;
	}

	.site-header__panel.is-open {
		clip-path: inset(0);
		visibility: visible;
		pointer-events: auto;
		transition-delay: 0s;
	}

	.site-header__backdrop {
		position: fixed;
		inset: 0;
		z-index: 9997;
		display: block;
		background: rgba(0, 0, 0, 0.25);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.35s ease, visibility 0s linear 0.35s;
	}

	.site-header__panel.is-open + .site-header__backdrop {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition-delay: 0s;
	}

	.primary-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}

	.primary-nav__link {
		display: block;
		padding: 12px 16px;
		font-size: 0.95rem;
		white-space: normal;
	}

	.primary-nav__link--contact {
		text-align: center;
		margin-top: 8px;
	}

	/*
	 * The caret is a separate tap target: it toggles the submenu while the
	 * label scrolls to the section, so it is moved to the end of the row and
	 * given a 44px hit area that does not overlap the label.
	 */
	.primary-nav__link--parent {
		position: relative;
		padding-right: 56px;
	}

	.primary-nav__caret {
		position: absolute;
		top: 50%;
		right: 24px;
		margin-top: -2px;
		margin-left: 0;
	}

	.primary-nav__caret::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		width: 44px;
		height: 44px;
		transform: translate(-50%, -50%);
	}

	/* The submenu becomes an inline, tap-to-open list inside the drawer. */
	.primary-nav__submenu {
		position: static;
		min-width: 0;
		display: none;
		padding: 2px 0 6px 12px;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

	.primary-nav__item--has-children.is-open > .primary-nav__submenu {
		display: flex;
	}

	.primary-nav__link--sub {
		padding: 10px 16px;
		font-size: 0.9rem;
		white-space: normal;
	}

	.site-header__social {
		margin-top: 24px;
		justify-content: center;
	}

	.site-header__inner {
		padding: 10px 16px;
	}

	.site-logo {
		height: 64px;
	}

	.site-header.is-scrolled .site-logo {
		height: 54px;
	}
}

@media (max-width: 480px) {
	.about__media,
	.help-card,
	.donation-card {
		width: 100%;
		min-width: 0;
	}

	.hero__shell {
		padding: 60px 16px;
	}

	.donation__account-number {
		font-size: 1rem;
	}
}
@media (max-width: 768px) {
    .news-card__more {
        display: none !important;
    }
}

/* Liczniki - poprawka mobilna */
@media (max-width: 768px) {
        .kn-numbers {
                padding: 2.5rem 0;
        }

        .kn-numbers__grid {
                gap: 1.25rem 0.75rem;
        }

        .kn-number {
                padding-left: 0.5rem;
        }

        .kn-number strong {
                font-size: 2rem;
                letter-spacing: -0.04em;
        }

        .kn-number span {
                font-size: 0.8rem;
        }
}

@media (max-width: 480px) {
        .kn-numbers {
                padding: 2rem 0;
        }

        .kn-numbers__grid {
                gap: 1rem 0.5rem;
        }

        .kn-number strong {
                font-size: 1.8rem;
                letter-spacing: -0.03em;
        }

        .kn-number span {
                font-size: 0.78rem;
        }
}
