/* R0006: restore the legacy Andorra place-card language and give editorial links a dedicated card system. */
.andorra-new-guides {
  --andorra-guide-ink: #1c2830;
  --andorra-guide-muted: #687780;
  --andorra-guide-line: #e3e9e9;
  --andorra-guide-accent: #a16207;
  margin: clamp(28px, 4vw, 52px) auto;
  color: var(--andorra-guide-ink);
}

.directory-main > .andorra-new-guides {
  width: min(1232px, calc(100% - 48px));
  margin-inline: auto;
}

.gallery.is-photo-unavailable {
  background-color: #edf1f1 !important;
  background-image: url("/andorra/assets/place-photo-placeholder-r0007.svg") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.andorra-new-guides > h2 {
  margin: 0 0 26px;
  color: var(--andorra-guide-ink);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.andorra-new-guides > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 14px;
  color: #34434a;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.015em;
}

.andorra-new-guides > h3::after {
  height: 1px;
  flex: 1;
  background: var(--andorra-guide-line);
  content: "";
}

.andorra-new-guides > .andorra-guide-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

/* Place cards follow the existing .place-card / .card-image / .card-body proportions. */
.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card {
  position: relative;
  display: flex !important;
  min-width: 0;
  min-height: 310px;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid #e7e5e4;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  color: var(--andorra-guide-ink);
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card:hover {
  transform: translateY(-4px);
  border-color: #d7c6a5;
  box-shadow: 0 14px 30px rgba(26, 39, 45, .12);
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card > img {
  display: block;
  width: 100% !important;
  height: 190px !important;
  flex: 0 0 190px;
  object-fit: cover;
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card:not(:has(> img))::before {
  display: block;
  height: 190px;
  flex: 0 0 190px;
  background: #edf1f1 url("/andorra/assets/no-available-photo.svg") center / cover no-repeat;
  content: "";
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card > span {
  display: flex !important;
  min-height: 118px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 15px !important;
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card strong {
  color: #202b31;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.3;
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card small {
  color: var(--andorra-guide-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card > span::after {
  margin-top: auto;
  padding-top: 4px;
  color: #53656d;
  content: "Explore place  →";
  font-size: 13px;
  font-weight: 700;
}

/* Editorial cards use a more spacious cover-and-deck treatment than place listings.
   The section is present on both destination directories and individual guide pages. */
.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card {
  position: relative;
  display: flex !important;
  min-width: 0;
  min-height: 340px;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--andorra-guide-line);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #fbfcfc 100%);
  box-shadow: 0 5px 18px rgba(29, 45, 53, .055);
  color: var(--andorra-guide-ink);
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card:hover {
  transform: translateY(-4px);
  border-color: #c9d5d5;
  box-shadow: 0 16px 34px rgba(29, 45, 53, .13);
}

.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card > img {
  display: block;
  width: 100% !important;
  height: 176px !important;
  flex: 0 0 176px;
  object-fit: cover;
  background: #edf1f1;
}

.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card > span {
  display: flex !important;
  min-height: 150px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 17px 18px 16px !important;
}

.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card small {
  order: -1;
  color: #6b7c82;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card strong {
  color: #1d2930;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.34;
}

.andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card > span::after {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 5px;
  color: #81520d;
  content: "Read article  →";
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 900px) {
  .andorra-new-guides > .andorra-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .andorra-new-guides > .andorra-guide-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .andorra-new-guides > h3:first-of-type + .andorra-guide-grid .andorra-guide-card,
  .andorra-new-guides > h3:last-of-type + .andorra-guide-grid .andorra-guide-card {
    min-height: 0;
  }
}
