/* Podstrona „Okolica” – nawigacja po sekcjach, banery, karty tras, zakładki, kafelki, galeria. */
.ok { counter-reset: oksec; }
.entry .ok-lead { max-width: 820px; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; text-transform: uppercase; color: var(--ink); }
.entry .ok-lead strong { font-weight: inherit; }
.entry .ok-intro { max-width: 760px; color: var(--muted); }

/* Pasek z sekcjami (tworzy go okolica.js z nagłówków sekcji) */
.ok-nav { position: sticky; z-index: 15; top: var(--ok-top, 72px); margin: 32px -24px 8px; padding: 12px 24px; background: rgba(244, 245, 242, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ok-nav__list { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.ok-nav__list::-webkit-scrollbar { display: none; }
.ok-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.ok-nav a span { font-family: var(--display); font-stretch: 75%; font-size: 13px; opacity: .6; }
.ok-nav a:hover { border-color: var(--pine); color: var(--pine); }
.ok-nav a.is-active { background: var(--pine); border-color: var(--pine); color: #fff; }
.ok-nav a.is-active span { opacity: .8; }

/* Sekcje */
.entry .ok-section { counter-increment: oksec; margin-top: 88px; scroll-margin-top: calc(var(--ok-top, 72px) + 80px); }
.entry .ok-section > * { margin-top: 0; margin-bottom: 20px; }
.entry .ok-section > h2 { margin-top: 0; font-size: clamp(34px, 4.4vw, 54px); }
.entry .ok-section > h2::before { content: counter(oksec, decimal-leading-zero); display: block; margin-bottom: 10px; font-size: 15px; letter-spacing: .2em; color: var(--pine); }
.entry .ok-section > p { max-width: 760px; }

/* Baner sekcji z nagłówkiem na zdjęciu (zdjęcie i nagłówek w tej samej komórce siatki) */
.entry .ok-section { display: grid; grid-template-columns: minmax(0, 1fr); }
.entry .ok-banner { grid-row: 1; grid-column: 1; position: relative; margin: 0 0 28px; height: clamp(200px, 26vw, 320px); border-radius: 18px; overflow: hidden; isolation: isolate; }
.entry .ok-banner img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transform: scale(var(--ok-zoom, 1.08)); transition: transform .2s linear; }
.entry .ok-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,28,26,0) 35%, rgba(20,28,26,.8) 100%); pointer-events: none; }
.entry .ok-banner + h2 { grid-row: 1; grid-column: 1; align-self: end; position: relative; z-index: 2; margin: 0 0 28px; padding: 0 clamp(20px, 3vw, 40px) clamp(22px, 3vw, 36px); color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.entry .ok-banner + h2::before { color: rgba(255,255,255,.85); }

/* Karty tras – rozwijane */
.entry .ok-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.entry .ok-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0; transition: border-color .25s, box-shadow .25s, transform .25s; }
.entry .ok-card:hover { border-color: #c9d1c7; box-shadow: 0 10px 30px rgba(28,36,34,.08); transform: translateY(-2px); }
.entry .ok-card[open] { grid-column: 1 / -1; border-color: var(--pine); }
.entry .ok-card > summary { position: relative; display: block; padding: 24px 64px 24px 24px; cursor: pointer; list-style: none; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 24px; line-height: 1.1; text-transform: uppercase; }
.entry .ok-card > summary::-webkit-details-marker { display: none; }
.entry .ok-card > summary::after { content: "+"; position: absolute; right: 20px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; background: var(--ground); color: var(--pine); font-family: var(--body); font-size: 24px; font-weight: 400; line-height: 34px; text-align: center; transition: transform .3s, background .3s, color .3s; }
.entry .ok-card[open] > summary::after { transform: rotate(45deg); background: var(--pine); color: #fff; }
.entry .ok-card > :not(summary) { margin: 0 24px 16px; }
.entry .ok-card > :last-child { margin-bottom: 24px; }
.entry .ok-card[open] > :not(summary) { animation: okIn .45s cubic-bezier(.2,.7,.2,1) both; }
.entry .ok-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px !important; font-weight: 600; color: var(--pine); }
.entry .ok-card > summary + .ok-meta { margin-top: -10px; }

/* Zakładki (Pieniny / Gorce / Tatry) */
.ok-tabs__bar { display: flex; gap: 6px; padding: 6px; margin-bottom: 24px; border-radius: 999px; background: #fff; border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; }
.ok-tabs__bar button { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 700 18px/1 var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; transition: background .25s, color .25s; white-space: nowrap; }
.ok-tabs__bar button[aria-selected="true"] { background: var(--pine); color: #fff; }
.ok-tabs.is-ready .ok-tab[hidden] { display: none; }
.ok-tabs.is-ready .ok-tab > h3:first-child { display: none; }
.entry .ok-tab { animation: okIn .45s cubic-bezier(.2,.7,.2,1) both; }
.entry .ok-tab > * { margin-top: 0; margin-bottom: 16px; }

/* Kafelki (lista z pogrubionym tytułem) */
.entry ul.ok-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; margin: 8px 0 28px; padding: 0; list-style: none; }
.entry ul.ok-tiles > li { position: relative; margin: 0; padding: 22px 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; font-size: 17px; line-height: 1.5; color: var(--muted); transition: transform .25s, box-shadow .25s, border-color .25s; }
.entry ul.ok-tiles > li:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28,36,34,.08); border-color: #c9d1c7; }
.entry ul.ok-tiles > li strong:first-child { display: block; margin-bottom: 6px; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 22px; line-height: 1.1; text-transform: uppercase; color: var(--ink); }
.entry ul.ok-tiles > li em { display: block; width: fit-content; margin-top: 12px; padding: 5px 12px; border-radius: 999px; background: var(--ground); color: var(--pine); font-style: normal; font-size: 14px; font-weight: 600; }

/* Dwa zdjęcia obok siebie i galeria okolicy */
.entry .ok-duo.wp-block-gallery img { height: clamp(160px, 20vw, 260px) !important; object-fit: cover; border-radius: 16px !important; }
.entry .ok-photos.wp-block-gallery figure.wp-block-image img { border-radius: 12px; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.entry .ok-photos.wp-block-gallery figure.wp-block-image { overflow: hidden; border-radius: 12px; }
.entry .ok-photos.wp-block-gallery figure.wp-block-image:hover img { transform: scale(1.04); }
.entry .ok-note { padding: 18px 22px; border-radius: 14px; background: #fff; border-left: 0; border: 1px dashed #c9d1c7; font-size: 16px !important; color: var(--muted); }
.entry .ok-outro { max-width: 820px; margin-top: 88px; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.15; text-transform: uppercase; }
.entry .ok-outro strong { font-weight: inherit; }

/* Pojawianie się przy przewijaniu */
.ok-js .ok-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.ok-js .ok-reveal.is-in { opacity: 1; transform: none; }
@keyframes okIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
	.entry .ok-cards { grid-template-columns: 1fr; }
	.entry .ok-section { margin-top: 64px; }
	.entry .ok-banner { border-radius: 14px; }
	.ok-nav { margin-left: -24px; margin-right: -24px; }
	.entry .ok-card > summary { font-size: 21px; padding: 20px 60px 20px 20px; }
	.entry .ok-card > :not(summary) { margin-left: 20px; margin-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.ok-js .ok-reveal { opacity: 1; transform: none; transition: none; }
	.entry .ok-banner img { transform: none; transition: none; }
	.entry .ok-card, .entry ul.ok-tiles > li, .entry .ok-tab, .entry .ok-card[open] > :not(summary) { transition: none; animation: none; }
}

/* Siatka strony nie może się rozpychać przez przewijany pasek sekcji */
.page-body > .entry { min-width: 0; }
.entry .ok-photos.wp-block-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px !important; }
.entry .ok-photos.wp-block-gallery figure.wp-block-image { width: auto !important; margin: 0 !important; }
.entry .ok-photos.wp-block-gallery figure.wp-block-image img { width: 100%; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; }
.entry .ok-duo.wp-block-gallery { max-width: 760px; }
.entry .ok-duo.wp-block-gallery { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
.entry .ok-duo.wp-block-gallery figure.wp-block-image { width: auto !important; margin: 0 !important; overflow: hidden; border-radius: 14px; }
.entry .ok-duo.wp-block-gallery figure.wp-block-image img { width: 100%; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px !important; }
