/*-----------------------------------*\
  #tripadvisor.css – TripAdvisor Review Widgets
\*-----------------------------------*/

.tripadvisor-section {
  /* Tighter than default sections — less vertical height around this block */
  padding-block: clamp(1.75rem, 4vw, 2.25rem);
  background: linear-gradient(180deg, transparent 0%, rgba(244, 228, 215, 0.15) 50%, transparent 100%);
  width: 100%;
}

/* Minimal TripAdvisor styling */
.tripadvisor-widgets-container {
  display: flex;
  justify-content: center;
  margin-top: clamp(0.75rem, 2.5vw, 1.25rem);
  padding-inline: clamp(0.5rem, 3vw, 1rem);
}

/* ---- Recommended badge (TripAdvisor lockup img + green #00eb5b) ---- */

.ta-reco-badge {
  --ta-badge-green: #00eb5b;
  box-sizing: border-box;
  display: inline-block;
  width: min(100%, 220px);
  margin-inline: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
  color: inherit;
  background: #fff;
  vertical-align: top;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ta-reco-badge:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.ta-reco-badge:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 235, 91, 0.45);
}

.ta-reco-badge__top {
  background: var(--ta-badge-green);
  padding: 10px 12px 8px;
  text-align: center;
}

.ta-reco-badge__ribbon {
  color: #000;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.ta-reco-badge__brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ta-reco-badge__logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.ta-reco-badge__bottom {
  background: #fff;
  padding: 8px 12px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}

.ta-reco-badge__listing {
  color: #000;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  word-break: break-word;
  line-height: 1.35;
}

@media (max-width: 400px) {
  .ta-reco-badge {
    width: min(100%, 200px);
  }
}

.tripadvisor-section .container {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.tripadvisor-section .section-subtitle {
  text-align: center;
  margin-bottom: 0.25rem;
}

.tripadvisor-section .section-title {
  text-align: center;
  margin-bottom: 0.35rem;
}

.tripadvisor-description {
  color: var(--battleship-gray);
  font-size: var(--fs-6);
  line-height: 1.7;
  max-width: 55ch;
  margin-inline: auto;
  margin-bottom: 40px;
}

.tripadvisor-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch; /* Ensures all cards have the same height */
}

.tripadvisor-widget-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-16);
  padding: 36px 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(212, 165, 116, 0.18);
  transition: var(--transition-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%; /* Fill the grid cell height */
  min-height: 420px; /* Base height to handle the review forms gracefully */
}

.tripadvisor-widget-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--desert-gold);
}

.tripadvisor-widget-label {
  font-size: var(--fs-7);
  font-weight: var(--fw-600);
  color: var(--jet);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(212, 165, 116, 0.3);
  width: 100%;
}

/* TripAdvisor widget container – ensure proper display */
.tripadvisor-widget-card .TA_cdswritereviewlgvi,
.tripadvisor-widget-card .TA_rated,
.tripadvisor-widget-card .TA_reco2 {
  width: 100%;
  display: block; /* Let the widget manage its own internal layout */
}

.tripadvisor-widget-card .TA_links {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.tripadvisor-widget-card .TA_links li {
  list-style: none;
}

.tripadvisor-widget-card .TA_links img {
  max-width: 200px;
  height: auto;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .tripadvisor-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tripadvisor-widgets {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tripadvisor-widget-card {
    padding: 28px 20px;
    min-height: auto; /* Reset height for stacked layout */
  }

  .tripadvisor-description {
    font-size: 1.5rem;
    margin-bottom: 28px;
  }

  .tripadvisor-section .section-title {
    font-size: clamp(1.9rem, 5vw, 2.4rem);
  }
}

@media (max-width: 480px) {
  .tripadvisor-widget-card {
    padding: 22px 16px;
    border-radius: var(--radius-12);
  }

  .tripadvisor-widget-label {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }

  .tripadvisor-widget-card .TA_links img {
    max-width: 160px;
  }
}

/* ---- Hero Specific Widget ---- */

.hero-tripadvisor-wrapper {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
}

/* Ensure the widget doesn't get cut off and stays centered */
.hero-tripadvisor-wrapper .TA_cdswritereviewlgvi {
  width: auto !important;
  max-width: 100%;
}

.hero-tripadvisor-wrapper .TA_links {
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile adjustments for Hero TripAdvisor */
@media (max-width: 575px) {
  .hero-tripadvisor-wrapper {
    margin-bottom: 16px;
    transform: scale(0.9); /* Slightly smaller on small phones */
  }
}

/* ---- Contextual Widgets (Testimonials) ---- */

.testimonials-tripadvisor {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

@media (max-width: 575px) {
  .testimonials-tripadvisor {
    margin-top: 24px;
  }
}
