/* Gotowe plany rejsów 1:1 z Figmą (eksport-2210/plany): lista /plany-rejsow i strona planu.
   Ładowany po content.css i sections.css; kolory plakietek trudności karty są w plan-card.css (dołącza je sama karta). */


/* Trasa jak w Figmie: strzałka na końcu portu (route.blade.php stawia ją przed następnym, więc zawijała się na początek wiersza) */
.plans-wrap .route li + li::before, .plan-facts .route li + li::before { content: none; }
.plans-wrap .route li:not(:last-child)::after, .plan-facts .route li:not(:last-child)::after { content: ""; flex: none; width: 16px; height: 16px; border-radius: var(--radius-full); background: var(--primary-100) url("../img/ikona-strzalka.svg") center / 9.6px no-repeat; }

/* FAQ pod listą: wspólny sections/_faq, odstęp nad nim jak w Figmie */
.plans-faq .faq-list { padding: 193px 0 120px; }

/* Lista: nagłówek z wyszukiwarką */
.plans-head { display: flex; flex-direction: column; align-items: center; padding: 41px var(--gutter) 0; text-align: center; }
.plans-head h1 { margin: 16px 0 0; font-size: var(--fs-h1); font-weight: 500; line-height: 1.2; }
.plans-head__lead { margin: 20px 0 0; font-size: var(--fs-body-1); line-height: 1.4; color: var(--navy-600); }
.plans-search { display: flex; align-items: center; gap: 8px; margin-top: 30px; }
.plans-search label { font-size: var(--fs-body-3); font-weight: 700; color: var(--navy-600); }
.plans-search__field { position: relative; display: block; width: 228px; }
.plans-search input { width: 100%; height: 48px; padding: 0 44px 0 16px; border: 1px solid var(--gray-150); border-radius: var(--radius-full); background: var(--white); font: inherit; font-size: var(--fs-body-3); color: var(--navy-700); -webkit-appearance: none; appearance: none; }
.plans-search input::placeholder { color: var(--gray-500); opacity: 1; }
.plans-search input::-webkit-search-cancel-button { display: none; }
.plans-search input:focus { outline: 2px solid var(--primary-700); outline-offset: 0; border-color: var(--primary-700); }
.plans-search button { position: absolute; top: 50%; right: 12px; display: inline-flex; padding: 2px; border: 0; background: none; color: var(--gray-500); transform: translateY(-50%); cursor: pointer; }
.plans-search button:hover { color: var(--navy-600); }

/* Lista: karty */
.plans-wrap { max-width: calc(1040px + 2 * var(--gutter)); padding-top: 83px; }
.plans-found, .plans-empty { margin: 0 0 var(--space-5); font-size: var(--fs-body-2); color: var(--gray-500); text-align: center; }
.plans-empty { padding: var(--space-6) 0; }
.plans-wrap .plan-list > li + li { margin-top: 40px; padding-top: 40px; border-top: 1px solid #f0f0f4; }
.plans-wrap .plan-card { grid-template-columns: 508px minmax(0, 1fr); gap: 24px; align-items: center; }
.plans-wrap .plan-card__image { aspect-ratio: 508 / 202; border-radius: var(--radius-md); }
.plans-wrap .plan-card__body { gap: 0; }
.plans-wrap .plan-card__body > .plan-meta:first-child .meta { gap: 8px; font-size: var(--fs-body-3); line-height: 24px; color: var(--navy-600); }
.plans-wrap .plan-card__title { margin-top: 7px; font-size: var(--fs-h5); font-weight: 500; line-height: 1.3; }
.plans-wrap .plan-card__title + .plan-meta { margin-top: 7px; gap: 10px; }
.plans-wrap .plan-card .chip { height: 20px; padding: 0 12px; font-size: 11px; font-weight: 600; }
.plans-wrap .plan-card__summary { display: -webkit-box; margin-top: 10px; overflow: hidden; font-size: var(--fs-body-3); line-height: 20px; color: var(--gray-500); -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.plans-wrap .plan-card__body > div { margin-top: 9px; }
.plans-wrap .plan-card .event-card__label { margin: 0 0 5px !important; font-size: var(--fs-body-3); line-height: 18px; color: var(--navy-600); }
.plans-wrap .plan-card .route { gap: 0 8px; font-size: var(--fs-body-3); line-height: 18px; }

/* Lista: FAQ */

/* Plan: okruszki z ikoną domu */
.plan-crumbs { padding: 24px 0; font-size: var(--fs-small); line-height: 20px; }
.plan-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.plan-crumbs li { display: flex; align-items: center; gap: 12px; color: var(--gray-500); }
.plan-crumbs li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.4px solid var(--gray-300); border-right: 1.4px solid var(--gray-300); transform: rotate(45deg); margin-right: 4px; }
.plan-crumbs a { color: var(--gray-500); text-decoration: none; }
.plan-crumbs a:hover { color: var(--navy-600); text-decoration: underline; }
.plan-crumbs__home { display: inline-flex; color: var(--navy-600) !important; }
.plan-crumbs [aria-current="page"] { color: var(--primary-600); }

/* Plan: nagłówek ze zdjęciem */
.plan-hero { min-height: 378px; gap: 0; padding: 56px var(--gutter); }
.plan-hero::after { background: rgba(15, 18, 45, .28); }
.plan-hero__pill { background: var(--white); color: var(--orange-600); }
.plan-hero h1 { max-width: 640px; margin: 14px 0 0; font-size: var(--fs-h1); font-weight: 500; line-height: 1.04; text-wrap: balance; }
.plan-hero__meta { gap: 8px 0; margin-top: 45px; font-size: var(--fs-small); font-weight: 700; }
.plan-hero__meta > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 16px; border-radius: 50%; background: var(--primary-500); vertical-align: middle; }

/* Plan: kolumny 768 + 332, odstęp 100 */
.plan-page { grid-template-columns: minmax(0, 768px) 332px; gap: 100px; justify-content: center; max-width: calc(1200px + 2 * var(--gutter)); padding-top: 113px; padding-bottom: 96px; }
.plan-map .ev-map { margin: 0 0 56px; }
.plan-map .ev-map__canvas { position: relative; height: 484px; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--primary-100), #d9f3fa); }
.plan-map .ev-map__sketch { display: block; width: 100%; height: 100%; }
.plan-map .leaflet-container { font: inherit; }
.plan-lead { margin: 0 0 15px; font-size: var(--fs-body-1); font-weight: 700; line-height: 24px; color: var(--navy-600); }
.plan-intro { margin: 0; font-size: var(--fs-body-2); line-height: 1.375; color: var(--navy-600); }

/* Plan: treść */
.plan-body { margin-top: 96px; color: var(--navy-600); font-size: var(--fs-body-2); line-height: 1.375; }
.plan-body:has(> p:first-child) { margin-top: 22px; }
.plan-body section { margin-top: 72px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.plan-body section:has(> header > p) + section { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--gray-150); }
.plan-body header { margin-bottom: 24px; }
.plan-body section > :last-child { margin-bottom: 0; }  /* odstępy między sekcjami jak w Figmie, bez marginesu ostatniego akapitu */
.plan-body header p { display: inline-flex; align-items: center; height: 48px; margin: 0 0 24px; padding: 0 12px; border-radius: 4px; background: var(--primary-100); color: var(--primary-700); font-size: var(--fs-h5); font-weight: 700; line-height: 1; }
.plan-body h2 { margin: 0; font-size: var(--fs-h2); font-weight: 500; line-height: 1; color: var(--navy-600); }
.plan-body section > h2 { margin: 40px 0 16px; font-size: var(--fs-h4); font-weight: 600; line-height: 1.2; }
.plan-body h3 { margin: 32px 0 12px; font-size: var(--fs-h4); font-weight: 600; line-height: 1.2; color: var(--navy-600); }
.plan-body h4 { margin: 24px 0 8px; font-size: var(--fs-body-1); font-weight: 600; color: var(--navy-600); }
.plan-body p, .plan-body ul, .plan-body ol, .plan-body blockquote { margin: 0 0 22px; }
.plan-body strong { color: inherit; }
.plan-body a { color: var(--navy-600); font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; }
.plan-body a strong { font-weight: inherit; }
.plan-body a:hover { color: var(--primary-700); }

/* Plan: galeria dnia (mozaika 298 | 141 | 298, wiersze 125/266, odstęp 16) */
.plan-gallery { display: grid; gap: 16px; margin: 58px 0 56px; }
.plan-gallery__item { display: block; overflow: hidden; border-radius: var(--radius-lg); background: var(--primary-100); }
.plan-gallery__item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.plan-gallery__item:hover img { transform: scale(1.03); }
.plan-gallery--mosaic { grid-template-columns: 298fr 141fr 298fr; grid-template-rows: 125fr 125fr 16px 125fr; height: 408px; }
.plan-gallery--mosaic .plan-gallery__item:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
.plan-gallery--mosaic .plan-gallery__item:nth-child(2) { grid-area: 2 / 1 / 5 / 2; }
.plan-gallery--mosaic .plan-gallery__item:nth-child(3) { grid-area: 1 / 2 / 4 / 3; }
.plan-gallery--mosaic .plan-gallery__item:nth-child(4) { grid-area: 4 / 2 / 5 / 3; }
.plan-gallery--mosaic .plan-gallery__item:nth-child(5) { grid-area: 1 / 3 / 5 / 4; }
.plan-gallery--n1 { grid-template-columns: 1fr; }
.plan-gallery--n1 .plan-gallery__item { aspect-ratio: 768 / 408; }
.plan-gallery--n2 { grid-template-columns: 1fr 1fr; }
.plan-gallery--n3, .plan-gallery--n4 { grid-template-columns: repeat(3, 1fr); }
.plan-gallery--n2 .plan-gallery__item, .plan-gallery--n3 .plan-gallery__item, .plan-gallery--n4 .plan-gallery__item { aspect-ratio: 4 / 3; }
/* W treści planu: pojedyncze zdjęcie w całości (bez kadrowania), 4 zdjęcia jako 2×2 (mapka + zdjęcie w parach). */
.plan-body .plan-gallery--n1 .plan-gallery__item { aspect-ratio: auto; }
.plan-body .plan-gallery--n1 .plan-gallery__item img { height: auto; }
.plan-body .plan-gallery--n4 { grid-template-columns: 1fr 1fr; }
.plan-anchorage { margin: 50px 0 72px; overflow: hidden; border-radius: var(--radius-lg); }
.plan-anchorage img { display: block; width: 100%; height: auto; }

/* Plan: panel boczny – pływa przy przewijaniu (pod przyklejonym menu); dłuższy niż ekran przewija się w sobie. */
.plan-aside { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; gap: 0; }
.plan-facts { gap: 26px; padding: 0 0 24px 32px; border-left: 2px solid var(--orange-600); }
.plan-facts__row { gap: 24px; }
.plan-facts__row .meta { gap: 8px; font-size: var(--fs-body-2); }
.plan-facts .chip { height: 26px; padding: 0 12px; font-size: var(--fs-body-2); font-weight: 500; }
.plan-facts .chip--green, .plan-facts .chip--orange, .plan-facts .chip--red { font-weight: 700; }
.plan-facts p { margin: 0 0 5px; font-size: var(--fs-body-3); line-height: 18px; color: var(--navy-600); }
.plan-facts .route { font-size: var(--fs-body-3); line-height: 18px; gap: 0 8px; }
.plan-days { margin-top: 40px; }
.plan-days__toggle { display: none; list-style: none; }
.plan-days ol { margin: 0; padding: 0; list-style: none; }
.plan-days ol > li + li { margin-top: 33px; }
.plan-days__day { display: flex; align-items: center; gap: 12px; padding-bottom: 5px; border-bottom: 1px solid var(--gray-150); font-size: var(--fs-h5); font-weight: 600; line-height: 1.3; color: var(--primary-700); text-decoration: none; }
.plan-days__day:hover, .plan-days__day[aria-current="true"] { color: var(--navy-600); }
.plan-days__day .chip { height: 26px; padding: 0 12px; font-size: var(--fs-body-3); font-weight: 600; }
.plan-days__route { margin: 8px 0 0; font-size: var(--fs-body-2); font-weight: 700; color: var(--navy-600); }
.plan-days ul { margin: 8px 0 0; padding: 0 0 0 21px; list-style: none; font-size: var(--fs-body-2); line-height: 1.375; color: var(--navy-600); }
.plan-days ul li { position: relative; }
.plan-days ul li::before { content: ""; position: absolute; left: -17px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary-500); }
.plan-book { height: 48px; margin-top: 24px; }

/* Plan: Polecamy również */
.plan-related { padding: 0 0 114px; }
.plan-related .container { max-width: calc(1080px + 2 * var(--gutter)); }
.plan-related h2 { margin: 0 0 44px; font-size: var(--fs-h1); font-weight: 500; line-height: 1.2; }
.plan-related__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 80px; margin: 0; padding: 0; list-style: none; }
.plan-related__item { display: flex; align-items: flex-start; gap: 24px; padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid #f0f0f4; }
.plan-related__photo { flex: none; width: 124px; height: 124px; overflow: hidden; border-radius: var(--radius-md); background: linear-gradient(160deg, var(--primary-300, #4fc3e8), var(--primary-600) 60%, var(--navy-600)); }
.plan-related__photo img { width: 100%; height: 100%; object-fit: cover; }
.plan-related__item > div { min-width: 0; }
.plan-related__meta { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; line-height: 20px; font-size: var(--fs-small); color: var(--gray-500); }
.plan-related__tag { display: inline-flex; align-items: center; height: 20px; padding: 0 12px; border-radius: var(--radius-full); background: var(--orange-100); color: #c56f0a; font-size: 11px; font-weight: 600; }
.plan-related h3 { margin: 0; font-size: var(--fs-h5); font-weight: 500; line-height: 24px; }
.plan-related__list > li:nth-last-child(-n+2):nth-child(odd), .plan-related__list > li:last-child { margin-bottom: 0; border-bottom: 0; }
.plan-related h3 a { color: var(--navy-600); text-decoration: none; }
.plan-related h3 a:hover { text-decoration: underline; }
.plan-related__lead { margin: 8px 0 0; overflow: hidden; font-size: var(--fs-body-3); color: var(--gray-500); white-space: nowrap; text-overflow: ellipsis; }
.plan-related__more { margin: 62px 0 0; text-align: center; }
.plan-related__more a { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-body-3); font-weight: 700; color: var(--navy-600); text-decoration: none; }
.plan-related__more a:hover { text-decoration: underline; }

@media (max-width: 1199px) {
    .plans-wrap .plan-card { grid-template-columns: 380px minmax(0, 1fr); }
    .plan-page { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
}

@media (max-width: 899px) {
    .plan-page { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; }
    .plan-aside { position: static; order: -1; max-height: none; overflow: visible; }
    .plan-days { margin-top: 32px; padding: 16px 20px; border-radius: var(--radius-md); background: var(--gray-50); }
    .plan-days__toggle { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-body-2); font-weight: 700; color: var(--navy-600); cursor: pointer; }
    .plan-days[open] .plan-days__toggle { margin-bottom: 20px; }
    .plan-days__toggle::-webkit-details-marker { display: none; }
    .plan-days__toggle::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
    .plan-days[open] .plan-days__toggle::after { transform: rotate(-135deg); }
    .plan-related__list { grid-template-columns: minmax(0, 1fr); }
    .plan-related__list > li:nth-last-child(-n+2):nth-child(odd):not(:last-child) { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid #f0f0f4; }
}

/* Telefon (bez ramek mobile w Figmie): jak Blog mobile – 24 px od krawędzi, nagłówek 40/40 z opisem 20/28, FAQ 80 px;
   karta planu jak karta „Gotowe plany” na /czartery (zdjęcie 327:200), plakietki min. 12 px, pola dotyku min. 44 px.
   Strona planu: tylko .plan-page i jej nagłówek (.plan-hero, .plan-crumbs dzieli z blogiem). */
@media (max-width: 767px) {
    .plans-faq { padding-left: 24px; padding-right: 24px; }
    .plans-faq .faq-list { padding: 80px 0; }
    .plans-faq .faq-list__title { margin-bottom: 40px; line-height: 40px; }
    .plans-faq .faq-item__q { min-height: 0; padding: 24px 0; }
    .plans-faq .faq-item__a { margin-top: -8px; }
    .plans-head { padding: 40px 24px 0; }
    .plans-head h1 { margin-top: 16px; font-size: 40px; line-height: 40px; }
    .plans-head__lead { margin-top: 24px; font-size: 20px; line-height: 28px; }
    .plans-head__lead br { display: none; }
    .plans-search { width: 100%; margin-top: 32px; }
    .plans-search label { flex: none; }
    .plans-search__field { flex: 1; width: auto; }
    .plans-search button { right: 2px; justify-content: center; align-items: center; width: 44px; height: 44px; }
    .plans-wrap { padding: 40px 24px 0; }
    .plans-wrap .plan-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .plans-wrap .plan-card__image { aspect-ratio: 327 / 200; border-radius: var(--radius-lg); }
    .plans-wrap .plan-card__title { margin-top: 8px; font-size: 24px; font-weight: 600; line-height: 1.2; }
    .plans-wrap .plan-card__title + .plan-meta { margin-top: 12px; gap: 8px; }
    .plans-wrap .plan-card .chip { height: 24px; font-size: var(--fs-small); }
    .plans-wrap .plan-card__summary { margin-top: 12px; line-height: 1.4; -webkit-line-clamp: 3; line-clamp: 3; }
    .plans-wrap .plan-card__body > div { margin-top: 16px; }
    .plans-wrap .plan-card .route { row-gap: 4px; line-height: 20px; }
    .plans-wrap .plan-list > li + li { margin-top: 40px; padding-top: 40px; }
    .plan-crumbs { padding: 14px 0; }
    .plan-hero { min-height: 300px; padding: 40px var(--gutter); }
    .plan-hero h1 { font-size: var(--fs-h3); line-height: 1.15; }
    .plan-hero__meta { margin-top: 28px; }
    .plan-hero:has(~ .plan-page) { padding: 40px 24px; }
    .plan-hero:has(~ .plan-page) h1 { font-size: 32px; line-height: 1.15; }
    .plan-hero:has(~ .plan-page) .plan-hero__meta { margin-top: 24px; }
    .plan-page { gap: 40px; padding: 40px 24px 80px; }
    .plan-facts { padding-left: 24px; }
    .plan-days { padding: 0 20px; }
    .plan-days[open] { padding-bottom: 20px; }
    .plan-days__toggle { min-height: 56px; }
    .plan-days[open] .plan-days__toggle { margin-bottom: 8px; }
    .plan-days__day { min-height: 44px; padding-bottom: 0; }
    .plan-map .ev-map { margin-bottom: 40px; }
    .plan-map .ev-map__canvas { height: 260px; border-radius: var(--radius-md); }
    .plan-body section { margin-top: 56px; }
    .plan-body h2 { font-size: var(--fs-h3); line-height: 1.15; }
    .plan-body header p { height: 40px; font-size: var(--fs-body-2); }
    .plan-gallery { margin: 24px 0 40px; }
    .plan-gallery--mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; height: auto; }
    .plan-gallery--mosaic .plan-gallery__item { grid-area: auto !important; aspect-ratio: 1; }
    .plan-gallery--mosaic .plan-gallery__item:nth-child(5) { grid-column: 1 / -1 !important; aspect-ratio: 16 / 9; }
    .plan-gallery--n3, .plan-gallery--n4 { grid-template-columns: 1fr 1fr; }
    .plan-gallery__item, .plan-anchorage { border-radius: var(--radius-md); }
    .plan-anchorage { margin: 24px 0 40px; }
    .plan-related { padding: 80px 0; }
    .plan-related .container { padding-left: 24px; padding-right: 24px; }
    .plan-related h2 { margin-bottom: 40px; font-size: 40px; line-height: 40px; }
    .plan-related__item { gap: 16px; }
    .plan-related__photo { width: 88px; height: 88px; }
    .plan-related__tag { height: 24px; font-size: var(--fs-small); }
    .plan-related h3 { font-size: var(--fs-body-2); font-weight: 600; line-height: 1.3; }
    .plan-related__more { margin-top: 40px; }
    .plan-related__more a { min-height: 44px; }
}
