/* ================================================================
   css/pages/styles.css — страница «Стили татуировок»
   ================================================================ */


/* ── Hero ── */

.styles-hero {
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-4);
}

.styles-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-1);
}

.styles-hero__sub {
  font-size: var(--text-sm);
  color: var(--c-text-inv-muted);
  line-height: var(--lh-relaxed);
}

.styles-hero .breadcrumb {
  color: var(--c-text-inv-muted);
  padding-block: var(--sp-1);
  margin-bottom: var(--sp-2);
  font-size: 0.875rem;
}

.styles-hero .breadcrumb__link {
  color: var(--c-text-inv-muted);
}

.styles-hero .breadcrumb__link:hover {
  color: var(--c-text-inv);
}

.styles-hero .breadcrumb__item + .breadcrumb__item::before {
  color: var(--c-text-inv-muted);
  opacity: 0.4;
}

.styles-hero .breadcrumb__current {
  color: var(--c-text-inv);
}


/* ── Intro ── */

.styles-intro {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.styles-intro p {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2);
}

.styles-intro p:last-child { margin-bottom: 0; }


/* ── Featured styles (основные 6) ── */

.style-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  padding-block: var(--sp-8);
  border-bottom: 1px solid var(--c-border);
}

.style-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .style-item {
    grid-template-columns: 360px 1fr;
    gap: var(--sp-8);
    align-items: center;
    min-height: 600px;
  }

  .style-item:nth-child(even) {
    grid-template-columns: 1fr 360px;
  }

  .style-item:nth-child(even) .style-item__media {
    order: 2;
  }

  .style-item:nth-child(even) .style-item__body {
    order: 1;
  }
}

/* Media column */
.style-item__media {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.style-item__img-main {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg-alt);
}

.style-item__img-main img,
.style-item__img-main source + img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform var(--ease-slow);
}

.style-item__img-main:hover img {
  transform: scale(1.04);
}

.style-item__thumbs {
  display: flex;
  gap: var(--sp-1);
}

.style-item__thumb {
  flex: 1;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg-alt);
}

.style-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease-slow);
}

.style-item__thumb:hover img {
  transform: scale(1.06);
}

/* Body column */
.style-item__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.style-item__num {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--w-regular);
  letter-spacing: 0.12em;
  color: var(--c-text-muted);
  text-transform: uppercase;
}

.style-item__title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  color: var(--c-text);
}

.style-item__desc {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
}

.style-item__desc p {
  margin-bottom: var(--sp-2);
}

.style-item__desc p:last-child {
  margin-bottom: 0;
}

.style-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}

.style-item__meta-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.style-item__meta-tag::before {
  content: '▸';
  color: var(--c-text);
  font-size: 0.7em;
}

.style-item__btn {
  display: inline-block;
  align-self: flex-start;
  background: #0077FF;
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
  font-family: var(--font-body);
  text-decoration: none;
  transition: background var(--ease);
}

.style-item__btn:hover {
  background: #0060dd;
}

@media (max-width: 767px) {
  .style-item__btn {
    width: 100%;
    text-align: center;
  }
}


/* ── Secondary styles (компактные карточки) ── */

.styles-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .styles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .styles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.style-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg);
  transition: box-shadow var(--ease), transform var(--ease);
  cursor: pointer;
}

.style-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.style-card__img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--c-bg-alt);
}

.style-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease-slow);
}

.style-card:hover .style-card__img {
  transform: scale(1.06);
}

.style-card__body {
  padding: var(--sp-2);
}

.style-card__title {
  font-weight: var(--w-semibold);
  font-size: var(--text-base);
  color: var(--c-text);
  margin-bottom: 6px;
}

.style-card__desc {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-2);
}

.style-card__more {
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
  color: var(--c-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--ease);
}

.style-card__more:hover {
  gap: 8px;
}


/* ── Style modal ── */

.style-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2);
  overflow-y: auto;
}

.style-modal-overlay[hidden] {
  display: none;
}

.style-modal {
  background: var(--c-bg);
  border-radius: var(--r-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.style-modal__slider {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--c-bg-dark-3);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
}

.style-modal__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.style-modal__slide.is-active {
  opacity: 1;
}

.style-modal__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.style-modal__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 0;
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
}

.style-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ease);
}

.style-modal__dot.is-active {
  background: #fff;
}

.style-modal__body {
  padding: var(--sp-4);
}

.style-modal__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}

.style-modal__text {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
}

.style-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.style-modal__btn {
  display: inline-block;
  background: #0077FF;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
  font-family: var(--font-body);
  text-decoration: none;
  transition: background var(--ease);
}

.style-modal__btn:hover {
  background: #0060dd;
}

.style-modal__close {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--ease);
}

.style-modal__close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.style-modal__close-text {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  text-decoration: underline;
  padding: 0;
}

.style-modal__close-text:hover {
  color: var(--c-text);
}


/* ── FAQ ── */

.styles-faq-list {
  max-width: 760px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--c-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--c-border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-3) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--w-semibold);
  color: var(--c-text);
  text-align: left;
  cursor: pointer;
  line-height: var(--lh-snug);
}

.faq-question__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--ease), background var(--ease);
  font-size: 1rem;
  line-height: 1;
}

.faq-item.is-open .faq-question__icon {
  transform: rotate(45deg);
  background: var(--c-text);
  border-color: var(--c-text);
  color: var(--c-bg);
}

.faq-answer {
  display: none;
  padding-bottom: var(--sp-3);
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
}

.faq-item.is-open .faq-answer {
  display: block;
}


/* ── Final CTA (dark) ── */

.styles-cta {
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
  text-align: center;
  padding-block: var(--sp-12);
}

.styles-cta__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-inv-muted);
  display: block;
  margin-bottom: var(--sp-2);
}

.styles-cta__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}

.styles-cta__sub {
  font-size: var(--text-base);
  color: var(--c-text-inv-muted);
  line-height: var(--lh-relaxed);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--sp-4);
}

.styles-cta__btn {
  display: inline-block;
  background: #0077FF;
  color: #fff;
  padding: 16px 36px;
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: var(--w-semibold);
  font-family: var(--font-body);
  text-decoration: none;
  transition: background var(--ease);
}

.styles-cta__btn:hover {
  background: #0060dd;
}


/* ── Coverup Carousel — флагманский блок ── */

/* Переопределение сетки: всегда carousel LEFT, text RIGHT */
@media (min-width: 768px) {
  .style-item--coverup {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }
  .style-item--coverup:nth-child(even) {
    grid-template-columns: 3fr 2fr;
  }
  .style-item--coverup:nth-child(even) .style-item__media,
  .style-item--coverup:nth-child(even) .style-item__body {
    order: unset;
  }
}

/* Переопределение сетки для Реставрации: всегда carousel LEFT, text RIGHT */
@media (min-width: 768px) {
  .style-item--restoration {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }
  .style-item--restoration:nth-child(even) {
    grid-template-columns: 3fr 2fr;
  }
  .style-item--restoration:nth-child(even) .style-item__media,
  .style-item--restoration:nth-child(even) .style-item__body {
    order: unset;
  }
  /* Align top of images with the title (offset = num line-height + gap) */
  .style-item--restoration .style-item__media {
    padding-top: calc(var(--text-xs) * 1.5 + var(--sp-3));
  }
}

.style-item--coverup .style-item__media,
.style-item--restoration .style-item__media {
  gap: var(--sp-3);
}

/* Пара фото ДО → ПОСЛЕ */
.coverup-pair {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-1);
  transition: opacity 0.22s ease-out;
}

.coverup-pair.is-fading {
  opacity: 0;
}

@media (max-width: 359px) {
  .coverup-pair {
    flex-direction: column;
    gap: var(--sp-2);
  }
}

.coverup-pair__photo {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg-alt);
  aspect-ratio: 3 / 4;
}

.coverup-pair__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.coverup-pair__photo--after {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
}

.style-item--restoration .coverup-pair__photo {
  aspect-ratio: 1 / 1;
}

.style-item--restoration .coverup-pair__photo img {
  object-fit: cover;
}

.coverup-pair__label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: var(--w-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.6;
  pointer-events: none;
}

.coverup-pair__label--before {
  background: rgba(0, 0, 0, 0.52);
  color: rgba(255, 255, 255, 0.6);
}

.coverup-pair__label--after {
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

/* Стрелка → */
.coverup-arrow {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--c-text-muted);
  padding: 0 2px;
  line-height: 1;
  animation: coverup-arrow-pulse 2s ease-in-out infinite;
}

@media (max-width: 359px) {
  .coverup-arrow { display: none; }
}

@keyframes coverup-arrow-pulse {
  0%, 100% { opacity: 0.35; transform: translateX(0); }
  50%       { opacity: 0.85; transform: translateX(5px); }
}

/* Кнопки ← → */
.coverup-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.coverup-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.coverup-btn:hover {
  background: var(--c-text);
  border-color: var(--c-text);
  color: var(--c-bg);
}

.coverup-counter {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Точки-индикаторы */
.coverup-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.coverup-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-border);
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--ease);
}

.coverup-dot.is-active {
  background: var(--c-text);
}
