/* ===========================================
   pages.css — Страничные стили
   Здесь хранятся стили, специфичные для
   отдельных страниц сайта.
   =========================================== */

/* ─────────────────────────────────────────────
   services.html — Страница «Тележки»
   ───────────────────────────────────────────── */

/* Page intro */
.tk-page-intro {
  padding: calc(var(--nav-h) + 72px) 0 64px;
  position: relative;
  text-align: center;
  overflow: hidden;
  background: var(--cream);
}
.tk-page-intro__bg {
  position: absolute;
  inset: 0;
  background-image: url(../images/services/service-gelato.jpg);
  background-size: cover;
  background-position: center 40%;
  opacity: 0.13;
  z-index: 0;
}
.tk-page-intro__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--cream) 0%, transparent 30%, transparent 70%, var(--cream) 100%);
}
.tk-page-intro > .container { position: relative; z-index: 1; }
.tk-page-intro .subheading { margin-bottom: 10px; }
.tk-page-intro__text { max-width: 680px; margin: 16px auto 0; color: var(--gray); line-height: 1.75; font-size: 1.02rem; }

/* Sections */
.tk-section { padding: 72px 0; }
.tk-section--cream { background: var(--cream); }
.tk-lead { max-width: 760px; margin: 14px auto 0; text-align: center; color: var(--gray); line-height: 1.7; font-size: 1.02rem; }

/* Format cards */
.tk-formats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; margin-top: 44px; }
.tk-card:nth-child(1) { grid-column: 1 / 3; }
.tk-card:nth-child(2) { grid-column: 3 / 5; }
.tk-card:nth-child(3) { grid-column: 5 / 7; }
.tk-card:nth-child(4) { grid-column: 2 / 4; }
.tk-card:nth-child(5) { grid-column: 4 / 6; }
.tk-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.tk-card:hover { transform: translateY(-4px); box-shadow: 0 22px 55px rgba(243, 111, 130,0.13); border-color: rgba(243, 111, 130,0.22); }
.tk-card__img { height: 210px; overflow: hidden; flex-shrink: 0; }
.tk-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.9); }
.tk-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tk-card__title { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 5px; }
.tk-card__price { font-size: 1.35rem; font-weight: 800; color: var(--pink); margin: 0 0 10px; letter-spacing: -0.01em; }
.tk-card__desc { color: var(--gray); line-height: 1.6; font-size: 0.88rem; margin-bottom: 12px; }
.tk-card__section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(20,20,20,0.38); margin: 12px 0 5px; }
.tk-card__list { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-direction: column; gap: 4px; }
.tk-card__list li { font-size: 0.855rem; color: rgba(20,20,20,0.72); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.tk-card__list li::before { content: "✓"; color: var(--mint, #2BB673); font-weight: 700; font-size: 0.72rem; flex-shrink: 0; margin-top: 2px; }
.tk-card__extras-list li::before { content: "+"; color: var(--pink); }
.tk-card__extras-list li b { color: var(--dark); font-weight: 700; }
.tk-card__flavors { background: rgba(243, 111, 130,0.05); border: 1px solid rgba(243, 111, 130,0.14); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.tk-card__flavors-title { font-size: 0.8rem; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.tk-card__flavors-desc { font-size: 0.76rem; color: var(--gray); line-height: 1.45; margin-bottom: 6px; }
.tk-card__flavors-link { font-size: 0.78rem; font-weight: 700; color: var(--pink); text-decoration: none; }
.tk-card__flavors-link:hover { text-decoration: underline; }
.tk-card__for { font-size: 0.84rem; color: rgba(20,20,20,0.7); background: var(--pink-pale); border-radius: 10px; padding: 9px 11px; margin: 12px 0 16px; }
.tk-card__for b { color: var(--pink); font-weight: 700; }
.tk-card__btn { margin-top: auto; }

/* Feature cards (Что входит) */
.tk-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.tk-feature-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 22px; }
.tk-feature-card__icon { font-size: 1.75rem; margin-bottom: 12px; }
.tk-feature-card__title { font-size: 0.98rem; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.tk-feature-card__text { font-size: 0.87rem; color: var(--gray); line-height: 1.6; margin: 0; }

/* Event photo cards */
.tk-events-photo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.tk-event-photo { position: relative; border-radius: var(--radius-xl); overflow: hidden; height: 290px; background-size: cover; background-position: center; }
.tk-event-photo__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.12) 55%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 18px; }
.tk-event-photo__badge { display: inline-block; background: rgba(243, 111, 130,0.88); color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border-radius: 5px; padding: 3px 7px; margin-bottom: 8px; align-self: flex-start; }
.tk-event-photo__title { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 5px; line-height: 1.2; }
.tk-event-photo__text { font-size: 0.82rem; color: rgba(255,255,255,0.82); line-height: 1.5; margin: 0; }

/* HOW TO CHOOSE block */
.tk-choose { background: var(--dark); border-radius: var(--radius-xl); padding: 48px 40px; text-align: center; color: #fff; }
.tk-choose h2 { color: #fff; }
.tk-choose p { color: rgba(255,255,255,0.7); max-width: 640px; margin: 14px auto 28px; line-height: 1.7; }
.tk-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* FAQ */
.tk-faq { max-width: 820px; margin: 40px auto 0; }
.tk-faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; padding: 0 20px; }
.tk-faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tk-faq summary::-webkit-details-marker { display: none; }
.tk-faq summary::after { content: "+"; color: var(--pink); font-size: 1.4rem; font-weight: 400; flex-shrink: 0; }
.tk-faq details[open] summary::after { content: "–"; }
.tk-faq p { color: var(--gray); line-height: 1.7; padding: 0 0 16px; margin: 0; font-size: 0.93rem; }

/* Сценарные карточки «Тележка с мороженым для любого мероприятия» */
.tk-scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.tk-scenario-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px 26px; display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.tk-scenario-card:hover { transform: translateY(-4px); box-shadow: 0 22px 55px rgba(243, 111, 130, 0.13); border-color: rgba(243, 111, 130, 0.22); }
.tk-scenario-card h3 { font-size: 1.12rem; font-weight: 700; margin: 0 0 12px; color: var(--dark); line-height: 1.35; }
.tk-scenario-card p { color: var(--gray); line-height: 1.7; font-size: 0.93rem; margin: 0 0 20px; flex: 1; }
.tk-scenario-card__cta { align-self: flex-start; font-weight: 700; font-size: 0.9rem; color: var(--pink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: gap .18s ease, color .18s ease; }
.tk-scenario-card__cta::after { content: "→"; }
.tk-scenario-card__cta:hover { color: var(--pink-hover); gap: 10px; }

/* Responsive — services */
@media (max-width: 1100px) {
  .tk-formats { grid-template-columns: repeat(2, 1fr); }
  .tk-card:nth-child(1),
  .tk-card:nth-child(2),
  .tk-card:nth-child(3),
  .tk-card:nth-child(4),
  .tk-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 980px) {
  .tk-features-grid { grid-template-columns: repeat(2, 1fr); }
  .tk-events-photo { grid-template-columns: repeat(2, 1fr); }
  .tk-scenarios { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tk-page-intro { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 28px; }
  .tk-section { padding: 48px 0; }

  /* Тележки — мягкая нативная карусель (та же механика, что у ленты отзывов):
     ровный снап по левому краю, инерция, без дёргания и без «шатания» секции. */
  .tk-formats {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    gap: 14px;
    margin: 24px 0 0;
    padding: 4px 16px 12px;
  }
  .tk-formats::-webkit-scrollbar { display: none; }
  .tk-formats .tk-card {
    flex: 0 0 82%;
    max-width: 82%;
    scroll-snap-align: start;
  }
  /* Отключаем fade-up-трансформацию в горизонтальной ленте — она вызывала
     «шатание» карточек при свайпе (эталонная лента отзывов идёт без fade-up). */
  .tk-formats .tk-card.fade-up,
  .tk-formats .tk-card.fade-up.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tk-features-grid { grid-template-columns: 1fr; }
  .tk-events-photo { grid-template-columns: 1fr; }
  .tk-scenarios { grid-template-columns: 1fr; gap: 14px; }
  .tk-scenario-card { padding: 22px 20px; }
  .tk-event-photo { height: 240px; }
  .tk-choose { padding: 32px 20px; }
  .tk-btns { flex-direction: column; align-items: stretch; }
  .tk-btns a { text-align: center; }
}
@media (max-width: 390px) {
  .tk-page-intro .display-lg { font-size: 1.7rem; }
  .tk-card__body { padding: 18px 16px 20px; }
  .tk-feature-card { padding: 18px 16px; }
}


/* ─────────────────────────────────────────────
   gallery.html — Галерея
   ───────────────────────────────────────────── */

.gallery-filter {
  display: flex; gap: 8px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.gallery-filter__btn {
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1.5px solid var(--border);
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}
.gallery-filter__btn:hover,
.gallery-filter__btn.active {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--pink-pale);
}
.masonry {
  columns: 4;
  column-gap: 16px;
}
.masonry__item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.masonry__item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.masonry__img {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.masonry__item:hover .masonry__img { transform: scale(1.04); }
.masonry__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,17,0.75) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.masonry__item:hover .masonry__overlay { opacity: 1; }
.masonry__overlay-text { color: white; }
.masonry__overlay-title { font-weight: 700; font-size: 0.9375rem; margin-bottom: 2px; }
.masonry__overlay-sub { font-size: 0.8125rem; opacity: 0.7; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox__close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }
.lightbox__content {
  max-width: 700px;
  max-height: 80vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-align: center;
}
.lightbox__img {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xl);
}
.lightbox__caption { color: white; padding: 16px; font-size: 0.9375rem; }
.lightbox__caption strong { display: block; font-size: 1.125rem; margin-bottom: 4px; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 60px 0;
  text-align: center;
}
.stats-row__value { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--pink); margin-bottom: 4px; }
.stats-row__label { font-size: 0.875rem; color: var(--gray); }

/* Responsive — gallery */
@media (max-width: 1024px) { .masonry { columns: 3; } }
@media (max-width: 640px) {
  .masonry { columns: 2; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) { .masonry { columns: 1; } }


/* ─────────────────────────────────────────────
   offer.html / terms.html — Правовые страницы
   ───────────────────────────────────────────── */

.legal-page { max-width: 860px; margin: 0 auto; padding: 48px 0 96px; overflow-wrap: break-word; }
.legal-page h1 { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; margin-bottom: 6px; overflow-wrap: break-word; }
.legal-page .meta { color: var(--gray); font-size: 0.875rem; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-page h2 { font-size: 1.125rem; font-weight: 700; margin: 32px 0 10px; color: var(--dark); }
.legal-page h3 { font-size: 1rem; font-weight: 600; margin: 20px 0 8px; color: var(--dark-2); }
.legal-page p { font-size: 0.9375rem; line-height: 1.75; color: #3A3A3A; margin-bottom: 10px; }
.legal-page ol, .legal-page ul { padding-left: 24px; margin-bottom: 14px; }
.legal-page li { font-size: 0.9375rem; line-height: 1.75; color: #3A3A3A; margin-bottom: 5px; }
.legal-page a { color: var(--pink); }
.legal-page table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem; }
.legal-page td, .legal-page th { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.legal-page th { background: var(--gray-light); font-weight: 600; }
.legal-page .highlight { background: var(--pink-pale); border: 1px solid var(--pink-light); border-radius: var(--radius-md); padding: 16px 20px; margin: 16px 0; font-size: 0.9rem; line-height: 1.65; }

.legal-toc { background: var(--gray-light); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 36px; }
.legal-toc__title { font-weight: 700; font-size: 0.875rem; margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 18px; }
.legal-toc li { margin-bottom: 3px; }
.legal-toc a { color: var(--dark); font-size: 0.875rem; }
.legal-toc a:hover { color: var(--pink); }

@media (max-width: 480px) {
  .legal-page h1 { font-size: 1.6rem; line-height: 1.2; }
}


/* ─────────────────────────────────────────────
   privacy.html — Политика конфиденциальности
   ───────────────────────────────────────────── */

.privacy-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0 96px;
  overflow-wrap: break-word;
}
.privacy-content h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
@media (max-width: 480px) {
  .privacy-content h1 { font-size: 1.7rem; line-height: 1.2; }
}
.privacy-content .date {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.privacy-content h2 { font-size: 1.25rem; font-weight: 700; margin: 36px 0 12px; color: var(--dark); }
.privacy-content h3 { font-size: 1.0625rem; font-weight: 600; margin: 24px 0 8px; color: var(--dark-2); }
.privacy-content p { font-size: 0.9375rem; line-height: 1.75; color: #3A3A3A; margin-bottom: 12px; }
.privacy-content ul, .privacy-content ol { padding-left: 24px; margin-bottom: 16px; }
.privacy-content li { font-size: 0.9375rem; line-height: 1.75; color: #3A3A3A; margin-bottom: 6px; }
.privacy-content a { color: var(--pink); }
.privacy-content a:hover { text-decoration: underline; }

.privacy-toc {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.privacy-toc__title { font-weight: 700; margin-bottom: 12px; font-size: 0.9375rem; }
.privacy-toc ol { margin: 0; padding-left: 20px; }
.privacy-toc li { margin-bottom: 4px; }
.privacy-toc a { color: var(--dark); font-size: 0.875rem; }
.privacy-toc a:hover { color: var(--pink); }

.highlight-box {
  background: var(--pink-pale);
  border: 1px solid var(--pink-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--dark-2);
}
