/* Sekcje wspólne strony głównej i landingów (Figma: Strona główna desktop 1440 / mobile 375):
   opinie Google, „Z życia Kubryka”, blog, mozaika galerii, FAQ. Partiale: resources/views/site/sections/ */

.sec-container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sec-container--narrow { max-width: calc(1200px + 2 * 120px); padding: 0 120px; }
.sec-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.sec-title { margin: 0; font-size: var(--fs-h1); font-weight: 500; line-height: 1; color: var(--navy-600); }
.napis { display: inline-block; vertical-align: baseline; }
.napis img { display: inline-block; max-width: none; }

/* Strzałki karuzel: obrys 66 × 40 */
.sec-arrows { display: flex; gap: var(--space-3); }
.sec-arrow { display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 40px; padding: 0; border: 1px solid var(--primary-700); border-radius: var(--radius-full); background: var(--primary-100); color: var(--primary-700); cursor: pointer; transition: background-color .15s; }
.sec-arrow:hover { background: var(--primary-200); }
.sec-arrow[disabled] { cursor: default; background: var(--primary-100); }

/* Karuzele: przewijanie w poziomie (palcem, kółkiem, strzałkami) */
[data-carousel-track] { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
[data-carousel-track]::-webkit-scrollbar { display: none; }
[data-carousel-item] { flex: none; scroll-snap-align: start; }

/* Opinie Google */
.reviews { padding: 140px 0 140px; overflow: hidden; }
.reviews .sec-container { max-width: calc(1200px + 2 * 120px); padding: 0 120px; }
.reviews__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); }
.reviews__rating { display: flex; align-items: center; gap: 0; margin: 0 0 var(--space-4); }
.reviews__source { display: inline-flex; align-items: center; gap: 4px; padding-right: 16px; margin-right: 16px; border-right: 1px solid var(--gray-150); font-size: var(--fs-body-1); color: var(--gray-500); line-height: 1; }
.reviews__source img { width: 74px; height: 28px; }
.reviews__score-row { display: inline-flex; align-items: center; }
.reviews__stars { display: inline-flex; gap: 0; }
.reviews__score { margin-left: 8px; padding: 4px 12px; border-radius: var(--radius-full); background: var(--orange-100); color: var(--orange-600); font-size: var(--fs-body-3); font-weight: 700; line-height: 1.3; }
.reviews .sec-arrows { margin: 0 -22px 0 0; }
.reviews__track { gap: 32px; margin-top: 64px; padding: 0 max(120px, calc((100vw - 1200px) / 2)); scroll-padding-inline: max(120px, calc((100vw - 1200px) / 2)); }
.review { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-5); width: 320px; min-height: 308px; padding: 40px 40px 38px; border: 1px solid var(--gray-50); border-radius: var(--radius-lg); background: var(--white); transition: width .3s; }
.review.is-active { width: 560px; background: radial-gradient(70% 95% at 88% 58%, #dcf1f9 0%, #eef9fc 45%, var(--white) 85%); }
.review__text { margin: 0; }
.review__text p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 0 -.4em; padding-left: .4em; text-indent: -.4em; overflow-wrap: anywhere; font-size: var(--fs-body-2); line-height: 22px; color: var(--navy-600); }
.review__text p::before { content: "“"; }
.review.is-active .review__text p { -webkit-line-clamp: 10; margin: 0; padding: 0; text-indent: 0; }
.review.is-active .review__text p::before { content: none; }
.review__author { display: flex; align-items: center; gap: 12px; }
.review__avatar { flex: none; width: 56px; height: 56px; border-radius: var(--radius-full); object-fit: cover; }
.review__avatar--letter { display: inline-flex; align-items: center; justify-content: center; background: var(--orange-200); color: var(--orange-600); font-size: 24px; font-weight: 500; }
.review__signature { height: auto; max-height: 34px; width: auto; margin-bottom: 9px; }
.review__name { margin: 0 0 4px; font-family: var(--font-script); font-size: 28px; font-weight: 400; line-height: 1.2; color: var(--navy-600); }
.review__when { margin: 0; font-size: var(--fs-small); color: var(--gray-500); }

/* „Z życia Kubryka” */
.posts { padding: 100px 0; overflow: hidden; }
.posts .sec-title { font-size: var(--fs-h2); }
.posts .sec-head { margin-bottom: 32px; }
.posts__track { gap: 56px; padding: 0 max(80px, calc((100vw - 1280px) / 2)); scroll-padding-inline: max(80px, calc((100vw - 1280px) / 2)); }
.post { display: flex; gap: 24px; width: 610px; }
.post__photo-link { flex: none; display: block; border-radius: var(--radius-lg); cursor: pointer; transition: opacity .2s; }
.post__photo-link:hover { opacity: .9; }
/* Kolaż 2×2 z czterech pierwszych zdjęć wpisu (Figma); przy mniejszej liczbie zdjęcia rozciągają się na wolne pola. */
.post__collage { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 2px; width: 312px; height: 240px; overflow: hidden; }
.post__collage img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.post__collage--1 img { grid-area: 1 / 1 / 3 / 3; }
.post__collage--2 img, .post__collage--3 img:first-child { grid-row: 1 / 3; }
.post__body { padding-top: 16px; }
.post__date { margin: 0 0 16px; font-size: var(--fs-body-3); color: var(--primary-600); }
.post__text { margin: 0; white-space: pre-line; font-size: var(--fs-body-3); line-height: 20px; color: var(--gray-500); }
.posts__nav { display: flex; justify-content: center; margin-top: 54px; }

/* Blog „Dzielimy się wiedzą” */
.blog-teasers { padding: 16px; }
.blog-teasers__inner { max-width: 1408px; margin: 0 auto; padding: 104px 104px 100px; border-radius: var(--radius-lg); background: linear-gradient(160deg, #fde8cc 0%, var(--orange-100) 55%, var(--orange-100) 100%); }
.blog-teasers__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); max-width: 1200px; margin: 0 auto 91px; }
.blog-teasers__head .pill { background: var(--white); }
.blog-teasers__title { margin: 17px 0 0; font-size: 64px; font-weight: 500; line-height: 1; }
.blog-teasers__head .btn { margin-bottom: 4px; }
.btn--lg { height: 48px; padding: 0 var(--space-5); }
.blog-teasers__grid { display: grid; grid-template-columns: 540px 540px; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.blog-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.blog-item { display: flex; gap: 24px; padding: 0 0 32px; border-bottom: 1px solid var(--orange-200); }
.blog-item + .blog-item { padding-top: 32px; }
.blog-item:last-child { border-bottom: 0; padding-bottom: 0; }
.blog-item__photo { flex: none; width: 124px; height: 124px; border-radius: var(--radius-md); object-fit: cover; }
.blog-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-small); color: var(--gray-500); }
.blog-tag { display: inline-flex; padding: 4px 12px; border-radius: var(--radius-full); background: var(--white); color: var(--orange-600); font-size: 10px; font-weight: 700; line-height: 1.3; }
.blog-item__title { margin: 0 0 8px; max-width: 360px; font-size: var(--fs-h5); font-weight: 600; line-height: 1.2; }
.blog-item__title a, .blog-big__title a { color: var(--navy-600); text-decoration: none; }
.blog-item__title a:hover, .blog-big__title a:hover { text-decoration: underline; }
.blog-item__lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: var(--fs-body-3); line-height: 20px; color: var(--gray-500); }
.blog-item:first-child .blog-item__lead, .blog-item:nth-child(2) .blog-item__lead { -webkit-line-clamp: 1; }
.blog-item:last-child .blog-item__title { max-width: 392px; }
.blog-big__photo { width: 540px; height: 330px; margin-bottom: 24px; border-radius: var(--radius-lg); object-fit: cover; }
.blog-big .blog-meta { margin-bottom: 12px; }
.blog-big__title { margin: 0 0 12px; font-size: var(--fs-h3); font-weight: 500; line-height: 1.2; }
.blog-big__lead { margin: 0; font-size: var(--fs-body-3); line-height: 20px; color: var(--gray-500); }

/* Mozaika galerii: kolumny 470 / 227 / 227 / 227, wiersze 196, odstęp 16 */
.pmosaic { padding: 80px 120px; }
.pmosaic__grid { display: grid; grid-template-columns: 470fr 227fr 227fr 227fr; grid-template-rows: repeat(3, 196px); gap: 16px; max-width: 1200px; margin: 0 auto; padding: 0; list-style: none; }
.pmosaic__item { overflow: hidden; border-radius: var(--radius-lg); }
.pmosaic__item img { width: 100%; height: 100%; object-fit: cover; }
.pmosaic__item--1 { grid-area: 1 / 1; }
.pmosaic__item--2 { grid-area: 1 / 2; }
.pmosaic__item--3 { grid-area: 1 / 3 / span 2 / span 2; }
.pmosaic__item--4 { grid-area: 2 / 1 / span 2; }
.pmosaic__item--5 { grid-area: 2 / 2; }
.pmosaic__item--6 { grid-area: 3 / 2 / auto / span 2; }
.pmosaic__item--more { grid-area: 3 / 4; }
.pmosaic__more { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: 100%; padding: 32px; background: var(--orange-500); color: var(--white); font-size: var(--fs-h4); font-weight: 600; line-height: 1.2; text-decoration: none; transition: background-color .15s; }
.pmosaic__more:hover { background: var(--orange-600); color: var(--white); }

/* FAQ */
.faq-list { max-width: 1080px; margin: 0 auto; padding: 120px 0 120px; }
.faq-list__title { margin-bottom: 40px; text-align: center; }
.faq-list__items { border-top: 1px solid var(--gray-50); }
.faq-item { border-bottom: 1px solid var(--gray-50); }
.faq-item__q { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 79px; padding: 20px 0; font-size: var(--fs-h5); font-weight: 600; line-height: 1.2; color: var(--navy-600); cursor: pointer; list-style: none; }
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__icon { flex: none; width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--primary-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23006e94' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v15M6 13l6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .2s; }
.faq-item[open] .faq-item__icon { transform: rotate(180deg); }
.faq-item__a { padding: 0 64px 24px 0; margin-top: -10px; }
.faq-item__a p { margin: 0; font-size: var(--fs-body-3); line-height: 20px; color: var(--gray-500); }
.faq-list__more { margin: 40px 0 0; text-align: center; }
.faq-list__more .btn { gap: 12px; padding: 0 32px; }
.faq-list__arrow { filter: invert(26%) sepia(83%) saturate(1500%) hue-rotate(175deg) brightness(90%); }

@media (max-width: 1199px) {
    .sec-container--narrow, .reviews .sec-container { padding: 0 var(--gutter); }
    .reviews__track { padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
    .posts__track { padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
    .blog-teasers__inner { padding: 80px var(--gutter); }
    .blog-teasers__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
    .blog-big__photo { width: 100%; height: auto; aspect-ratio: 540 / 330; }
    .pmosaic { padding: 80px var(--gutter); }
    .faq-list { padding: 100px var(--gutter); }
}

/* Telefon (Figma mobile 375) */
@media (max-width: 767px) {
    .sec-title { font-size: 40px; line-height: 1.05; }
    .posts .sec-title { font-size: var(--fs-h2); }
    .reviews { padding: 80px 0; }
    .reviews__head { flex-direction: column; align-items: center; text-align: center; }
    /* Figma mobile: „Opinie Google”, tytuł, gwiazdki z oceną */
    /* :not(.sec-arrows): nagłówek ma display: contents, więc strzałki też są dzieckiem .reviews__head */
    .reviews__head > div:not(.sec-arrows) { display: flex; flex-direction: column; align-items: center; gap: 16px; }
    .reviews__rating { display: contents; }
    .reviews__source { order: 1; padding: 0; margin: 0; border: 0; }
    .reviews__head .sec-title { order: 2; max-width: 260px; margin-top: 17px; }
    .reviews__score-row { order: 3; }
    /* strzałki pod kartami */
    .reviews { display: flex; flex-direction: column; }
    .reviews .sec-container, .reviews__head { display: contents; }
    .reviews__head > div:not(.sec-arrows) { order: 1; padding: 0 var(--gutter); }
    .reviews__track { order: 2; }
    .reviews .sec-arrows { order: 3; align-self: center; margin: 40px 0 0; }
    .reviews__track { gap: 16px; margin-top: 40px; padding: 0 24px; scroll-padding-inline: 24px; }
    .review, .review.is-active { width: 320px; min-height: 308px; gap: 29px; padding: 40px; background: var(--white); }
    .review__text p, .review.is-active .review__text p { -webkit-line-clamp: 6; margin: 0; padding: 0; text-indent: 0; }
    .review.is-active .review__text p::before { content: "“"; }
    .posts { padding: 80px 0; }
    .posts__track { gap: 32px; padding: 0 24px; scroll-padding-inline: 24px; }
    .post { flex-direction: column; gap: 16px; width: 300px; }
    .post__collage { width: 300px; height: 232px; }
    .post__body { padding: 24px 0 0; }
    .posts__nav { margin-top: 40px; }
    /* Figma mobile: karta z marginesem 16, tytuł do lewej, wpisy jeden pod drugim ze zdjęciem na całą szerokość, przycisk na dole */
    .blog-teasers { padding: 0 16px; }
    .blog-teasers__inner { display: flex; flex-direction: column; padding: 40px 16px; }
    .blog-teasers__head { display: contents; }
    .blog-teasers__title { margin: 16px 0 40px; font-size: 40px; line-height: 1.05; }
    .blog-teasers__head .btn { order: 3; align-self: stretch; margin: 40px 0 0; }
    .blog-teasers__grid { display: flex; flex-direction: column; gap: 0; width: 100%; }
    .blog-item { flex-direction: column; gap: 24px; }
    .blog-item__photo { width: 100%; height: 200px; }
    .blog-item__title, .blog-item:last-child .blog-item__title { max-width: none; font-size: var(--fs-h5); }
    .blog-item__lead, .blog-item:first-child .blog-item__lead, .blog-item:nth-child(2) .blog-item__lead { -webkit-line-clamp: 5; }
    /* Figma mobile: trzy wpisy, bez dużego kafla */
    .blog-big { display: none; }
    /* Figma mobile: 4 zdjęcia (wąskie + szerokie, szerokie + wąskie) i kafel galerii na całą szerokość */
    .pmosaic { padding: 48px 16px; }
    .pmosaic__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 148px; gap: 8px; }
    .pmosaic__item { border-radius: var(--radius-md); }
    .pmosaic__item--1, .pmosaic__item--4 { display: none; }
    .pmosaic__item--2, .pmosaic__item--6 { grid-area: auto / span 1; }
    .pmosaic__item--3, .pmosaic__item--5 { grid-area: auto / span 2; }
    .pmosaic__item--more { grid-area: auto / span 3; }
    .pmosaic__more { padding: 32px; font-size: var(--fs-h4); }
    .faq-list { padding: 80px 24px; }
    .faq-list__title { margin-bottom: 40px; }
    .faq-item__q { min-height: 80px; padding: 20px 0; font-size: var(--fs-h5); }
    .faq-item__a { padding-right: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    [data-carousel-track] { scroll-behavior: auto; }
}
