/* ==========================================================================
   Riadway — main stylesheet
   Vanilla CSS, no build step. Organised top to bottom in the order sections
   appear on the homepage. Mobile-first; breakpoints at 640 / 960 / 1200.
   ========================================================================== */

:root {
    /* Palette — inspired by Marrakech: clay, zellige, warm sand, dusk. */
    --color-ink: #241d19;
    --color-ink-soft: #4a3f38;
    --color-cream: #faf5ee;
    --color-cream-deep: #f1e7d8;
    --color-sand: #e7d8c2;
    --color-terracotta: #b85c38;
    --color-terracotta-dark: #94472a;
    --color-terracotta-light: #f0dccd;
    --color-zellige: #2f6b64;
    --color-zellige-dark: #204b46;
    --color-gold: #c08a2e;
    --color-white: #ffffff;
    --color-border: #e4d8c6;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-card: 0 12px 28px -16px rgba(36, 29, 25, 0.35);
    --shadow-header: 0 4px 18px -8px rgba(36, 29, 25, 0.18);

    --container-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-cream);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--color-ink);
    line-height: 1.15;
    margin: 0 0 0.5em;
}

p {
    margin: 0 0 1em;
}

a {
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    background: var(--color-ink);
    color: var(--color-white);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 3px solid var(--color-zellige);
    outline-offset: 2px;
}

/* ---- Buttons -------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: var(--color-terracotta);
    color: var(--color-white);
}

.btn--primary:hover {
    background: var(--color-terracotta-dark);
}

.btn--ghost {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-border);
}

.btn--ghost:hover {
    background: var(--color-cream-deep);
}

.btn--outline {
    background: transparent;
    color: var(--color-terracotta-dark);
    border-color: var(--color-terracotta);
}

.btn--outline:hover {
    background: var(--color-terracotta);
    color: var(--color-white);
}

.btn--large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

/* ---- Header ----------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

/* Correction menu mobile (audit bloc1318_files/bloc_13_18_mobile_menu_audit.md) :
   le background/backdrop-filter vit desormais sur ce pseudo-element plutot que
   directement sur .site-header. Raison : backdrop-filter pose sur un element
   cree, pour cet element, un nouveau containing block pour ses descendants en
   position: fixed -- or .main-nav (descendant de .site-header) devient
   position: fixed sous 960px (voir plus bas), ce qui confinait le panneau
   mobile ouvert a la hauteur du header (~57-68px) au lieu de la hauteur du
   viewport. En deplacant backdrop-filter sur ::before (qui n'est pas un
   ancetre de .main-nav, seulement un frere genere a l'interieur de
   .site-header), .site-header lui-meme ne porte plus la propriete et cesse de
   creer ce containing block parasite -- .main-nav redevient positionne par
   rapport au vrai viewport. Rendu visuel du header inchange : .site-header
   garde position: sticky (deja un element positionne, donc containing block
   valide pour ce ::before en position: absolute; inset: 0), meme z-index
   local (100) place ce pseudo-element derriere le contenu du header
   (.brand/.main-nav/.nav-toggle, qui n'ont pas de z-index propre et restent
   donc au-dessus dans le meme contexte d'empilement). Valeurs de background/
   backdrop-filter strictement identiques a l'ancienne regle, aucune nouvelle
   couleur. */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(250, 245, 238, 0.92);
    backdrop-filter: saturate(140%) blur(8px);
}

.site-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-ink);
    flex-shrink: 0;
}

.brand__mark {
    color: var(--color-terracotta);
    display: inline-flex;
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    flex: 1;
}

.main-nav__list {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.main-nav__list a,
.nav-soon {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.96rem;
    color: var(--color-ink-soft);
}

.main-nav__list a:hover {
    color: var(--color-terracotta-dark);
}

.nav-soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9c9186;
    cursor: default;
}

.nav-soon small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--color-cream-deep);
    border-radius: 999px;
    padding: 2px 7px;
}

.main-nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-select select,
.currency-select select {
    appearance: none;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 30px 8px 14px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--color-ink);
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--color-ink-soft) 50%), linear-gradient(135deg, var(--color-ink-soft) 50%, transparent 50%);
    background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.lang-select noscript button {
    margin-left: 6px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 42px;
    height: 38px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--color-ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bar {
    top: 50%;
    transform: translateY(-50%);
}

.nav-toggle__bar::before {
    top: -7px;
}

.nav-toggle__bar::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 960px) {
    .main-nav {
        position: fixed;
        inset: 68px 0 0 0;
        background: var(--color-cream);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 24px 20px 32px;
        gap: 24px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        border-top: 1px solid var(--color-border);
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav__list {
        flex-direction: column;
        gap: 16px;
    }

    .main-nav__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav__actions .btn {
        width: 100%;
    }

    .nav-toggle {
        display: block;
    }
}

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

.hero {
    position: relative;
    padding-block: 96px 72px;
    overflow: hidden;
    color: var(--color-white);
}

.hero__backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 140% at 15% 0%, rgba(192, 138, 46, 0.35), transparent 55%),
        linear-gradient(160deg, #7c3f24 0%, #94472a 32%, #b85c38 62%, #c9764f 100%);
}

.hero__backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,.5) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.5) 75%),
        linear-gradient(45deg, rgba(255,255,255,.5) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.5) 75%);
    background-size: 46px 46px;
    background-position: 0 0, 23px 23px;
}

.hero__content {
    max-width: 760px;
}

.hero__title {
    color: var(--color-white);
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    max-width: 14ch;
}

.hero__subtitle {
    font-size: 1.1rem;
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.92);
}

.hero__note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 10px;
    margin-bottom: 0;
}

.search-widget {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: var(--color-white);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-top: 32px;
}

.search-widget__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.search-widget__field label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-ink-soft);
}

.search-widget__field input,
.search-widget__field select {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-ink);
    background: var(--color-white);
}

.search-widget__submit {
    align-self: end;
}

@media (max-width: 960px) {
    .search-widget {
        grid-template-columns: 1fr 1fr;
    }

    .search-widget__submit {
        grid-column: 1 / -1;
    }
}

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

    .hero {
        padding-block: 72px 56px;
    }
}

/* ---- Sections ------------------------------------------------------------ */

.section {
    padding-block: 72px;
}

.section--tinted {
    background: var(--color-cream-deep);
}

.section__header {
    max-width: 640px;
    margin-bottom: 40px;
}

.section__header h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.section__header p {
    color: var(--color-ink-soft);
    margin-bottom: 0;
}

/* ---- Riad cards ------------------------------------------------------ */

.riad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.riad-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease;
}

.riad-card:hover {
    transform: translateY(-4px);
}

.riad-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--color-sand);
}

.riad-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.riad-card__badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(36, 29, 25, 0.82);
    color: var(--color-white);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
}

.riad-card__body {
    padding: 18px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.riad-card__area {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    color: var(--color-zellige-dark);
    font-weight: 700;
    margin: 0;
}

.riad-card__name {
    font-size: 1.15rem;
    margin: 2px 0 4px;
}

.riad-card__meta {
    font-size: 0.85rem;
    color: var(--color-ink-soft);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.riad-card__rating {
    color: var(--color-gold);
    font-weight: 700;
}

.riad-card__reviews {
    color: var(--color-ink-soft);
    font-weight: 400;
}

.riad-card__cta {
    margin-top: auto;
    align-self: flex-start;
}

@media (max-width: 1200px) {
    .riad-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---- Area cards -------------------------------------------------------- */

.area-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.area-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.area-card__image {
    aspect-ratio: 16 / 10;
    background: var(--color-sand);
}

.area-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.area-card__body {
    padding: 18px 20px 22px;
}

.area-card__body h3 {
    font-size: 1.1rem;
}

.area-card__body p {
    color: var(--color-ink-soft);
    font-size: 0.92rem;
}

.area-card__link {
    text-decoration: none;
    font-weight: 600;
    color: var(--color-terracotta-dark);
}

@media (max-width: 960px) {
    .area-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---- Why Riadway -------------------------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 28px;
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-terracotta-light);
    color: var(--color-terracotta-dark);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 1.05rem;
}

.feature p {
    color: var(--color-ink-soft);
    font-size: 0.92rem;
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---- Owner CTA ------------------------------------------------------- */

.owner-cta {
    background: linear-gradient(155deg, var(--color-zellige-dark), var(--color-zellige));
    color: var(--color-white);
    padding-block: 72px;
}

.owner-cta__inner {
    max-width: 680px;
}

.owner-cta h2 {
    color: var(--color-white);
}

.owner-cta p {
    color: rgba(255, 255, 255, 0.88);
}

.owner-cta__list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: grid;
    gap: 10px;
}

.owner-cta__list li {
    padding-left: 26px;
    position: relative;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}

.owner-cta__list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-gold);
    font-weight: 700;
}

.owner-cta .btn--primary {
    background: var(--color-gold);
}

.owner-cta .btn--primary:hover {
    background: #a8761f;
}

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

.site-footer {
    background: var(--color-ink);
    color: rgba(250, 245, 238, 0.82);
    padding-block: 56px 28px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 32px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-white);
    margin-bottom: 6px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(250, 245, 238, 0.65);
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-white);
    margin-bottom: 14px;
}

.footer-heading--spaced {
    margin-top: 22px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    color: rgba(250, 245, 238, 0.78);
    font-size: 0.92rem;
}

.footer-links a:hover,
.footer-links a.is-active {
    color: var(--color-white);
}

.footer-links--inline {
    display: flex;
    gap: 14px;
    font-size: 0.85rem;
    color: rgba(250, 245, 238, 0.6);
}

.site-footer__bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(250, 245, 238, 0.14);
    font-size: 0.82rem;
    color: rgba(250, 245, 238, 0.5);
}

@media (max-width: 960px) {
    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---- Riad gallery (public Riad detail page only) ------------------------
   Dedicated classes -- deliberately does NOT touch .riad-grid /
   .riad-card__image above, which are shared by the rooms grid, the
   reviews grid, the homepage grid and the search grid. Reuses only
   existing design tokens (colors, radii, shadows, fonts). No thumbnail/
   variant system exists in this project (src/Service/ImageUploader.php
   stores a single original file per image), so these rules size the
   existing files with object-fit: cover rather than assuming pre-cropped
   assets.

   Layout (desktop) : large main image left + 2 stacked images right
   (.riad-gallery__top, up to 8 slots total), then a 5-cell strip below
   (.riad-gallery__strip); the strip's last cell shows a dark "+N photos"
   overlay once more than 8 images exist. Layout (mobile, <=960px) :
   .riad-gallery itself becomes a flat 2-column grid
   (.riad-gallery__top/__side/__strip switch to display: contents so
   their buttons become direct grid items, in DOM order); the 4th and 5th
   strip cells are hidden so only 6 cells remain visible, and the 3rd
   strip cell (now the last visible one) shows its own "+N photos"
   overlay, computed separately for a 6-cell cutoff. Partial counts
   (fewer than 2 side images or fewer than 5 strip images) are handled by
   --side-N / --strip-N modifiers sized to the actual count, so no cell
   is ever left empty -- no placeholder image is ever invented. ========= */

.riad-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
}


    .riad-gallery__top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.riad-gallery__main {
    height: clamp(360px, 42vw, 560px);
}

.riad-gallery--side-0 .riad-gallery__top {
    grid-template-columns: 1fr;
}

.riad-gallery__side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.riad-gallery__side-thumb {
    aspect-ratio: 16 / 10;
}

.riad-gallery--side-1 .riad-gallery__side {
    grid-template-rows: 1fr;
}

.riad-gallery__strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
}


.riad-gallery--strip-1 .riad-gallery__strip {
    grid-template-columns: repeat(1, 1fr);
}

.riad-gallery--strip-2 .riad-gallery__strip {
    grid-template-columns: repeat(2, 1fr);
}

.riad-gallery--strip-3 .riad-gallery__strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.riad-gallery--strip-4 .riad-gallery__strip {
    grid-template-columns: repeat(4, 1fr);
}

.riad-gallery__main,
.riad-gallery__side-thumb,
.riad-gallery__strip-thumb {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: var(--color-sand);
    cursor: pointer;
    overflow: hidden;
}

.riad-gallery__main:disabled,
.riad-gallery__side-thumb:disabled,
.riad-gallery__strip-thumb:disabled {
    cursor: default;
    opacity: 1;
}

.riad-gallery__main img,
.riad-gallery__side-thumb img,
.riad-gallery__strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.riad-gallery__main:hover img,
.riad-gallery__side-thumb:hover img,
.riad-gallery__strip-thumb:hover img {
    transform: scale(1.04);
}

.riad-gallery__overlay {
    position: absolute;
    inset: 0;
    background: rgba(36, 29, 25, 0.6);
    color: var(--color-white);
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 4px;
}

.riad-gallery__overlay--desktop {
    display: flex;
}

.riad-gallery__overlay--mobile {
    display: none;
}

.riad-gallery__viewall {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--color-ink);
    background: var(--color-white);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.riad-gallery__viewall:hover {
    background: var(--color-ink);
    color: var(--color-white);
}

.riad-gallery__viewall:disabled {
    cursor: default;
    opacity: 1;
}

@media (max-width: 960px) {
    .riad-gallery {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .riad-gallery__top,
    .riad-gallery__side,
    .riad-gallery__strip {
        display: contents;
    }

    .riad-gallery__main,
    .riad-gallery__side-thumb,
    .riad-gallery__strip-thumb {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    /* Only 6 cells stay visible on mobile (main + 2 side + first 3 strip
       cells) -- the 4th/5th strip cells (desktop slots 7-8) are hidden so
       the 3rd strip cell becomes the last visible one. */
    .riad-gallery__strip-thumb:nth-child(4),
    .riad-gallery__strip-thumb:nth-child(5) {
        display: none;
    }

    .riad-gallery__overlay--desktop {
        display: none;
    }

    .riad-gallery__overlay--mobile {
        display: flex;
    }
}

/* ---- Riad lightbox (fullscreen photo viewer, Riad detail page) ---------- */

.riad-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.riad-lightbox[hidden] {
    display: none;
}

.riad-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 15, 12, 0.92);
}

.riad-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.riad-lightbox__stage img {
    display: block;
    max-width: min(1100px, 92vw);
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.riad-lightbox__close,
.riad-lightbox__prev,
.riad-lightbox__next {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(250, 245, 238, 0.14);
    color: var(--color-white);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.riad-lightbox__close:hover,
.riad-lightbox__prev:hover,
.riad-lightbox__next:hover {
    background: rgba(250, 245, 238, 0.28);
}

.riad-lightbox__close {
    top: 20px;
    right: 20px;
    z-index: 2;
}

.riad-lightbox__prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.riad-lightbox__next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.riad-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: var(--color-white);
    font-size: 0.85rem;
    background: rgba(36, 29, 25, 0.55);
    padding: 5px 14px;
    border-radius: 999px;
}

body.riad-lightbox-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .riad-lightbox__close,
    .riad-lightbox__prev,
    .riad-lightbox__next {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
    }

    .riad-lightbox__prev {
        left: 8px;
    }

    .riad-lightbox__next {
        right: 8px;
    }
}
