/* ============================================================
   Collection listings V5 (option B "The Overlook") — shared stylesheet.
   Pages: /accommodation/hotel (accommodation-hotel.blade.php) and every
   collection-listing.blade.php page (villas, apartments, agriturismo,
   sea-side resorts, spas, wineries). Loaded with ?v=filemtime.
   Tokens come from css/components/ivs-tokens.css (global); buttons from
   css/components/ivs-buttons.css — this file only sizes them.
   ============================================================ */

.ivs-hpg {
    background: var(--v5-ivory, #faf9f6);
    color: var(--v5-ink, #201f1d);
    font-family: var(--v5-font-body, Georgia, serif);
    overflow-x: clip;
}
.ivs-hpg a { text-decoration: none; color: inherit; }

/* ── Hero, half height ─────────────────────────────────────────
   Runs behind the fixed header from y=0 (the featured-tours recipe);
   the padding clears the header, measured live by ivs-fab via
   --ivs-header-h so the 2-row tablet header is handled too. */
.ivs-hpg-hero {
    position: relative;
    overflow: hidden;
    background: #14130f; /* ink ground: no white flash before the photo paints */
    margin-top: 0;
    /* First screen = hero + the ~80px ink band right below it, ending flush
       with the viewport (boss, 15 Aug); the search desk lives INSIDE this
       section. */
    min-height: max(560px, calc(100svh - 80px));
    /* Bottom row: the mast sits bottom-left, the compact search desk
       bottom-right. The media, crumb and chevrons are absolute. */
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(1rem, 2vw, 2rem);
    padding-top: calc(var(--ivs-header-h, 130px) + 20px);
}
@media (max-width: 900px) {
    .ivs-hpg-hero { flex-direction: column; align-items: stretch; justify-content: flex-end; }
}
.ivs-hpg-hero-media,
.ivs-hpg-hero-slides { position: absolute; inset: 0; }
.ivs-hpg-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.ivs-hpg-hero-slide.is-on { opacity: 1; }
.ivs-hpg-hero-scrim {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 18% 88%,
        rgba(18, 17, 15, .78) 0%,
        rgba(18, 17, 15, .44) 42%,
        rgba(18, 17, 15, .10) 72%,
        rgba(18, 17, 15, 0) 100%);
}
/* Chevrons: shared component (ivs-chevnav); position only, never restyle.
   Dead centre of the hero's height. */
.ivs-hpg-hero .ivs-bnav { top: 50%; }

.ivs-hpg-crumb {
    position: absolute;
    top: calc(var(--ivs-header-h, 130px) + 14px);
    left: 0;
    width: 100%;
    padding: 0 clamp(1.2rem, 4vw, 3.4rem);
    z-index: 2;
}
.ivs-hpg-crumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: .55rem;
    font-family: var(--v5-font-label, sans-serif);
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(250, 249, 246, .82);
}
.ivs-hpg-crumb li + li::before { content: "/"; margin-right: .55rem; color: rgba(250, 249, 246, .45); }
.ivs-hpg-crumb a:hover { color: #fff; text-decoration: underline; }

.ivs-hpg-mast {
    position: relative;
    z-index: 2;
    max-width: 880px;
    padding: 0 1.2rem clamp(1.8rem, 3.2vw, 2.8rem) clamp(1.2rem, 4vw, 3.4rem);
}
/* Row layout only: let the mast take the width the desk leaves. In the
   stacked (column) layout flex-grow would stretch it the hero's full
   height and drag the text up under the header. */
@media (min-width: 901px) {
    .ivs-hpg-mast { flex: 1 1 auto; }
}
.ivs-hpg-eyebrow {
    font-family: var(--v5-font-label, sans-serif);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--v5-amber, #fcb913); /* amber is legal here: dark ground */
    margin: 0 0 .75rem;
}
.ivs-hpg-title {
    font-family: var(--v5-font-display, Georgia, serif);
    font-weight: 500;
    font-size: clamp(2.5rem, 5.4vw, 4.2rem);
    line-height: 1.04;
    color: #fff;
    margin: 0;
}
.ivs-hpg-deck {
    font-family: var(--v5-font-body, Georgia, serif);
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.19rem);
    line-height: 1.65;
    color: rgba(250, 249, 246, .92);
    max-width: 56ch;
    margin: .9rem 0 0;
}
.ivs-hpg-rule { width: 56px; height: 2px; background: var(--v5-gold, #b9995b); margin-top: 1.15rem; }

/* ── The desk: a long, low glass bar in the hero's bottom-right ── */
.ivs-hpg-desk {
    position: relative;
    z-index: 5;
    flex: 0 1 auto;
    width: min(720px, calc(100% - 2.4rem));
    margin: 0 clamp(1.2rem, 4vw, 3.4rem) clamp(1.8rem, 3.2vw, 2.8rem) 0;
    background: rgba(250, 249, 246, .88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 18px 40px -22px rgba(18, 17, 15, .6);
    padding: .85rem 1.1rem .8rem;
}
@media (max-width: 900px) {
    .ivs-hpg-desk { width: auto; margin: 0 clamp(1.2rem, 4vw, 3.4rem) 1.4rem; }
}
/* Phones: the photo is the hero; the search bar would cover most of it
   (owner decision, 14 Aug 2026). The hero form hides; the mid-list variant
   below carries the search instead. */
@media (max-width: 767px) {
    .ivs-hpg-hero .ivs-hpg-desk { display: none; }
    .ivs-hpg-crumb { display: none; }
    /* Without the desk the photo needs less canvas on a phone. */
    .ivs-hpg-hero { min-height: clamp(430px, 64svh, 640px); }
}
.ivs-hpg-desk-eyebrow {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--v5-font-label, sans-serif);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--v5-olive-700, #4a5e2f);
    margin: 0 0 .7rem;
}
.ivs-hpg-desk-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--v5-line, #e4e0d5); }
.ivs-hpg-form {
    display: grid;
    grid-template-columns: 1.6fr 1.1fr auto;
    gap: .6rem;
    align-items: end;
}
@media (max-width: 900px) {
    .ivs-hpg-form { grid-template-columns: 1fr; gap: .65rem; }
}
.ivs-hpg-label {
    display: block;
    font-family: var(--v5-font-label, sans-serif);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--v5-olive-700, #4a5e2f);
    margin-bottom: .45rem;
}
.ivs-hpg-input,
.ivs-hpg-select {
    width: 100%;
    border: 1px solid var(--v5-line, #e4e0d5);
    border-radius: 3px;
    background: #fff;
    font-family: var(--v5-font-body, Georgia, serif);
    font-size: .9rem;
    color: var(--v5-ink, #201f1d);
    padding: .55rem .75rem;
    transition: border-color .25s;
}
.ivs-hpg-input::placeholder { color: var(--v5-mist, #8b877c); font-style: italic; }
.ivs-hpg-input:focus,
.ivs-hpg-select:focus { outline: none; border-color: var(--v5-olive-500, #6b8051); }
.ivs-hpg-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b574d' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.4rem;
}
.ivs-hpg-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    white-space: nowrap;
    padding: .6rem 1.15rem;
}
@media (max-width: 900px) {
    .ivs-hpg-search-btn { width: 100%; }
}
.ivs-hpg-search-btn svg { width: 14px; height: 14px; }
.ivs-hpg-help {
    font-family: var(--v5-font-body, Georgia, serif);
    font-style: italic;
    font-size: .72rem;
    color: var(--v5-stone, #5b574d);
    margin: .55rem 0 0;
}

/* ── Ink band: Jesse wording + symbols (atlas-band language) ── */
.ivs-hpg-band {
    background: var(--v5-ink, #201f1d);
    border-top: 1px solid #14130f;
    border-bottom: 1px solid #14130f;
    box-shadow: inset 0 8px 16px -10px rgba(0, 0, 0, .5), inset 0 -8px 16px -10px rgba(0, 0, 0, .5);
    color: var(--v5-parchment, #f2efe8);
    /* The hero's photograph meets this band edge to edge. */
    margin-top: 0;
}
.ivs-hpg-band-in {
    width: min(1560px, calc(100% - 3rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 2.6vw, 2.6rem);
    padding: 1.35rem 0;
}
.ivs-hpg-cell {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: .8rem;
}
.ivs-hpg-ico { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; color: var(--v5-amber, #fcb913); }
.ivs-hpg-ico svg { width: 22px; height: 22px; }
.ivs-hpg-cell-txt {
    font-family: var(--v5-font-label, sans-serif);
    font-size: .78rem;
    line-height: 1.5;
    color: #e8e5da;
}
@media (max-width: 860px) {
    .ivs-hpg-band-in { flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1.2rem 0; }
}

/* ── Results meta ── */
.ivs-hpg-meta {
    width: min(1560px, calc(100% - 3rem));
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2.2rem 0 1.4rem;
}
.ivs-hpg-count {
    font-family: var(--v5-font-label, sans-serif);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--v5-stone, #5b574d);
}
.ivs-hpg-count strong { color: var(--v5-olive-700, #4a5e2f); }
.ivs-hpg-meta-line { flex: 1; height: 1px; background: var(--v5-line, #e4e0d5); align-self: center; }

/* ── Editorial intro: parchment + toile band between the ink band and the
   grid (the homepage/tour V5 narrative-band recipe: hairline borders,
   inset shadows top and bottom, toile fading out at the edges). Tile is
   the optimised WebP, not the raw italy.png. ── */
.ivs-hpg-intro {
    position: relative;
    overflow: hidden;
    background: var(--v5-parchment, #f2efe8);
    border-top: 1px solid var(--v5-line, #e4e0d5);
    border-bottom: 1px solid var(--v5-line, #e4e0d5);
    box-shadow: inset 0 14px 26px -14px rgba(32, 31, 29, .22), inset 0 -14px 26px -14px rgba(32, 31, 29, .22);
    padding: clamp(2.6rem, 5vw, 4.2rem) 0;
    margin-bottom: clamp(1.4rem, 2.4vw, 2.2rem);
}
.ivs-hpg-intro::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url(/images/italy-tile.webp) repeat;
    background-size: 620px;
    opacity: .14;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
@media (max-width: 1024px) {
    .ivs-hpg-intro::after { background-size: 420px; }
}
.ivs-hpg-intro-in {
    position: relative;
    z-index: 1;
    width: min(880px, calc(100% - 3rem));
    margin: 0 auto;
    text-align: center;
}
.ivs-hpg-intro-eyebrow {
    font-family: var(--v5-font-label, sans-serif);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--v5-olive-700, #4a5e2f);
    margin: 0 0 .7rem;
}
.ivs-hpg-intro-title {
    font-family: var(--v5-font-display, Georgia, serif);
    font-weight: 500;
    font-size: clamp(1.85rem, 3vw, 2.7rem);
    line-height: 1.15;
    color: var(--v5-ink, #201f1d);
    margin: 0 0 1rem;
}
.ivs-hpg-intro-body {
    font-family: var(--v5-font-body, Georgia, serif);
    font-size: clamp(.98rem, 1.3vw, 1.08rem);
    line-height: 1.85;
    color: var(--v5-stone, #5b574d);
    margin: 0 auto;
    max-width: 68ch;
}

/* ── Chapter divider between the intro band and the grid: hairlines
   meeting a small gold fleuron (the V5 gold-rule language). ── */
.ivs-hpg-fleuron {
    width: min(1560px, calc(100% - 3rem));
    margin: 0 auto clamp(1.6rem, 2.6vw, 2.4rem);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    color: var(--v5-gold, #b9995b);
}
.ivs-hpg-fleuron::before,
.ivs-hpg-fleuron::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--v5-line, #e4e0d5);
}
.ivs-hpg-fleuron svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* ── Photo + rating badge (stars AND the full tag name) ── */
.ivs-hpg-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: var(--v5-parchment, #f2efe8);
    display: block;
}
.ivs-hpg-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
.ivs-hpg-badge {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--v5-ink, #201f1d);
    color: var(--v5-parchment, #f2efe8);
    font-family: var(--v5-font-label, sans-serif);
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: .42rem .7rem;
}
.ivs-hpg-badge-stars { color: var(--v5-gold, #b9995b); letter-spacing: .14em; font-size: .66rem; }

/* ── The lead: first hotel, staged wide ── */
.ivs-hpg-lead {
    width: min(1560px, calc(100% - 3rem));
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 58% 1fr;
    background: #fff;
    border: 1px solid var(--v5-line, #e4e0d5);
}
.ivs-hpg-lead .ivs-hpg-photo { aspect-ratio: auto; min-height: 340px; height: 100%; }
.ivs-hpg-lead:hover .ivs-hpg-photo img { transform: scale(1.045); }
.ivs-hpg-lead-body {
    background: var(--v5-parchment, #f2efe8);
    padding: clamp(1.4rem, 2.6vw, 2.6rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .8rem;
}
.ivs-hpg-lead-flag {
    font-family: var(--v5-font-label, sans-serif);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--v5-gold, #b9995b);
}
.ivs-hpg-lead-name {
    font-family: var(--v5-font-display, Georgia, serif);
    font-weight: 500;
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    line-height: 1.15;
    color: var(--v5-ink, #201f1d);
    margin: 0;
}
.ivs-hpg-lead-desc {
    font-family: var(--v5-font-body, Georgia, serif);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--v5-stone, #5b574d);
}
.ivs-hpg-lead .ivs-hpg-btn { align-self: flex-start; margin-top: .4rem; }
@media (max-width: 900px) {
    .ivs-hpg-lead { grid-template-columns: 1fr; }
    .ivs-hpg-lead .ivs-hpg-photo { min-height: 240px; }
}

/* ── The grid ──
   Six tracks, each card spanning two = three per row. The doubled track
   count exists for the leftover row: a page whose count is not a multiple
   of three (page 1 gives its first card to the lead) would otherwise end
   on a hole, and layout follows the data (house rule: no forced white
   space). Two orphans split the last row half and half; a single orphan
   sits centred. */
.ivs-hpg-grid {
    width: min(1560px, calc(100% - 3rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(1.2rem, 2vw, 2rem);
}
.ivs-hpg-card { grid-column: span 2; }
/* Three per row: orphan handling scoped to this layout only, so the rules
   cannot leak into (and outrank) the two-column ones below. */
@media (min-width: 1101px) {
    .ivs-hpg-card:nth-child(3n+1):nth-last-child(2),
    .ivs-hpg-card:nth-child(3n+1):nth-last-child(2) + .ivs-hpg-card { grid-column: span 3; }
    .ivs-hpg-card:nth-child(3n+1):last-child { grid-column: 3 / span 2; }
}
@media (max-width: 1100px) {
    .ivs-hpg-grid { grid-template-columns: repeat(4, 1fr); }
    /* Two per row: an odd total leaves one orphan, centred. */
    .ivs-hpg-card:nth-child(odd):last-child { grid-column: 2 / span 2; }
}
@media (max-width: 640px) {
    .ivs-hpg-grid { grid-template-columns: 1fr; }
    .ivs-hpg-card,
    .ivs-hpg-card:nth-child(odd):last-child { grid-column: auto; }
}

.ivs-hpg-card {
    background: #fff;
    border: 1px solid var(--v5-line, #e4e0d5);
    display: flex;
    flex-direction: column;
    transition: box-shadow .3s, translate .3s;
}
.ivs-hpg-card:hover {
    box-shadow: 0 14px 30px -18px rgba(32, 31, 29, .35);
    translate: 0 -3px;
}
.ivs-hpg-card:hover .ivs-hpg-photo img { transform: scale(1.045); }
.ivs-hpg-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.15rem 1.25rem 1.3rem;
    gap: .55rem;
}
.ivs-hpg-loc {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--v5-font-label, sans-serif);
    font-size: .63rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--v5-olive-700, #4a5e2f);
}
.ivs-hpg-loc svg { width: 11px; height: 13px; flex: 0 0 auto; }
.ivs-hpg-name {
    font-family: var(--v5-font-display, Georgia, serif);
    font-weight: 500;
    font-size: 1.32rem;
    line-height: 1.25;
    color: var(--v5-ink, #201f1d);
    margin: 0;
}
.ivs-hpg-desc {
    font-family: var(--v5-font-body, Georgia, serif);
    font-size: .92rem;
    line-height: 1.65;
    color: var(--v5-stone, #5b574d);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Button: component supplies the look, the page only sizes and seats it. */
.ivs-hpg-btn { margin-top: auto; align-self: flex-start; }
.ivs-hpg-card .ivs-hpg-btn { padding: .62rem 1.2rem; font-size: .66rem; }

/* ── Empty result ── */
.ivs-hpg-empty {
    width: min(1560px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 2.6rem 0;
    text-align: center;
}
.ivs-hpg-empty p {
    font-family: var(--v5-font-body, Georgia, serif);
    font-style: italic;
    color: var(--v5-stone, #5b574d);
    margin: 0;
}
.ivs-hpg-empty a {
    display: inline-block;
    margin-top: .7rem;
    font-family: var(--v5-font-label, sans-serif);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--v5-olive-700, #4a5e2f);
    border-bottom: 1px solid var(--v5-olive-300, #a9b58f);
}

/* ── Pagination: bootstrap-4 markup, V5 clothes ── */
.ivs-hpg-pgn { display: flex; justify-content: center; padding: 2.6rem 0 3.6rem; }
.ivs-hpg-pgn .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.ivs-hpg-pgn .page-item .page-link {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-family: var(--v5-font-label, sans-serif);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    border: 1px solid var(--v5-line, #e4e0d5);
    border-radius: 3px;
    background: none;
    color: var(--v5-stone, #5b574d);
    transition: all .25s;
    padding: 0 .5rem;
}
.ivs-hpg-pgn .page-item .page-link:hover {
    border-color: var(--v5-olive-500, #6b8051);
    color: var(--v5-olive-700, #4a5e2f);
    background: none;
}
/* style.css:3659 paints the active page bootstrap-blue with !important
   (global legacy, off limits) — countered here, scoped to this page only. */
.ivs-hpg-pgn .page-item.active .page-link {
    background-color: var(--v5-ink, #201f1d) !important;
    border-color: var(--v5-ink, #201f1d) !important;
    color: var(--v5-parchment, #f2efe8);
}
.ivs-hpg-pgn .page-item.disabled .page-link { opacity: .4; }

@media (prefers-reduced-motion: reduce) {
    .ivs-hpg-hero-slide { transition: none; }
    .ivs-hpg-card,
    .ivs-hpg-photo img { transition: none; }
    .ivs-hpg-card:hover { translate: none; }
    .ivs-hpg-card:hover .ivs-hpg-photo img,
    .ivs-hpg-lead:hover .ivs-hpg-photo img { transform: none; }
}

@media (max-width: 480px) {
    .ivs-hpg-pgn .page-item .page-link { min-width: 32px; height: 34px; font-size: .66rem; padding: 0 .45rem; }
}

/* ── Mid-list search desk: phones only. On desktop the hero carries the
   form, so this card hides and the split grids close ranks. ── */
.ivs-hpg-desk--mid { display: none; }
@media (max-width: 767px) {
    .ivs-hpg-desk--mid {
        display: block;
        width: min(1560px, calc(100% - 3rem));
        margin: clamp(1.2rem, 4vw, 2rem) auto;
        background: var(--v5-ivory, #faf9f6);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border: 1px solid var(--v5-line, #e4e0d5);
        box-shadow: 0 12px 26px -18px rgba(32, 31, 29, .35);
    }
}
@media (min-width: 768px) {
    /* the hidden mid desk sits between the two grids; restore the row gap */
    .ivs-hpg-grid--cont { margin-top: clamp(1.2rem, 2vw, 2rem); }
}
