/**
 * Review page – Customer reviews section and card layout
 * Used on /review (ReviewAllPageClient carousel)
 */

/* Hero critical layout – match post-load layout so UI is centered from first paint */
.review-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 80px;
  background: #fff;
  overflow: visible;
}
.review-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  align-self: stretch;
}
.review-hero__inner .review-hero-ravi {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  pointer-events: auto;
  contain: layout style paint;
}
.review-hero__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #111;
  margin: 0 0 32px 0;
  line-height: 1.2;
}
.review-hero__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 20px;
  text-align: center;
}
.review-hero__rating-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.review-hero__meta-score {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  color: #e11d48;
  letter-spacing: -0.02em;
}
.review-hero__stars {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #e11d48;
}
.review-hero__meta-count {
  font-size: 15px;
  color: #6b7280;
  font-weight: 400;
}
.review-hero__sentiment {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #374151;
}
.review-hero__meta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
  color: #4b5563;
}
.review-hero .review-hero__chars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.review-hero .review-hero__chars .review-hero-char-group {
  position: absolute;
  top: -70px;
  bottom: 0;
  width: 38%;
  max-width: 320px;
  display: flex;
  align-items: flex-end;
}
.review-hero .review-hero__chars .review-hero-char-group--left {
  left: 0;
  justify-content: flex-start;
}
.review-hero .review-hero__chars .review-hero-char-group--right {
  right: 0;
  justify-content: flex-end;
}
.review-hero .review-hero__chars .review-hero-char-group svg {
  width: auto;
  height: 100%;
  max-width: 100%;
  display: block;
  vertical-align: bottom;
}
@media (max-width: 768px) {
  /* Keep center content (Ravi + title + meta) above side characters so text isn't blocked */
  .review-hero .review-hero__inner {
    z-index: 4;
    position: relative;
  }
  /* Ravi same size as Hojo on mobile (94×86) */
  .review-hero .review-hero__inner .review-hero-ravi {
    margin-bottom: 12px;
  }
  .review-hero .review-hero__inner .review-hero-ravi__svg {
    width: 94px;
    height: 86px;
  }
  .review-hero .review-hero__chars .review-hero-char-group {
    top: -40px;
    width: 35%;
    max-width: 160px;
  }
}

/* Section */
.review-all-page {
  background: #f5f6f8;
  min-height: 100vh;
  padding-bottom: 56px;
}

.review-list-container {
  padding-top: 32px;
  padding-bottom: 8px;
}

/* Slide wrapper for equal-height cards in carousel */
.review-list-slide {
  height: 100%;
  padding: 0 8px;
  display: flex;
}

.review-list-section {
  margin-top: 0;
  position: relative;
  padding: 40px 0 32px;
}

.review-list-section .tour-carousel-header {
  margin-bottom: 28px;
  text-align: center;
}

.review-list-section .tour-carousel-title {
  font-size: clamp(1.35rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: #1a2b49;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.review-list-section .swiper-slide {
  height: auto;
  display: flex;
}

.review-list-section .swiper-slide > div {
  width: 100%;
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Carousel wrapper – space for nav buttons */
.review-list-section .col-lg-12.position-relative {
  padding-left: 44px;
  padding-right: 44px;
}

/* Carousel container – prevent layout shift before Swiper init */
.review-list-section .swiper {
  overflow: hidden;
  min-height: 280px;
}

/* Card container – vertical layout, equal height in row */
.review-list-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 240px;
  background: var(--white-color, #fff);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(26, 43, 73, 0.06);
  box-shadow: 0 1px 3px rgba(26, 43, 73, 0.04), 0 6px 16px rgba(26, 43, 73, 0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.review-list-card:hover {
  box-shadow: 0 4px 12px rgba(26, 43, 73, 0.08), 0 12px 28px rgba(26, 43, 73, 0.08);
  border-color: rgba(26, 43, 73, 0.1);
}

/* Card meta row: left = rating, right = date (same level) */
.review-list-card__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.review-list-card__rating {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}

.review-list-card__tour-row {
  margin-bottom: 10px;
  flex-shrink: 0;
}

.review-list-card__date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-roboto, Roboto), sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-color, #6b7280);
  line-height: 1.2;
}

.review-list-card__date-icon {
  font-size: 14px;
  color: var(--text-color, #6b7280);
  flex-shrink: 0;
}

.review-list-card__date {
  white-space: nowrap;
}

.review-list-card__tour-link {
  font-family: var(--font-poppins, Poppins), sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--primary-color, #1a2b49);
  text-decoration: none;
  transition: color 0.2s ease;
}

.review-list-card__tour-link:hover {
  color: var(--primary-color, #1a2b49);
  text-decoration: underline;
}

.review-list-card__tour-text {
  font-family: var(--font-poppins, Poppins), sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--title-color, #1a2b49);
}

/* Card body: review text */
.review-list-card__text {
  flex: 1;
  min-height: 0;
  font-family: var(--font-poppins, Poppins), sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-color, #374151);
  margin: 0 0 18px 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card author block: avatar on left, name + “I travelled with”, flag in right corner (circular) */
.review-list-card__author {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(26, 43, 73, 0.07);
}

.review-list-card__avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a2b49 0%, #2d3f5f 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-poppins, Poppins), sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26, 43, 73, 0.2);
}

.review-list-card__author-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.review-list-card__author-name {
  font-family: var(--font-poppins, Poppins), sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--primary-color, #1a2b49);
  margin: 0;
  flex-shrink: 0;
}

/* "I travelled with" below the name */
.review-list-card__author-meta {
  font-family: var(--font-roboto, Roboto), sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-color, #6b7280);
  line-height: 1.4;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Flag in right corner, circular (border-radius 50%) */
.review-list-card__flag-wrap {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  border: 1px solid rgba(26, 43, 73, 0.12);
  box-sizing: border-box;
}

.review-list-card__flag-wrap .fi {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Logo (when no country): fill circle */
.review-list-card__flag-wrap .review-list-card__logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Customer photos section – 12 latest images (same pattern as single tour page) */
.review-customer-photos-section {
  margin-top: 48px;
  position: relative;
  overflow: visible;
}

/* Hojo character – Customer photos section, right corner, slightly up so not on photo edge */
.review-customer-photos-section__hojo {
  position: absolute;
  right: 0;
  top: -14px;
  z-index: 10;
  pointer-events: auto;
  width: 130px;
  min-height: 119px;
  line-height: 0;
  display: block;
}

.review-customer-photos-section__hojo .review-hero-hojo {
  display: block;
  width: 130px;
  height: 119px;
  contain: layout style paint;
}

.review-customer-photos-section__hojo .review-hero-hojo__svg {
  width: 130px;
  height: 119px;
  display: block;
  vertical-align: top;
}

.review-customer-photos-section .tour-carousel-header {
  margin-bottom: 24px;
  text-align: center;
}

.review-customer-photos-section .tour-carousel-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a2b49;
  margin: 0;
}

.review-customer-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  height: 340px;
}

.review-customer-photo-item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #eee;
  cursor: pointer;
  height: 100%;
  min-height: 0;
}

.review-customer-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.review-customer-photo-item:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .review-customer-photos-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    height: 380px;
    gap: 8px;
  }
  /* Shrink Hojo on mobile so he doesn't dominate the corner */
  .review-customer-photos-section__hojo {
    width: 94px;
    min-height: 86px;
    top: -8px;
  }
  .review-customer-photos-section__hojo .review-hero-hojo,
  .review-customer-photos-section__hojo .review-hero-hojo__svg {
    width: 94px;
    height: 86px;
  }
}

/* Star rating – review page overrides */
.review-all-page .review-list-card .rating-area.trustpilot li {
  line-height: 1;
  width: 16px;
  height: 16px;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.review-all-page .review-list-card .rating-area.trustpilot li.filled {
  background-color: #d4a017;
  box-shadow: 0 1px 2px rgba(212, 160, 23, 0.3);
}

.review-all-page .review-list-card .rating-area.trustpilot li svg {
  fill: var(--white-color, #fff);
  width: 10px;
  height: 10px;
}

/* Empty state */
.review-list-empty {
  text-align: center;
  padding: 56px 32px;
  background: #fff;
  border-radius: 16px;
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid rgba(26, 43, 73, 0.06);
  box-shadow: 0 1px 3px rgba(26, 43, 73, 0.04);
}

/* Nav buttons – position for review list carousel */
.review-list-section .tour-cards-nav-btn.review-list-prev,
.review-list-section .tour-cards-nav-btn.review-list-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.review-list-section .tour-cards-nav-btn.review-list-prev {
  left: 0;
}

.review-list-section .tour-cards-nav-btn.review-list-next {
  right: 0;
}

@media (max-width: 991px) {
  .review-list-section .col-lg-12.position-relative {
    padding-left: 16px;
    padding-right: 16px;
  }

  .review-list-card {
    min-height: 200px;
  }

  .review-list-card__text {
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 768px) {
  .review-list-section .tour-carousel-title {
    font-size: 1.2rem;
  }

  .review-list-section .tour-carousel-header {
    margin-bottom: 22px;
  }

  .review-list-card {
    padding: 20px;
    min-height: 200px;
  }

  .review-list-card__text {
    -webkit-line-clamp: 3;
    margin-bottom: 12px;
  }

  .review-list-card__author {
    padding-top: 10px;
  }

  .review-list-card__avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 13px;
  }
}
