html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", sans-serif;
}

.container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

#pano {
  position: relative;
  width: 100%;
  height: 100%;
}

.person-card {
  position: fixed;
  top: 0;
  right: -45%;
  width: 45%;
  height: 100vh;
  background: #f5f5f5;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 25px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  visibility: hidden;
  z-index: 999;
}

.person-card.active {
  right: 0;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.person-card.hiding {
  transform: translateY(100%);
  opacity: 0;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.person-card.expanded {
  overflow-y: auto;
}

/* Стилизация скроллбара */
.person-card::-webkit-scrollbar {
  width: 4px;
}

.person-card::-webkit-scrollbar-track {
  background: transparent;
}

.person-card::-webkit-scrollbar-thumb {
  background: #e33131;
  border-radius: 2px;
}

.person-card::-webkit-scrollbar-thumb:hover {
  background: #c82333;
}

.hero-info {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: visible;
  padding-bottom: 80px;
}

/* Базовые медиа-запросы */
@media screen and (max-width: 1024px) {
  .person-card {
    width: 50%;
    right: -50%;
    padding: 48px;
  }
}

@media screen and (max-width: 480px) {
  .person-card {
    width: 100%;
    right: -100%;
    padding: 24px;
  }
}

/* Стили для навигации */
.navigation-header {
  width: 100%;
  height: 68px;
  background: #ffffff;
  color: #000000;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  margin-bottom: 16px;
  padding: 16px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border-radius: 24px;
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #000000;
}

.nav-arrows {
  display: flex;
  gap: 8px;
}

.arrow-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e33131;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.arrow-button.prev {
  padding-right: 2px;
}

.arrow-button.next {
  padding-left: 2px;
}

.arrow-button:hover {
  background: #c82333;
}

/* Медиа-запросы */
@media screen and (max-width: 768px) {
  .person-card {
    position: fixed;
    width: calc(100% - 32px);
    height: 65vh;
    left: 16px;
    bottom: -60px;
    transform: translateY(100vh);
    background: #f5f5f5;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0px -4px 20px rgba(0, 0, 0, 0.1);
    touch-action: none;
    overflow: hidden;
    will-change: transform;
  }

  .person-card.hiding {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0.8;
  }

  .person-card.active {
    transform: translateY(calc(35vh - 60px));
    opacity: 1;
    visibility: visible;
    overflow: hidden;
  }

  .person-card.active .navigation-header {
    display: none;
  }

  .person-card.expanded {
    transform: translateY(0);
    height: 100vh;
    border-radius: 0;
    left: 0;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
  }

  .person-card.expanded .navigation-header {
    display: flex;
    position: relative;
    width: 92%;
    height: 68px;
    background: #ffffff;
    z-index: 1001;
    margin: 16px auto;
    padding: 16px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
  }

  .hero-info {
    height: 100%;
    overflow: hidden;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
  }

  .person-card.expanded .hero-info {
    overflow: visible;
    height: auto;
  }

  .mobile-expand-button {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    background: linear-gradient(
      to top,
      rgba(245, 245, 245, 1) 60%,
      rgba(245, 245, 245, 0)
    );
    display: flex;
    justify-content: flex-start;
    z-index: 1000;
  }

  .person-card.active .mobile-expand-button {
    display: none;
  }

  .person-card.expanded .mobile-expand-button {
    display: none;
  }

  .mobile-expand-button .show-more-btn {
    display: block;
    color: rgb(106, 106, 106);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    border: none;
    background: none;
    text-decoration-line: underline;
    text-underline-offset: 3.5px;
    cursor: pointer;
    padding: 0;
    margin: 0 0 10px 10px;
  }

  .hero-main-section {
    margin: 0;
    padding: 24px 34px;
    border-radius: 24px;
    margin: 16px;
  }

  .hero-main-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .hero-image {
    width: 250px;
    height: 250px;

    aspect-ratio: 1;
    border-radius: 16px;
    margin: 0;
  }

  .hero-image img {
    border-radius: 16px;
  }

  .hero-details {
    gap: 12px;
  }

  .hero-details .info-section:nth-child(2) {
    order: 3;
  }

  .hero-details .info-section:nth-child(3) {
    order: 2;
  }

  .hero-description-section {
    width: auto;
    padding: 16px;
    margin: 16px;
  }

  .description-block h3 {
    color: rgb(26, 26, 26);
    font-family: Inter;
    font-size: 30px;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0%;
    text-align: left;
    margin-bottom: 24px;
  }

  .video-slider {
    width: calc(100% - 32px);
    height: 0;
    padding-bottom: calc((100% - 32px) * 9 / 16);
    margin: 16px auto;
  }

  .video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .video-thumbnail {
    position: absolute;
    width: 100%;
    height: 100%;
  }

  .video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .video-arrow {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .video-arrow.prev {
    left: 8px;
  }

  .video-arrow.next {
    right: 8px;
  }

  .play-button {
    width: 64px;
    height: 64px;
  }

  .video-navigation {
    bottom: 16px;
  }

  .video-dot {
    width: 6px;
    height: 6px;
    margin: 0 4px;
  }

  .person-card.active::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 4px;
    z-index: 10;
  }
}

@media screen and (max-width: 480px) {
  .video-slider {
    width: calc(100% - 32px);
    padding-bottom: calc((100% - 32px) * 9 / 16);
  }

  .play-button svg {
    width: 40px;
    height: 40px;
  }

  .video-arrow {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }

  .video-arrow.prev {
    left: 6px;
  }

  .video-arrow.next {
    right: 6px;
  }

  .video-dot {
    width: 3px;
    height: 3px;
    margin: 0 2px;
  }
}

@media screen and (max-width: 320px) {
  .video-slider {
    width: calc(100% - 32px);
    padding-bottom: calc((100% - 32px) * 9 / 16);
  }

  .play-button svg {
    width: 36px;
    height: 36px;
  }

  .video-arrow {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
}

.add-hero-link {
  display: none;
}

.password-modal {
  display: none;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  transition: opacity 0.3s ease;
}

.back-button:hover {
  opacity: 0.8;
}

.back-button svg {
  width: 20px;
  height: 20px;
  margin-right: 4px;
}

.person-name {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 27px;
  margin: 0;
}

.hero-main-section {
  position: static;
  /* width: 756px; */
  padding: 32px;
  background: rgb(255, 255, 255);
  border-radius: 24px;
}

.hero-main-info {
  display: flex;
  gap: 32px;
}

.hero-image {
  width: 250px;
  height: 250px;

  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-grow: 1;
}

.hero-name {
  color: rgb(26, 26, 26);
  font-family: Inter;
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  margin: 0;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-section h3 {
  color: #6a6a6a;
  font-size: 14px;
  line-height: 17px;
  font-weight: 400;
  margin: 0;
}

.info-section p {
  color: #1a1a1a;
  font-size: 15px;
  line-height: 18px;
  margin: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: auto;
  justify-content: space-between;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #1a1a1a;
  border: 1px solid #e33131;
  border-radius: 100px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-rating.liked {
  background: #e33131;
  color: #ffffff;
}

.hero-rating.liked .like-icon {
  filter: brightness(0) invert(1);
}

.like-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rating-count {
  font-size: 14px;
  font-weight: 500;
  line-height: 17px;
  color: #e33131;
}

.hero-rating.liked .rating-count {
  color: #ffffff;
}

.hero-social {
  display: flex;
  gap: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.social-link:hover {
  transform: scale(1.1);
}

.hero-description {
  font-size: 16px;
  line-height: 24px;
  color: #1a1a1a;
}

.hero-description-section {
  position: static;
  /* width: 756px; */
  padding: 32px;
  background: rgb(255, 255, 255);
  border-radius: 24px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.description-block {
  margin-bottom: 32px;
}

.description-block h3 {
  color: rgb(26, 26, 26);
  font-family: Inter;
  font-size: 30px;
  font-weight: 700;
  line-height: 120%;
  letter-spacing: 0%;
  text-align: left;
  margin-bottom: 24px;
}

.description-content {
  position: relative;
  margin-top: 16px;
}

.description-text {
  max-height: 120px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.description-text.expanded {
  max-height: none;
  overflow: visible;
}

.description-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.description-text.expanded::after {
  opacity: 0;
}

.show-more-btn {
  display: block;
  color: rgb(106, 106, 106);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 120%;
  letter-spacing: 0%;
  text-align: left;
  text-decoration-line: underline;
  text-underline-offset: 3.5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 16px;
}

.show-more-btn:hover {
  opacity: 0.8;
}

/* Стили для видео-слайдера */
.video-slider {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-top: 20px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
  background-color: #000;
}

.video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.video-thumbnail:hover .video-preview {
  transform: scale(1.05);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.video-thumbnail:hover .play-button {
  opacity: 1;
}

.video-navigation {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.video-dots {
  display: flex;
  gap: 8px;
}

.video-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s;
}

.video-dot.active {
  background: #fff;
}

.video-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.video-arrow:hover {
  background: rgba(255, 255, 255, 0.9);
}

.video-arrow.prev {
  left: 10px;
}

.video-arrow.next {
  right: 10px;
}

.video-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.video-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.close-modal:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.modal-content iframe[src*="vk.com"] {
  min-height: 400px;
  height: 80vh;
}

.vk-video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.vk-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media screen and (max-width: 768px) {
  .modal-content {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
  }

  .vk-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
  }

  .video-modal.active {
    padding: 16px;
    align-items: center;
  }

  .close-modal {
    top: -40px;
    right: 0;
  }
}

@media screen and (max-width: 480px) {
  .modal-content {
    width: 100%;
  }
}

.hotspot {
  position: absolute;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hotspot img {
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
}

.hotspot:hover img {
  filter: brightness(0);
}

.hotspot-label {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hotspot:hover .hotspot-label {
  opacity: 1;
}

.hotspot svg path {
  transition: fill 0.3s ease;
}

.hotspot:hover svg path {
  fill: #000000 !important;
}

/* Стили только для мобильных устройств - скрывать соцсети в мини-карточке */
@media screen and (max-width: 768px) {
  /* В мини-карточке скрываем социальные сети */
  .person-card.active:not(.expanded) .hero-social {
    display: none !important;
  }

  /* В полной карточке показываем соцсети */
  .person-card.expanded .hero-social {
    display: flex !important;
  }

  /* Выравнивание только для мобильных */
  .person-card .hero-actions {
    justify-content: flex-start;
  }
}

/* Для десктопных устройств всегда показываем соцсети */
@media screen and (min-width: 769px) {
  .person-card .hero-social {
    display: flex !important;
  }
}

/* Стили для горизонтальной ориентации мобильных устройств */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .person-card {
    width: 100%;
    height: 100vh;
    padding: 16px;
    overflow-y: auto;
  }

  .navigation-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    /* margin: 0 0 16px 0; */
  }

  .hero-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .hero-main-section {
    padding: 16px;
    margin: 0;
  }

  .hero-main-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .hero-image {
    width: 250px;
    height: 250px;
    border-radius: 16px;
    margin: 0;
  }

  .hero-details {
    width: 100%;
    gap: 12px;
    align-items: center;
    text-align: center;
  }

  .hero-name {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .info-section {
    margin-bottom: 8px;
    align-items: center;
  }

  .info-section h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .info-section p {
    font-size: 14px;
  }

  .hero-description-section {
    padding: 16px;
    margin: 16px 0;
  }

  .description-block h3 {
    font-size: 20px;
    margin-bottom: 16px;
    text-align: center;
  }

  .description-text {
    font-size: 14px;
  }

  .video-slider {
    height: 180px;
    margin: 16px 0;
  }

  .nav-button {
    padding: 4px 8px;
    font-size: 14px;
  }

  .arrow-button {
    width: 32px;
    height: 32px;
  }

  .hero-actions {
    justify-content: center;
  }
}

.rotate-device-message {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.rotate-device-content {
  background: #fff;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  margin: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}

.rotate-device-content svg {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  transform: rotate(90deg);
}

.rotate-device-content p {
  margin: 0;
  font-size: 18px;
  color: #1a1a1a;
  font-weight: 500;
  line-height: 1.5;
  font-family: "Inter", sans-serif;
}

@media screen and (max-width: 768px) {
  .rotate-device-content {
    padding: 24px;
    gap: 16px;
  }

  .rotate-device-content svg {
    width: 48px;
    height: 48px;
  }

  .rotate-device-content p {
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .rotate-device-content {
    padding: 20px;
  }

  .rotate-device-content p {
    font-size: 14px;
  }
}

@media screen and (max-width: 860px) and (orientation: landscape) {
  .rotate-device-message {
    display: none;
  }

  .person-card {
    visibility: visible;
  }
}

@media screen and (max-width: 860px) and (orientation: landscape) and (max-height: 450px) {
  .rotate-device-message {
    display: flex;
  }

  .person-card.active {
    visibility: hidden;
  }
}

@media screen and (max-width: 768px) {
  .close-modal {
    top: -36px;
    right: 0;
    font-size: 28px;
    width: 36px;
    height: 36px;
  }
}

@media screen and (max-width: 480px) {
  .close-modal {
    top: -32px;
    right: 0;
    font-size: 24px;
    width: 32px;
    height: 32px;
  }
}
