/* ============================================
   SWELA — Profile CSS
   P-2 fullwidth gallery, P-7 thumbs scroll,
   P-13 accordion, P-18 chips, P-24 read-more,
   P-25 pills, P-32 contact inline, P-36 stats,
   P-39 location chips, P-44 similar grid,
   P-48 map inline, P-50 back nav
   Pink palette, pill border-radius, colored shadows
   ============================================ */

/* ------------------------------------------------
   Back nav (P-50)
   ------------------------------------------------ */
.sw-profile__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--sw-muted);
  margin-bottom: 12px;
  transition: color 0.15s;
}
.sw-profile__back svg { width: 16px; height: 16px; flex-shrink: 0; }
.sw-profile__back:hover { color: var(--sw-primary); }

/* ------------------------------------------------
   Gallery Section
   ------------------------------------------------ */
.sw-profile__gallery-section {
  margin-bottom: 0;
}

.sw-profile__photo-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--sw-bg);
  box-shadow: 0 4px 24px rgba(219, 39, 119, 0.12);
  max-width: 480px;
  margin: 0 auto;
}

.sw-profile__photo-main {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.sw-profile__photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sw-primary-light);
  color: var(--sw-muted);
}
.sw-profile__photo-placeholder svg { width: 48px; height: 48px; }

/* Stats overlay (P-35 / P-36 both — overlay on photo) */
.sw-profile__stats-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}
.sw-profile__stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.sw-profile__stat-badge svg { width: 13px; height: 13px; }

/* Vote actions overlay */
.sw-profile__photo-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}
.sw-profile__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 12px;
  color: var(--sw-body);
  transition: background 0.15s, color 0.15s;
}
.sw-profile__action svg { width: 15px; height: 15px; }
.sw-profile__action:hover { background: rgba(255, 255, 255, 0.98); }
.sw-profile__action.is-active { color: var(--sw-primary); }
.sw-vote--fav.is-active { color: #E53935; }

/* ------------------------------------------------
   Thumbnails horizontal scroll (P-7)
   ------------------------------------------------ */
.sw-profile__thumbs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0 2px;
  -webkit-overflow-scrolling: touch;
  max-width: 480px;
  margin: 0 auto;
  justify-content: center;
}
.sw-profile__thumbs-row::-webkit-scrollbar { display: none; }

.sw-profile__thumb {
  flex-shrink: 0;
  width: 64px;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.15s, box-shadow 0.15s;
  border: 2.5px solid transparent;
}
.sw-profile__thumb.is-active {
  opacity: 1;
  border-color: var(--sw-primary);
  box-shadow: 0 2px 10px rgba(219, 39, 119, 0.3);
}
.sw-profile__thumb:hover { opacity: 0.9; }
.sw-profile__thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* ------------------------------------------------
   Info bar (P-32: inline contact after name)
   ------------------------------------------------ */
.sw-profile__info-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

/* --- Identity block --- */
.sw-profile__identity { flex: 1; }

.sw-profile__name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sw-profile__name {
  font-size: 24px;
  font-weight: 700;
  color: var(--sw-text);
  line-height: 1.25;
}
.sw-profile__age {
  font-size: 18px;
  font-weight: 400;
  color: var(--sw-muted);
}

/* P-36: Stats ryadom s imenem */
.sw-profile__stats-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sw-profile__stats-inline span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--sw-muted);
}
.sw-profile__stats-inline svg { width: 13px; height: 13px; }

/* P-39: Location chips */
.sw-profile__locations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sw-profile__locations--section { margin-top: 0; margin-bottom: 12px; }

.sw-profile__location-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--sw-text);
  background: var(--sw-primary-light);
  border-radius: 999px;
  transition: background 0.12s, color 0.12s;
}
.sw-profile__location-chip svg {
  width: 13px;
  height: 13px;
  color: var(--sw-primary);
  flex-shrink: 0;
}
.sw-profile__location-chip:hover {
  background: var(--sw-primary);
  color: #fff;
}
.sw-profile__location-chip:hover svg { color: #fff; }

/* --- Contact block (P-32: inline) --- */
.sw-profile__contact-inline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Phone button — СВОЙ класс, не наследовать от generic btn */
.sw-profile__phone-btn { }
.sw-profile__phone-btn a { color: #fff; } /* страховка от автолинковки */

.sw-phone-reveal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: var(--sw-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(219, 39, 119, 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}
.sw-phone-reveal svg { width: 18px; height: 18px; flex-shrink: 0; }
.sw-phone-reveal:hover {
  background: var(--sw-primary-hover);
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.45);
  transform: translateY(-1px);
}
.sw-phone-reveal:active { transform: translateY(0); }
.sw-phone-reveal__masked { font-size: 14px; font-weight: 400; white-space: nowrap; }
.sw-phone-reveal__label { white-space: nowrap; }

/* Messengers */
.sw-profile__messengers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sw-profile__messenger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--sw-bg);
  border-radius: 999px;
  font-size: 13px;
  color: var(--sw-body);
  transition: background 0.15s, color 0.15s;
  cursor: default;
}
.sw-profile__messenger svg { width: 16px; height: 16px; }
.sw-profile__messenger--tg { color: #2AABEE; background: rgba(42, 171, 238, 0.08); }
.sw-profile__messenger--wa { color: #25D366; background: rgba(37, 211, 102, 0.08); }
.sw-profile__messenger--vb { color: #7360F2; background: rgba(115, 96, 242, 0.08); }

/* ------------------------------------------------
   Accordion (P-13)
   ------------------------------------------------ */
.sw-profile__accordion {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sw-accordion__item {
  border-bottom: 1px solid var(--sw-border);
}
.sw-accordion__item:first-child {
  border-top: 1px solid var(--sw-border);
}

.sw-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--sw-text);
  text-align: left;
  transition: color 0.15s;
}
.sw-accordion__trigger:hover { color: var(--sw-primary); }

.sw-accordion__title { }

.sw-accordion__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--sw-muted);
  transition: transform 0.25s ease;
}
.sw-accordion__icon svg { width: 18px; height: 18px; }

.sw-accordion__item.is-open .sw-accordion__icon {
  transform: rotate(180deg);
}
.sw-accordion__item.is-open .sw-accordion__trigger {
  color: var(--sw-primary);
}

.sw-accordion__body {
  display: none;
  padding-bottom: 16px;
}
.sw-accordion__item.is-open .sw-accordion__body {
  display: block;
}

/* ------------------------------------------------
   Param chips (P-18)
   ------------------------------------------------ */
.sw-profile__param-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sw-param-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--sw-surface);
  border: 1.5px solid var(--sw-border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--sw-text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.sw-param-chip__icon { font-size: 15px; line-height: 1; }
.sw-param-chip__label {
  font-size: 11px;
  font-weight: 600;
  color: #7A7A7A;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sw-param-chip__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--sw-text);
}

.sw-param-chip--link {
  cursor: pointer;
  text-decoration: none;
}
.sw-param-chip--link:hover {
  border-color: var(--sw-primary);
  background: var(--sw-primary-light);
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.15);
}
.sw-param-chip--link:hover .sw-param-chip__value { color: var(--sw-primary); }

.sw-param-chip--price {
  background: var(--sw-primary-light);
  border-color: var(--sw-primary);
}
.sw-param-chip--price .sw-param-chip__value { color: var(--sw-primary); }

/* ------------------------------------------------
   Description + Read More (P-24)
   ------------------------------------------------ */
.sw-profile__desc-wrap {
  position: relative;
}

.sw-profile__desc-text {
  font-size: 14px;
  color: var(--sw-body);
  line-height: 1.75;
  white-space: pre-line;
  /* collapsed: show 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: none;
}
.sw-profile__desc-wrap.is-expanded .sw-profile__desc-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.sw-profile__read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-primary);
  cursor: pointer;
  transition: opacity 0.15s;
}
.sw-profile__read-more svg { width: 14px; height: 14px; transition: transform 0.25s; }
.sw-profile__desc-wrap.is-expanded .sw-profile__read-more svg {
  transform: rotate(180deg);
}
.sw-profile__read-more:hover { opacity: 0.75; }

/* ------------------------------------------------
   Services pills (P-25)
   ------------------------------------------------ */
.sw-services-group {
  margin-bottom: 14px;
}
.sw-services-group:last-child { margin-bottom: 0; }

.sw-services-group__label {
  font-size: 11px;
  font-weight: 700;
  color: #7A7A7A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.sw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sw-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--sw-primary-light);
  color: var(--sw-primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

/* ------------------------------------------------
   SEO blocks
   ------------------------------------------------ */
.sw-profile__seo-blocks {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--sw-border);
}
.sw-seo-block__h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--sw-text);
  margin-bottom: 8px;
  margin-top: 16px;
}
.sw-seo-block__h2:first-child { margin-top: 0; }
.sw-seo-block__text {
  font-size: 14px;
  color: var(--sw-body);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* ------------------------------------------------
   Similar cards grid (P-44)
   ------------------------------------------------ */
.sw-similar {
  margin-top: 28px;
}
.sw-similar__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--sw-text);
  margin-bottom: 16px;
}

.sw-similar__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ------------------------------------------------
   Desktop layout (900px+)
   На P-2 галерея ПОЛНОШИРИННАЯ, поэтому info-bar
   на десктопе = горизонтальные две колонки
   ------------------------------------------------ */
@media (min-width: 600px) {
  .sw-profile__thumb { width: 72px; }
  .sw-similar__cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .sw-profile__info-bar {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }
  .sw-profile__identity { flex: 1; }
  .sw-profile__contact-inline {
    flex-shrink: 0;
    width: 300px;
  }
  .sw-phone-reveal { width: auto; }

  .sw-profile__name { font-size: 28px; }

  .sw-profile__thumb { width: 80px; }

  .sw-similar__cards { grid-template-columns: repeat(4, 1fr); }
}

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