/* ==========================================================================
   Residenza La Scala — Room cards (home), catalog page and room detail pages

   Sub-pages reuse `css/style.css` directly (Bootstrap 3 utilities + the
   home's typography tokens like `wrap-line`, `font-weight-200`, `text-grey`,
   `bg-white-09`, `btn-color`). This file only adds:
     - the room cards
     - the rooms slider on the home
     - the sub-page chrome (navbar, hero, sections, footer)
     - the room detail layout (hero, gallery, lightbox, prev/next)
   ========================================================================== */

/* ----- Home: rooms slider (3 slides x 3 cards) --------------------------- */

.rooms-slider {
    position: relative;
    padding: 30px 0 0;
}

.rooms-slides {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0;
    padding-bottom: 4px;
}

.rooms-slides::-webkit-scrollbar { display: none; }

.rooms-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    box-sizing: border-box;
    padding: 0 4px;
}

.rooms-slide .room-card-wrap {
    width: auto !important;
    float: none !important;
    padding: 0 !important;
    min-width: 0;
}

.rooms-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 26px 0 8px;
}

.rooms-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: background .25s ease, transform .25s ease, width .25s ease;
}

.rooms-dot:hover { background: rgba(0, 0, 0, .45); }

.rooms-dot.active {
    background: #00ACC1;            /* teal — same as home `btn-color` */
    width: 26px;
    border-radius: 6px;
}

.rooms-dot:focus { outline: 2px solid rgba(0, 172, 193, .55); outline-offset: 3px; }

.rooms-cta {
    text-align: center;
    margin: 18px 0 10px;
}

.rooms-cta .btn {
    min-width: 220px;
    letter-spacing: .12em;
}

@media (max-width: 600px) {
    .rooms-slide { gap: 8px; padding: 0; }
    .room-card-title { font-size: 15px; }
    .room-card-meta { font-size: 9px; letter-spacing: .1em; }
    .room-card-desc { display: none; }
    .room-card-link { font-size: 10px; letter-spacing: .1em; }
    .room-card-body { padding: 10px 10px 12px; }
}

/* ----- Catalog grid (rooms.html) ----------------------------------------- */

.room-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.room-cards .room-card-wrap { padding: 0; }

@media (max-width: 900px) {
    .room-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .room-cards { grid-template-columns: 1fr; }
}

/* ----- Room card — ivory + teal accent ----------------------------------- */

.room-card {
    display: block;
    position: relative;
    overflow: hidden;
    background: #f5efe5;
    color: #2a2520;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ece4d4;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    box-shadow: 0 2px 6px rgba(58, 45, 25, .08);
    height: 100%;
}

.room-card:hover,
.room-card:focus {
    color: #2a2520;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(58, 45, 25, .18);
    border-color: #00ACC1;
}

.room-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.66%;
    overflow: hidden;
    background: #e6dcc8;
}

.room-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.room-card:hover .room-card-image img { transform: scale(1.05); }

.room-card-body { padding: 18px 20px 22px; }

.room-card-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: .04em;
    color: #1f1a14;
}

.room-card-meta {
    display: block;
    color: #00ACC1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 10px;
}

.room-card-desc {
    color: #574e42;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 14px;
    min-height: 3.1em;
}

.room-card-link {
    display: inline-block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: #1f1a14;
    border-bottom: 1px solid rgba(0, 172, 193, .55);
    padding-bottom: 2px;
    transition: border-color .25s ease, color .25s ease;
}

.room-card:hover .room-card-link {
    color: #00ACC1;
    border-color: #00ACC1;
}

/* ==========================================================================
   Sub-page chrome — used by rooms.html and rooms/<slug>.html
   ========================================================================== */

.subpage {
    background: #fafafa;
    color: #444;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    margin: 0;
    padding-top: 70px;          /* room for the fixed navbar */
    -webkit-font-smoothing: antialiased;
}

/*
 * `responsive.css` sets `body { overflow: hidden }` on desktop so the home's
 * split-screen layout can slide horizontally. Subpages don't use that
 * mechanism — restore normal vertical scrolling. `rooms.css` is loaded after
 * `responsive.css`, so the cascade alone is enough.
 */
body.subpage {
    overflow: visible;
    overflow-y: auto;
    height: auto;
}

/* Navbar -------------------------------------------------------- */

.subpage-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(40, 40, 40, .96);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 4px 18px rgba(0, 0, 0, .25);
    backdrop-filter: blur(6px);
}

.subpage-navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.subpage-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.subpage-brand:hover { color: #fff; opacity: .85; }

.subpage-brand img { display: block; }

.subpage-nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.subpage-nav-links a {
    color: #f4f4f4 !important;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}

.subpage-nav-links a:hover,
.subpage-nav-links a.active {
    color: #fff !important;
    border-color: #00ACC1;
}

.subpage-nav-cta {
    margin: 0 0 0 4px;
    padding: 8px 18px !important;
    font-size: 12px;
    letter-spacing: .14em;
}

.subpage-burger {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    padding: 6px 10px;
    cursor: pointer;
}

@media (max-width: 760px) {
    .subpage-nav-links { display: none; }
    .subpage-nav-links.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(30, 30, 30, .98);
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .subpage-nav-links.open a {
        padding: 14px 26px;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
    }
    .subpage-burger { display: inline-block; }
    .subpage-nav-cta { display: none; }
}

/* Hero ---------------------------------------------------------- */

.subpage-hero {
    position: relative;
    overflow: hidden;
    background: #2a2a2a;
    color: #fff;
}

.subpage-hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.subpage-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subpage-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .65) 100%);
    z-index: 1;
}

.subpage-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 110px 26px 90px;
    text-align: center;
}

.subpage-hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: #fff;
    opacity: .8;
    margin-bottom: 18px;
}

.subpage-hero h1 {
    margin: 0 0 8px;
    font-weight: 400;
    font-size: clamp(34px, 5.6vw, 60px);
    letter-spacing: .02em;
    line-height: 1.15;
}

.subpage-hero-lead {
    margin: 30px auto 0;
    max-width: 680px;
    color: rgba(255, 255, 255, .9);
    font-size: 17px;
    line-height: 1.65;
}

/* "Hero" of catalog page is shorter than the room hero */
.subpage-hero--short .subpage-hero-inner { padding: 80px 26px 70px; }
.subpage-hero--tall .subpage-hero-inner  { padding: 150px 26px 110px; }

/* Section ------------------------------------------------------- */

.subpage-section {
    padding: 70px 26px;
    background: #fff;
}

.subpage-section--cream { background: #f5efe5; }
.subpage-section--light { background: #fafafa; }

.subpage-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.subpage-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.subpage-section-title h2 {
    margin: 0;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: .04em;
    color: #222;
}

.subpage-section-title .wrap-line {
    /* same style as home: a 40px line under the title */
    margin: 18px 0 0;
}

.subpage-section-title .wrap-line:before {
    border-bottom-color: #222;
}

.subpage-section-title.on-dark h2 { color: #fff; }
.subpage-section-title.on-dark .wrap-line:before { border-bottom-color: #fff; }

.subpage-lead {
    max-width: 760px;
    margin: 0 auto 0;
    text-align: center;
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

/* Amenities (room detail) --------------------------------------- */

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 22px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.amenities-grid li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e0d4;
    border-radius: 2px;
    color: #444;
    font-size: 15px;
}

.amenities-grid li::before {
    content: "✓";
    color: #00ACC1;
    font-weight: 600;
}

.subpage-section--cream .amenities-grid li { background: #fff; }

/* Gallery ------------------------------------------------------- */

.subpage-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.subpage-gallery a {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #ece4d4;
}

.subpage-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, opacity .3s ease;
}

.subpage-gallery a:hover img {
    transform: scale(1.04);
    opacity: .92;
}

/* Lightbox (CSS-only via :target) ------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.lightbox:target { display: flex; }

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, .9);
}

.lightbox .close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 40px;
    text-decoration: none;
    line-height: 1;
}

.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 48px;
    text-decoration: none;
    padding: 10px 20px;
    line-height: 1;
    user-select: none;
}

.lightbox .nav.prev { left: 12px; }
.lightbox .nav.next { right: 12px; }

/* Booking band -------------------------------------------------- */

.subpage-book {
    background: #f5efe5;
    border-top: 1px solid #ece4d4;
    border-bottom: 1px solid #ece4d4;
}

.subpage-book .beddy-wrap {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

/*
 * The Beddy web component switches between a horizontal bar and a vertical
 * card depending on its own rendered width. As a custom element it defaults
 * to `display: inline` with no width, so it collapses to the narrow card
 * layout. Forcing it to be a block-level element with a generous max-width
 * triggers the horizontal layout on tablet+ screens, while still letting it
 * fall back to vertical on phones.
 */
.subpage-book beddy-bar {
    display: block;
    width: 100%;
    max-width: 960px;
}

/* Prev / next room navigation (room detail) --------------------- */

.room-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 900px;
    margin: 0 auto;
}

.room-nav a {
    display: flex;
    flex-direction: column;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e5e0d4;
    border-radius: 4px;
    color: #2a2520;
    text-decoration: none;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.room-nav a:hover {
    border-color: #00ACC1;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.room-nav .room-nav-label {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #00ACC1;
    margin-bottom: 4px;
}

.room-nav .room-nav-title {
    font-size: 20px;
    font-weight: 400;
    color: #1f1a14;
}

.room-nav .room-nav-next { text-align: right; }

@media (max-width: 560px) {
    .room-nav { grid-template-columns: 1fr; }
}

/* Footer -------------------------------------------------------- */

.subpage-footer {
    background: #2a2a2a;
    color: #b9b9b9;
    padding: 50px 26px 24px;
}

.subpage-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.subpage-footer h4 {
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.subpage-footer p { margin: 0 0 8px; line-height: 1.55; }

.subpage-footer a {
    color: #d9d9d9;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.subpage-footer a:hover { color: #fff; border-color: #00ACC1; }

.subpage-footer-bottom {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12px;
    text-align: center;
    color: #888;
}

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

@media (max-width: 600px) {
    .subpage-section { padding: 50px 18px; }
    .subpage-section-title h2 { font-size: 24px; }
    .subpage-hero-inner { padding: 90px 22px 70px !important; }
    .subpage-hero h1 { font-size: 32px; }
    .subpage-hero-lead { font-size: 15px; }
}
