/* Stay In Tramore website: styles for the home pages. One file per area (kingnail/guidebook#11) so jobs that work side by side never edit the same lines of site.css. Loaded after site.css on every page; keep every rule scoped to this area. */

/* Listing cards (kingnail/guidebook#14): on the home page, Book now and Work from Tramore (.rates). Three listings sit
   three across from 1024 px; two sit two across; four sit two by two. An odd last card in a two-across row is
   centred at the width of one column, so no row shows an empty cell. One listing: one column. */
.stays { --g: clamp(24px, 4vw, 56px); }
.rates { --g: clamp(20px, 3vw, 40px); }
.stays:has(> :only-child), .rates:has(> :only-child) { grid-template-columns: minmax(0, 34rem); }
@media (min-width: 761px) {
  .stays:not(.solo) > :last-child:nth-child(odd):not(:only-child),
  .rates > :last-child:nth-child(odd):not(:only-child) { grid-column: 1 / -1; justify-self: center; width: calc((100% - var(--g)) / 2); }
}
@media (min-width: 1024px) {
  .stays:not(.solo):has(> :nth-child(3):last-child), .rates:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
  .stays:not(.solo):has(> :nth-child(3):last-child) > :last-child,
  .rates:has(> :nth-child(3):last-child) > :last-child { grid-column: auto; justify-self: stretch; width: auto; }
}

/* "★ N five-star reviews" wherever a listing is shown (#14) */
.fivestar { font: 500 .95rem var(--font-body); color: var(--ink); }
.stay .fivestar { margin-top: -8px; }
.panel .fivestar { margin-top: -8px; color: var(--ink-2); }
.other .fivestar { font-size: .9rem; }

/* the Airbnb top 10% badge above the listings (#14) */
.laurel { display: flex; gap: 14px; align-items: center; max-width: 40rem; margin-top: 6px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--paper); }
.laurel .badgepic { flex: 0 0 auto; display: grid; place-items: center; }
.laurel .badgepic img { width: 102px; height: auto; display: block; }
.laurel b { font: 500 1.1rem var(--font-display); }
.laurel p { font-size: .92rem; color: var(--ink-2); margin-top: 2px; }

/* food cards are links (#14) */
a.bite { text-decoration: none; color: inherit; }
a.bite:hover h3, a.print:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }

/* the map picture keeps its own 3:2 shape at every width: its width and height in the markup would otherwise
   fix its height at 800 px and cut the sides off on a narrow screen (#14) */
.mapteaser a.pic img { height: auto; }
/* the home page's map section shares the id "map" with the map page; it takes its own height, not the map page's
   fixed one, so the picture and credit never run over the next section (#14) */
section#map { height: auto; }
/* the map picture's credit, under the picture (#14) */
.mapteaser .credit { grid-column: 2; margin-top: calc(-1 * clamp(16px, 4vw, 52px)); font-size: .8rem; color: var(--ink-2); }
@media (max-width: 860px) { .mapteaser .credit { grid-column: auto; margin-top: -12px; } }

/* Discover Tramore (#14): two pictures, then the three short histories */
.discover { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "t t"; gap: clamp(16px, 3vw, 36px); }
.discover .dpic { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }
.discover .dpic:first-child { grid-area: a; }
.discover .dpic:last-child { grid-area: b; }
.discover .dcols { grid-area: t; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.discover .dcols h3 { font-size: 1.3rem; margin-bottom: 8px; }
.discover .dcols p { color: var(--ink-2); }
@media (max-width: 860px) { .discover .dcols { grid-template-columns: 1fr; } }

/* the Instagram strip (#14): pictures kept on this site, one link to the account */
.insta { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.insta img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 8px; }
@media (max-width: 1023px) { .insta { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* the email box's own message when left with a bad address (#14): contact and Work forms */
.fieldbad { color: #8a1f14; font-size: .9rem; font-weight: 500; }
.enquiry input[aria-invalid="true"], .loop input[aria-invalid="true"] { border-color: #8a1f14; }

/* gb#14: the home cards take the town page's first sentence; four lines at most, the rest is on the town page */
.prints .print p, .bites .bite p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }

/* the ratings band under the guest quote: the old site's own badge pictures (white drawings) on the dark band colour,
   and the number of five-star reviews (kingnail/guidebook#20) */
.marks.badgeband { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 28px; padding: 18px 22px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); }
.marks.badgeband > img { height: 64px; width: auto; display: block; }
.marks.badgeband .fivecount { display: grid; gap: 6px; justify-items: start; }
.marks.badgeband .fivecount img { height: 26px; width: auto; display: block; }
.marks.badgeband .fivecount b { font: 500 1.1rem var(--font-display); color: var(--ink); }

/* the review counts: the Airbnb five-star line, the Booking.com 10/10 line under it (kingnail/guidebook#20) */
.fivestar .rc { display: block; }
.fivestar .rc + .rc { margin-top: 2px; }
.marks.badgeband .fivecount b.ten { font-size: 1rem; }
/* the Booking.com line's small "10" badge, as the five-star line has its star: the old site's picture used as a mask,
   so it takes the text colour exactly as the star does (black here, grey in the price panel), with the 10 cut out; a
   span, not an <img>, so no card's picture rule can stretch it (Dara: "It should be black, like the star")
   (kingnail/guidebook#20) */
.fivestar .b10, .fivecount .b10 { display: block; flex: 0 0 auto; width: 1em; height: 1em; color: inherit; background: currentColor; -webkit-mask: url("/site/img/badges/booking-10.png") center / contain no-repeat; mask: url("/site/img/badges/booking-10.png") center / contain no-repeat; }
.marks.badgeband .fivecount .b10 { width: 22px; height: 22px; }
.fivestar .rc.ten { display: flex; align-items: center; gap: 5px; }
.marks.badgeband .fivecount b.ten { display: flex; align-items: center; gap: 8px; }
/* the band's two lines alike: a star before the Airbnb count, the 10 badge before the Booking.com count (Dara) */
.marks.badgeband .fivecount b.five { display: flex; align-items: center; gap: 8px; }
.marks.badgeband .fivecount b.five .st { width: 22px; text-align: center; font-size: 22px; line-height: 1; color: inherit; }

/* the explorable map in a frame, on the home page and the listing pages (kingnail/guidebook#20) */
.mapframe { position: relative; border-radius: 18px; overflow: hidden; border: 1.5px solid var(--line); background: var(--band); aspect-ratio: 4 / 3; max-height: 560px; width: 100%; }
.mapframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 560px) { .mapframe { aspect-ratio: 3 / 4; max-height: 70vh; } }

