/* Hostelp theme. Look inspired by the Sailing hotel theme: photo hero with
   availability bar, transparent header that turns solid on scroll, amber
   and teal accents, Roboto + Roboto Slab. */

:root {
	--hp-primary: #ffb606;
	--hp-accent: #2eb0d1;
	--hp-accent-ink: #177088; /* accent dark enough for text on white */
	--hp-primary-ink: #9a6b00; /* primary dark enough for text on white */
	--hp-text: #2a2a2a;
	--hp-muted: #6b6f73;
	--hp-border: #e3e6e8;
	--hp-soft: #f4f6f7;
	--hp-dark: #1d2023;
	--hp-heading-font: "Roboto Slab", Georgia, serif;
	--body-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--container: 1200px;
	--header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #fff;
	color: var(--hp-text);
	font: 400 17px/1.65 var(--body-font);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--hp-accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #1f8aa5; }
h1, h2, h3, h4 { font-family: var(--hp-heading-font); font-weight: 700; line-height: 1.25; color: var(--hp-text); margin: 1.4em 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
:focus-visible { outline: 2px solid var(--hp-accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 900px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; padding: 10px 16px; background: #fff; color: var(--hp-text); }
.skip-link:focus { left: 8px; }
.site-main:focus { outline: 0; }
.icon { fill: currentColor; vertical-align: -3px; flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 0 var(--hp-border); transition: background 0.25s, box-shadow 0.25s; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.topbar { font-size: 0.85rem; border-bottom: 1px solid var(--hp-border); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar__contact, .topbar__right { display: flex; align-items: center; gap: 18px; margin: 0; padding: 0; list-style: none; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--hp-primary); }

.lang-switcher { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lang-switcher a { padding: 2px 8px; border-radius: 4px; font-weight: 600; letter-spacing: 0.04em; }
.lang-switcher a.is-current { background: var(--hp-primary); color: #1b1b1b; }
.lang-switcher--mobile { display: none; }

.social-links { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social-links li, .social-links a { display: flex; align-items: center; justify-content: center; }
.social-links .icon { display: block; }

.mainbar__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { margin-right: auto; }
.brand__name { font-family: var(--hp-heading-font); font-size: 1.6rem; font-weight: 700; color: var(--hp-text); text-decoration: none; }
.brand .custom-logo { max-height: 56px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav .menu { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a { display: block; padding: 10px 12px; color: var(--hp-text); text-decoration: none; font-size: 0.88rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.site-nav .menu a:hover, .site-nav .menu .current-menu-item > a, .site-nav .menu .current_page_item > a { color: var(--hp-accent); }
.site-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 200px; margin: 0; padding: 8px 0; list-style: none; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); border-radius: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: 0.15s; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { text-transform: none; letter-spacing: 0; color: var(--hp-text) !important; }
.nav-toggle { display: none; padding: 8px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }

/* Transparent header over the hero */
.has-hero .site-header { position: fixed; left: 0; right: 0; background: transparent; box-shadow: none; color: #fff; }
.has-hero .site-header .topbar { border-bottom-color: rgba(255, 255, 255, 0.2); }
.has-hero .site-header .brand__name, .has-hero .site-header .site-nav .menu > li > a { color: #fff; }
.has-hero .site-header .site-nav .menu > li > a:hover { color: var(--hp-primary); }
.has-hero .site-header.is-solid { background: #fff; color: var(--hp-text); box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08); }
.has-hero .site-header.is-solid .topbar { display: none; }
.has-hero .site-header.is-solid .brand__name, .has-hero .site-header.is-solid .site-nav .menu > li > a { color: var(--hp-text); }
.has-hero .site-header.is-solid .site-nav .menu > li > a:hover { color: var(--hp-accent); }
/* The top bar (with BG/EN) hides once the header turns solid, so show the switcher in the main bar instead. */
.has-hero .site-header.is-solid .lang-switcher--mobile { display: flex; }
.site-nav .lang-switcher a { color: inherit; text-decoration: none; font-size: 0.85rem; }

@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { position: fixed; inset: 0 0 0 auto; z-index: 200; width: min(340px, 86vw); flex-direction: column; align-items: stretch; gap: 16px; padding: 80px 24px 24px; background: #fff; color: var(--hp-text); box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2); transform: translateX(100%); visibility: hidden; transition: transform 0.25s, visibility 0.25s; overflow-y: auto; }
	.site-nav.is-open { transform: none; visibility: visible; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu a, .has-hero .site-header .site-nav .menu > li > a { color: var(--hp-text); font-size: 1rem; padding: 12px 0; border-bottom: 1px solid var(--hp-border); }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 16px; }
	.lang-switcher--mobile { display: flex; }
	.lang-switcher--mobile a { color: var(--hp-text); text-decoration: none; padding: 6px 12px; border: 1px solid var(--hp-border); }
	.topbar .lang-switcher { display: none; }
	/* The header is its own stacking layer (z-index 100), so lift it above the backdrop while the menu is open. */
	.nav-open .site-header { z-index: 300; }
	.nav-open .site-nav-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, 0.4); }
	.nav-toggle[aria-expanded="true"] { position: relative; z-index: 300; color: var(--hp-text); }
}
@media (max-width: 600px) {
	.hide-sm { display: none !important; }
	.topbar .social-links { display: none; }
	:root { --header-h: 68px; }
	.brand__name { font-size: 1.3rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 62vh; padding: calc(var(--header-h) + 80px) 0 60px; color: #fff; background: linear-gradient(135deg, #1f4e5a, #2eb0d1); overflow: hidden; isolation: isolate; }
.hero--home { min-height: 100vh; min-height: 100svh; padding-bottom: 40px; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: #000; }
.hero__inner { text-align: center; }
.hero__kicker { display: inline-block; margin: 0 0 12px; padding: 4px 14px; border-radius: 999px; background: var(--hp-primary); color: #1b1b1b; font-size: 0.85rem; font-weight: 600; }
.hero__title { margin: 0; color: #fff; font-size: clamp(2.2rem, 6vw, 4.2rem); text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); }
.hero__subtitle { max-width: 680px; margin: 14px auto 0; font-size: clamp(1.05rem, 2vw, 1.35rem); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero__after { margin-top: auto; padding-top: 40px; }
.hero--home .hero__inner { margin-top: auto; }
.hp-btn--outline-light { background: transparent; border-color: #fff; color: #fff; }
.hp-btn--outline-light:hover, .hp-btn--outline-light:focus-visible { background: #fff; border-color: #fff; color: var(--hp-text); }
.hero .hp-search-bar { color: var(--hp-text); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--hp-soft); }
.section--intro { padding-bottom: 24px; }
.section--rooms + .section--intro { padding-top: 0; padding-bottom: 72px; }
.section__head { text-align: center; margin-bottom: 36px; }
.section__kicker { margin: 0; color: var(--hp-primary-ink); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; }
.section__title { margin: 6px 0 28px; }
.section__head .section__title { margin-bottom: 0; }
.section__more { text-align: center; margin: 28px 0 0; }
.section__more a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }

.page-header { padding: 56px 0 8px; }
.page-title { margin: 0; }
.page-lead { color: var(--hp-muted); font-size: 1.1rem; max-width: 700px; }
.page-header + .section { padding-top: 32px; }

.cta-band { background: var(--hp-dark); color: #fff; padding: 56px 0; }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band__title { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.8); }

/* ---------- Content ---------- */
.entry-content > *:first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2em; }
.entry-content .alignwide { max-width: calc(var(--container) - 48px); }
.entry-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.entry-content .wp-block-button__link { border-radius: 999px; background: var(--hp-primary); color: #1b1b1b; font-weight: 600; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border-bottom: 1px solid var(--hp-border); text-align: left; }
.entry-meta { color: var(--hp-muted); font-size: 0.9rem; margin: 0 0 8px; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { border-radius: 10px; }

/* Gallery block: tidy grid + lightbox cursor */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 8px; }
.wp-block-gallery figure.wp-block-image, .room-gallery__item { cursor: zoom-in; }
.wp-block-gallery figure.wp-block-image img { transition: transform 0.3s, filter 0.3s; }
.wp-block-gallery figure.wp-block-image:hover img { filter: brightness(1.06); }

/* Posts grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.post-card { border: 1px solid var(--hp-border); border-radius: 10px; overflow: hidden; }
.post-card__media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { padding: 18px 20px; }
.post-card__title { margin: 0 0 8px; font-size: 1.25rem; }
.post-card__title a { color: inherit; text-decoration: none; }

/* ---------- Single room ---------- */
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.room-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 32px; }
.room-gallery__item { display: block; overflow: hidden; border-radius: 8px; aspect-ratio: 1; }
.room-gallery__item--lead { grid-column: span 4; aspect-ratio: 16 / 9; }
.room-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
.room-gallery__item:hover img { transform: scale(1.04); }
.room-subtitle { font-size: 1.4rem; }
.amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; padding: 0; list-style: none; }
.amenities li { display: flex; gap: 8px; align-items: flex-start; }
.amenities .icon { color: var(--hp-accent); margin-top: 4px; }
.room-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.book-card { padding: 26px; border: 1px solid var(--hp-border); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); background: #fff; }
.book-card__price { margin: 0 0 14px; }
.book-card__amount { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.book-card__unit { color: var(--hp-muted); font-size: 0.9rem; }
.book-card__facts { margin: 0 0 20px; padding: 0; list-style: none; font-size: 0.95rem; }
.book-card__facts li { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--hp-border); }
.book-card__facts .hp-icon { color: var(--hp-accent); }
.book-card__btn { width: 100%; }
@media (max-width: 960px) {
	.room-layout { grid-template-columns: 1fr; }
	.room-aside { position: static; order: -1; }
	.room-gallery { grid-template-columns: repeat(3, 1fr); }
	.room-gallery__item--lead { grid-column: span 3; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--hp-dark); color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }
.cta-band + .site-footer, main + .site-footer { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--hp-primary); }
.site-footer a.hp-btn, .site-footer a.hp-btn:hover { color: #1b1b1b; }
.footer-brand { font-family: var(--hp-heading-font); font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-title { color: #fff; font-size: 1.05rem; margin: 0 0 16px; }
.footer-contact, .footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 10px; }
.footer-contact .icon { color: var(--hp-primary); margin-top: 3px; }
.footer-menu li { margin-bottom: 8px; }
.site-footer .social-links { margin-top: 16px; }
.site-footer .social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 18px 0; font-size: 0.85rem; }
.site-footer__bottom p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(10, 12, 14, 0.94); }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5); }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
body.lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Footer widgets (block widgets use h2 headings) */
.footer-widget { margin-bottom: 24px; }
.footer-widget h2, .footer-widget h3, .footer-widget .wp-block-heading { color: #fff; font-size: 1.05rem; margin: 0 0 16px; }
.footer-widget ul { margin: 0; padding: 0; list-style: none; }
.footer-widget li { margin-bottom: 8px; }

.admin-hint { padding: 14px 18px; border-left: 4px solid var(--hp-primary); background: #fff8e1; border-radius: 6px; }
