/*
Theme Name: Guest House Sara
Theme URI: https://saralatin.com
Author: SaraLatin
Description: Block theme for Guest House Sara Latin: countryside guest house and restaurant near Ogulin, Croatia. Stay · Eat · Explore.
Version: 0.2.1
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guesthouse-sara
*/

/* ---------- Typography helpers ---------- */

/* Italic words in headings become the serif accent: "Stay, eat <em>& slow down.</em>" */
:where(h1, h2, h3, .wp-block-post-title) em {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--forest);
}
.has-forest-background-color :where(h1, h2, h3) em,
.is-dark :where(h1, h2, h3) em {
	color: var(--wp--preset--color--cream);
}

.sara-eyebrow {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.has-forest-background-color .sara-eyebrow,
.is-dark .sara-eyebrow { color: var(--wp--preset--color--forest-light); }
.wp-block-cover .sara-eyebrow { color: rgba(255, 255, 255, 0.9); }

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

.sara-header {
	position: sticky;
	top: 0;
	z-index: 50;
	/* Solid background, no backdrop-filter: that would trap the fixed mobile menu panel inside the header. */
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .sara-header { top: var(--wp-admin--admin-bar--height, 32px); }

.sara-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 1.1875rem;
	letter-spacing: -0.02em;
	text-decoration: none;
	white-space: nowrap;
}
.sara-logo a { text-decoration: none; }
.sara-logo .sara-logo__mark {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--wp--preset--color--forest);
	color: #fff;
	font: italic 400 18px/1 var(--wp--preset--font-family--serif);
}
.sara-logo .sara-logo__place { color: var(--wp--preset--color--muted); font-weight: 400; }

.sara-lang {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
	display: flex;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
	text-transform: uppercase;
}
.sara-lang a { text-decoration: none; }
.sara-lang .current-lang a { color: var(--wp--preset--color--contrast); }
.sara-lang li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }

/* ---------- Buttons from [sara_button] ---------- */

.sara-btn {
	display: inline-block;
	text-decoration: none !important;
	white-space: nowrap;
}
.sara-btn.is-outline { background: transparent; color: var(--wp--preset--color--contrast); box-shadow: inset 0 0 0 1.5px currentColor; }
.sara-btn.is-white { background: var(--wp--preset--color--white); color: var(--wp--preset--color--contrast); }
.sara-btn.is-outline:hover,
.sara-btn.is-white:hover { background: var(--wp--preset--color--contrast); color: #fff; }

/* ---------- Rounded "panel" sections (Come hungry, road stop, pool) ---------- */

.sara-panel {
	border-radius: var(--wp--custom--radius--large);
	overflow: hidden;
	margin-left: clamp(10px, 1.7vw, 24px) !important;
	margin-right: clamp(10px, 1.7vw, 24px) !important;
	max-width: none !important;
}
.sara-panel.wp-block-cover,
.sara-panel .wp-block-cover { border-radius: var(--wp--custom--radius--large); }

/* ---------- Cards ---------- */

.sara-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--medium);
	overflow: hidden;
	height: 100%;
}
.sara-card .wp-block-image,
.sara-card .wp-block-post-featured-image { margin: 0; }
.sara-card .wp-block-image img,
.sara-card .wp-block-post-featured-image img { border-radius: 0; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.sara-card__body { padding: 1.5rem 1.75rem 1.75rem; }
.sara-card h3 a { text-decoration: none; }

.sara-tag {
	display: inline-block;
	font-size: 0.75rem !important;
	font-weight: 700;
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--forest);
	padding: 0.35rem 0.75rem;
	border-radius: var(--wp--custom--radius--pill);
}

/* Explore tiles: image card with text on top */
.sara-tile.wp-block-cover {
	border-radius: var(--wp--custom--radius--medium);
	aspect-ratio: 3 / 4;
	min-height: 0 !important;
	align-items: flex-end;
}
.sara-tile h3 { margin: 0; }

/* ---------- Chips strip ---------- */

.sara-chips { border-bottom: 1px solid var(--wp--preset--color--line); }
.sara-chips .sara-chip {
	margin: 0;
	padding: 0.6rem 1.1rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--stone);
	font-size: 0.875rem;
	font-weight: 500;
}

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

.sara-hero { gap: 0 !important; }
.sara-hero > .wp-block-column:last-child .wp-block-image,
.sara-hero > .wp-block-column:last-child .wp-block-image img {
	height: 100%;
	min-height: 520px;
	object-fit: cover;
	border-radius: 0 0 0 var(--wp--custom--radius--large);
	margin: 0;
}
.sara-hero__text { max-width: 600px; margin-left: auto; }
/* Long German words ("Übernachten,") must fit the narrow hero column. */
.sara-hero__text h1 { font-size: clamp(2.75rem, 5.2vw, 5.75rem); hyphens: auto; }
.sara-facts { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.5rem; }
.sara-facts .sara-fact-number {
	font-size: 2.125rem;
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin: 0;
}
.sara-facts .sara-fact-label { font-size: 0.8125rem; color: var(--wp--preset--color--muted); margin: 0; }

/* ---------- Meals + timeline ---------- */

.sara-meal {
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	padding: 1.1rem 1.25rem;
}
.sara-meal p { margin: 0; }
.sara-notice {
	background: rgba(255, 255, 255, 0.08);
	border-radius: var(--wp--custom--radius--small);
	padding: 0.9rem 1.1rem !important;
	font-size: 0.875rem;
}
.sara-timeline-row { gap: 1.4rem !important; align-items: baseline !important; }
.sara-timeline-row p:first-child {
	font: italic 400 1.875rem/1 var(--wp--preset--font-family--serif);
	color: var(--wp--preset--color--cream);
	min-width: 80px;
	margin: 0;
}
.sara-timeline-row p { margin: 0; }

/* ---------- Images inside panels / grids ---------- */

.sara-fill .wp-block-image,
.sara-fill .wp-block-image img { height: 100%; width: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.sara-fill { min-height: 280px; }
.sara-img-round img { border-radius: 18px; object-fit: cover; width: 100%; height: 100%; }

/* ---------- Reviews ---------- */

.sara-score { font-size: clamp(5rem, 10vw, 8.75rem); font-weight: 300; letter-spacing: -0.05em; line-height: 1; margin: 0; }

/* ---------- Journal (query loop) ---------- */

.sara-journal .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.sara-journal .wp-block-post-title a { text-decoration: none; }

/* ---------- Contact list ---------- */

.sara-contacts p {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	background: var(--wp--preset--color--white);
	border-radius: 16px;
	padding: 1.1rem 1.4rem;
	font-weight: 600;
	margin: 0;
}
.sara-contacts p span { color: var(--wp--preset--color--muted); font-weight: 500; }
.sara-contacts a { text-decoration: none; }

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

.sara-footer-brand { font-size: clamp(3.25rem, 8vw, 6.875rem) !important; letter-spacing: -0.05em; line-height: 1; margin: 0; }
.sara-footer ul { list-style: none; padding: 0; margin: 0; }
.sara-footer li { margin-bottom: 0.35rem; }
.sara-footer a { text-decoration: none; }

/* ---------- Mobile bottom bar ---------- */

.sara-mobile-bar { display: none !important; }

@media (max-width: 781px) {
	.sara-mobile-bar {
		display: flex !important;
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: 12px;
		z-index: 60;
		gap: 8px !important;
	}
	.sara-mobile-bar .wp-block-button { flex: 1; }
	.sara-mobile-bar .wp-block-button__link { width: 100%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
	body { padding-bottom: 84px; }

	.sara-hide-mobile { display: none !important; }
	.sara-hero > .wp-block-column:last-child { order: -1; }
	.sara-hero > .wp-block-column:last-child .wp-block-image img { min-height: 360px; border-radius: 0; }
	.sara-panel .wp-block-columns > .sara-fill { order: -1; }
}
@media (min-width: 782px) {
	.sara-hide-desktop { display: none !important; }
}

/* ---------- Inquiry form ---------- */

.sara-form {
	background: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--medium);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}
.sara-form__tabs {
	display: inline-flex;
	background: var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius--pill);
	padding: 4px;
	margin-bottom: 1.5rem;
}
.sara-form__tabs button {
	border: 0;
	background: none;
	cursor: pointer;
	padding: 0.6rem 1.25rem;
	border-radius: var(--wp--custom--radius--pill);
	font: 600 0.875rem var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--muted);
}
.sara-form__tabs button[aria-selected="true"] { background: var(--wp--preset--color--forest); color: #fff; }
.sara-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sara-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sara-form__grid .is-full { grid-column: 1 / -1; }
.sara-field {
	display: block;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--small);
	padding: 0.65rem 1rem;
}
.sara-field:focus-within { border-color: var(--wp--preset--color--forest); }
.sara-field > span {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.sara-field input,
.sara-field select,
.sara-field textarea {
	width: 100%;
	border: 0;
	padding: 0.2rem 0 0;
	background: transparent;
	font: 400 0.9375rem var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--contrast);
	outline: none;
}
.sara-field input[type="checkbox"] { width: auto; padding: 0; }
.sara-field textarea { min-height: 70px; resize: vertical; }
.sara-checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding-top: 0.3rem; font-size: 0.9375rem; }
.sara-checks label { display: inline-flex; gap: 0.4rem; align-items: center; }
.sara-consent { font-size: 0.8125rem; color: var(--wp--preset--color--muted); display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 1rem; }
.sara-form__actions { display: flex; gap: 10px; margin-top: 1.25rem; }
.sara-form__actions button {
	flex: 1;
	border: 0;
	cursor: pointer;
	padding: 1rem 1.5rem;
	border-radius: var(--wp--custom--radius--pill);
	font: 600 0.9375rem var(--wp--preset--font-family--body);
	background: var(--wp--preset--color--forest);
	color: #fff;
}
.sara-form__actions button.is-whatsapp { background: #25D366; color: #073B1F; }
.sara-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sara-form__notice { border-radius: var(--wp--custom--radius--small); padding: 1rem 1.25rem; margin-bottom: 1.25rem; font-weight: 500; }
.sara-form__notice.is-success { background: var(--wp--preset--color--sage); color: var(--wp--preset--color--forest); }
.sara-form__notice.is-error { background: #F6E1DC; color: #7A2A1A; }
.sara-form [hidden] { display: none !important; }

@media (max-width: 600px) {
	.sara-form__grid { grid-template-columns: 1fr; }
	.sara-form__actions { flex-direction: column; }
}

/* ---------- Main menu (classic menu, Polylang friendly) ---------- */

.sara-menu { display: flex; gap: 1.9rem; list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; font-weight: 500; }
.sara-menu a { text-decoration: none; }
.sara-menu .current-menu-item > a { color: var(--wp--preset--color--forest); text-decoration: underline; text-underline-offset: 6px; }
.sara-menu-toggle { display: none; }
.sara-footer .sara-menu { flex-direction: column; gap: 0.35rem; }
.sara-menu--legal { flex-direction: row !important; gap: 1rem !important; font-size: 0.8125rem; }

@media (max-width: 1200px) {
	.sara-menu-toggle {
		display: inline-grid;
		place-items: center;
		width: 44px;
		height: 44px;
		border: 0;
		background: none;
		cursor: pointer;
	}
	.sara-menu-toggle span[aria-hidden],
	.sara-menu-toggle span[aria-hidden]::before,
	.sara-menu-toggle span[aria-hidden]::after {
		display: block;
		width: 22px;
		height: 2px;
		background: var(--wp--preset--color--contrast);
		position: relative;
		transition: transform 0.2s;
	}
	.sara-menu-toggle span[aria-hidden]::before,
	.sara-menu-toggle span[aria-hidden]::after { content: ""; position: absolute; left: 0; }
	.sara-menu-toggle span[aria-hidden]::before { top: -7px; }
	.sara-menu-toggle span[aria-hidden]::after { top: 7px; }
	.sara-menu-open .sara-menu-toggle span[aria-hidden] { background: transparent; }
	.sara-menu-open .sara-menu-toggle span[aria-hidden]::before { transform: translateY(7px) rotate(45deg); }
	.sara-menu-open .sara-menu-toggle span[aria-hidden]::after { transform: translateY(-7px) rotate(-45deg); }

	.sara-nav {
		display: none;
		position: fixed;
		inset: 64px 0 0 0;
		background: var(--wp--preset--color--base);
		padding: 2rem 1.5rem;
		z-index: 70;
		overflow-y: auto;
	}
	.admin-bar .sara-nav { top: calc(64px + var(--wp-admin--admin-bar--height, 46px)); }
	.sara-menu-open .sara-nav { display: block; }
	.sara-menu-open { overflow: hidden; }
	.sara-nav .sara-menu { flex-direction: column; gap: 0; font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; }
	.sara-nav .sara-menu li { border-bottom: 1px solid var(--wp--preset--color--line); }
	.sara-nav .sara-menu a { display: block; padding: 0.9rem 0; }
	.sara-header .sara-header__cta { display: none !important; }
}

/* ---------- Unit facts ---------- */

.sara-facts-list { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.5rem; margin: 0 0 1.5rem; }
.sara-facts-list dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--muted); align-self: center; }
.sara-facts-list dd { margin: 0; font-weight: 600; }
.sara-units .sara-card .wp-block-post-featured-image { margin: 0; }
.sara-units .sara-card .wp-block-post-featured-image img { border-radius: 0; }

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

.sara-header__row > p { margin: 0; }
.sara-header .sara-nav { margin-left: auto; }

/* ---------- Mobile refinements ---------- */

@media (max-width: 781px) {
	.sara-explore { flex-wrap: wrap !important; }
	.sara-explore > .wp-block-column { flex-basis: calc(50% - 0.5rem) !important; flex-grow: 0 !important; }
	.sara-header .sara-menu-toggle { order: 99; }
	.sara-header .sara-lang { margin-left: auto; }
	.sara-header__row { gap: 0.75rem !important; }
	.sara-facts .sara-fact-number { font-size: 1.625rem; }
	.sara-journal .wp-block-post-template { grid-template-columns: 1fr !important; }
}
@media (max-width: 1200px) {
	.sara-header .sara-lang { margin-left: auto; }
}

.sara-tag a,
.sara-eyebrow a { text-decoration: none; }

/* ---------- Accessibility ---------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------- Small phones: logo + languages + menu button on one row ---------- */

@media (max-width: 480px) {
	.sara-logo .sara-logo__place { display: none; }
	.sara-logo { font-size: 1.0625rem; }
	.sara-header .sara-lang { font-size: 0.75rem; gap: 0.3rem; }
	.sara-header .sara-lang li + li::before { margin-right: 0.3rem; }
	.sara-header__row { gap: 0.5rem !important; }
	.sara-menu-toggle { width: 40px; margin-right: -8px; }
}

/* Laptops: full menu, languages and button must share one row (German labels are long). */
@media (min-width: 1201px) and (max-width: 1440px) {
	.sara-menu { gap: 1.2rem; font-size: 0.875rem; }
	.sara-header__row { gap: 1.25rem !important; }
	.sara-logo .sara-logo__place { display: none; }
}

/* ---------- Article text (Journal posts) ---------- */

.single-post .wp-block-post-content h2 {
	font-size: clamp(1.625rem, 2.6vw, 2.125rem);
	letter-spacing: -0.02em;
	margin-top: 2.75rem;
}
.single-post .wp-block-post-content h3 {
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	margin-top: 2rem;
}
.single-post .wp-block-post-content :where(p, li) {
	font-size: 1.0625rem;
	line-height: 1.75;
}
.single-post .wp-block-post-content li + li { margin-top: 0.35rem; }

/* ---------- Language switcher on small phones: inside the menu panel ---------- */

.sara-nav__lang { display: none; }
@media (max-width: 600px) {
	.sara-header .sara-header__row > .sara-lang { display: none; }
	.sara-nav__lang { display: block; margin-top: 1.5rem; }
	.sara-nav__lang .sara-lang { font-size: 1rem; gap: 0.75rem; }
	.sara-nav__lang .sara-lang li + li::before { margin-right: 0.75rem; }
}

/* Menu button always at the far right whenever the menu is collapsed (phones and tablets). */
@media (max-width: 1200px) {
	.sara-header .sara-menu-toggle { order: 99; }
}
