/* Visual media upgrade — first-party media from the owner-provided V4 package.
   Loaded last on purpose: preserves the approved layout while enriching existing blocks. */

.v3-booking-help{
  position:sticky;
  isolation:isolate;
  overflow:hidden;
  background:#0b2b22;
}
.v3-booking-help::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:url('../media/three-crowns/rooms/cottage/double-standard/03.webp') center 42%/cover no-repeat;
  transform:scale(1.02);
}
.v3-booking-help::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(165deg,rgba(5,27,20,.76),rgba(5,27,20,.94) 74%);
}
.v3-booking-help .v3-help-actions a,
.v3-booking-help .v3-booking-rule{backdrop-filter:blur(4px)}

/* The territory film becomes the ambient background of the whole section.
   Existing route/typography stays in the same structure above it. */
.v3-territory{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#071d17;
}
.v3-territory::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(5,24,18,.84) 0%,rgba(5,24,18,.67) 34%,rgba(5,24,18,.86) 100%),
    radial-gradient(circle at 78% 28%,rgba(229,201,143,.10),transparent 34%);
}
.v3-territory-film{
  position:absolute;
  inset:0;
  z-index:-2;
  width:100%;
  height:100%;
  max-width:none;
  margin:0;
  background:#071d17 url('../media/three-crowns/territory-poster.webp') center/cover no-repeat;
  box-shadow:none;
}
.v3-territory-film video{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.82;
}
.v3-territory-film .v3-film-caption{display:none}
.v3-territory .v3-section-head,
.v3-territory .v3-territory-route,
.v3-territory .v3-territory-photo-strip{position:relative;z-index:1}

.v3-territory-photo-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:54px;
}
.v3-territory-photo-strip figure{
  position:relative;
  min-height:230px;
  margin:0;
  overflow:hidden;
  background:#0d3026;
  border:1px solid rgba(255,255,255,.13);
}
.v3-territory-photo-strip img{object-fit:cover;transition:transform .55s ease}
.v3-territory-photo-strip figure:hover img{transform:scale(1.035)}
.v3-territory-photo-strip figure::after{
  content:"";
  position:absolute;
  inset:45% 0 0;
  background:linear-gradient(transparent,rgba(3,18,13,.82));
}
.v3-territory-photo-strip figcaption{
  position:absolute;
  z-index:2;
  left:17px;
  right:17px;
  bottom:15px;
  color:#fff;
  font-family:var(--serif);
  font-size:1.04rem;
}

/* Add photography to the existing amenity cards without changing their grid. */
.v3-amenity-grid article{min-height:390px;padding:0 23px 23px;overflow:hidden;background:#fff}
.v3-amenity-card-media{
  position:relative;
  height:160px;
  margin:0 -23px 20px;
  overflow:hidden;
  background:#e7e5dd;
}
.v3-amenity-card-media::after{
  content:"";
  position:absolute;
  inset:0;
  box-shadow:inset 0 -45px 55px rgba(7,29,23,.12);
}
.v3-amenity-card-media img{object-fit:cover;transition:transform .5s ease}
.v3-amenity-grid article:hover .v3-amenity-card-media img{transform:scale(1.035)}
.v3-amenity-grid h3{margin:auto 0 10px}

/* Reviews retain the approved content; a first-party visual establishes place/context. */
.v3-review-visual{
  position:relative;
  min-height:clamp(330px,42vw,520px);
  margin-top:52px;
  overflow:hidden;
  background:#d9ddd8;
}
.v3-review-visual img{object-fit:cover}
.v3-review-visual-shade{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 52%,rgba(7,29,23,.26));
}
.v3-review-grid{margin-top:14px}

/* Owner-approved services get visual covers.  Some covers are contextual/decorative;
   the UI never claims they depict the exact paid service. */
.v3-extra-grid article{
  position:relative;
  min-height:395px;
  display:flex;
  flex-direction:column;
  padding:0 26px 26px;
  overflow:hidden;
}
.v3-extra-card-media{
  position:relative;
  height:165px;
  margin:0 -26px 22px;
  overflow:hidden;
  background:#102f25;
}
.v3-extra-card-media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(5,27,20,.04),rgba(5,27,20,.32));
}
.v3-extra-card-media img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .5s ease}
.v3-extra-grid article:hover .v3-extra-card-media img{transform:scale(1.035)}
.v3-extra-grid h4{margin:auto 0 10px}
.v3-extra-grid .text-link{margin-top:17px;color:#e5c98f}

/* Keep the group structure but use the authentic exterior as a full cinematic backdrop. */
.v3-groups-media img{object-position:center 46%}

/* Contacts and final CTA also receive first-party context, without changing content. */
.v3-arrival-card{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  color:#fff;
  background:#0a2a21;
}
.v3-arrival-card::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:url('../media/three-crowns/territory/main-building.webp') center/cover no-repeat;
}
.v3-arrival-card::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(150deg,rgba(5,27,20,.76),rgba(5,27,20,.94));
}
.v3-arrival-card .eyebrow{color:#e5c98f}
.v3-arrival-card p{color:rgba(255,255,255,.73)}
.v3-arrival-card .text-link{color:#fff}

.v3-final-cta{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#071d17;
}
.v3-final-cta::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:url('../media/three-crowns/territory/beach-mountains.webp') center 50%/cover no-repeat;
}
.v3-final-cta::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(90deg,rgba(5,24,18,.94),rgba(5,24,18,.72) 62%,rgba(5,24,18,.82));
}

/* Room catalogue: every category now has a visual cover from the owner V4 set. */
.room-catalog-card-with-media{min-height:590px;padding:0 28px 28px}
.room-catalog-media{
  position:relative;
  height:245px;
  margin:0 -28px 24px;
  overflow:hidden;
  background:#e9e5dc;
}
.room-catalog-media::after{
  content:"";
  position:absolute;
  inset:55% 0 0;
  background:linear-gradient(transparent,rgba(7,29,23,.12));
}
.room-catalog-media img{object-fit:cover;transition:transform .5s ease}
.room-catalog-card-with-media:hover .room-catalog-media img{transform:scale(1.035)}
.room-catalog-card-with-media h2{margin:34px 0 12px}

/* Per-category galleries. Exact vs approximate mapping is declared in the page copy. */
.room-detail-gallery{padding:10px 0 92px;background:var(--ivory)}
.room-detail-gallery-head{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(300px,.52fr);
  gap:60px;
  align-items:end;
  padding-bottom:35px;
}
.room-detail-gallery-head h2{margin-bottom:0}
.room-detail-gallery-head>p{margin:0;color:var(--muted);font-size:.82rem;line-height:1.7}
.room-detail-gallery .gallery-grid{margin-top:0}
.room-detail-gallery .gallery-item{min-height:270px}
.room-detail-gallery .gallery-item:nth-child(1){grid-column:span 2;min-height:430px}

/* Responsive — keep swipe behavior and avoid heavy video effects on small screens. */
@media(max-width:1100px){
  .v3-territory-photo-strip{grid-template-columns:1fr 1fr}
  .v3-territory-photo-strip figure{min-height:280px}
  .room-detail-gallery-head{grid-template-columns:1fr;gap:18px}
}

@media(max-width:760px){
  .v3-booking-help{position:relative;top:auto}
  .v3-territory-film{margin:0}
  .v3-territory-film video{height:100%;min-height:100%}
  .v3-territory-photo-strip{
    display:flex;
    overflow-x:auto;
    gap:10px;
    margin-inline:-14px;
    padding-inline:14px;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
  }
  .v3-territory-photo-strip::-webkit-scrollbar{display:none}
  .v3-territory-photo-strip figure{flex:0 0 79vw;min-height:245px;scroll-snap-align:start}
  .v3-amenity-grid article{min-height:380px;padding-bottom:22px}
  .v3-amenity-card-media{height:170px}
  .v3-review-visual{min-height:58vw;margin-inline:-14px;width:calc(100% + 28px)}
  .v3-extra-grid article{min-height:370px}
  .v3-extra-card-media{height:180px}
  .room-catalog-card-with-media{min-height:560px;padding-bottom:25px}
  .room-catalog-media{height:230px}
  .room-detail-gallery{padding-bottom:70px}
  .room-detail-gallery .gallery-grid{display:flex;overflow-x:auto;gap:10px;padding-inline:14px;margin-inline:-14px;scroll-snap-type:x mandatory}
  .room-detail-gallery .gallery-item,
  .room-detail-gallery .gallery-item:nth-child(1){flex:0 0 86vw;min-height:64vw;grid-column:auto;scroll-snap-align:start}
}

@media(prefers-reduced-motion:reduce){
  .v3-territory-film video{display:none}
  .v3-territory-film{background-image:url('../media/three-crowns/territory-poster.webp')}
  .v3-territory-photo-strip img,
  .v3-amenity-card-media img,
  .v3-extra-card-media img,
  .room-catalog-media img{transition:none!important;transform:none!important}
}
