/* Apolafsi theme — content section styles. Header, footer, forms and events are styled by the Apolafsi Core plugin. */

:root {
	--apo-radius: 16px;
	--apo-radius-lg: 22px;
	--apo-shadow: 0 18px 40px rgba(19, 50, 74, 0.14);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.apo-main { margin-block-start: 0; }
.apo-main > .wp-block-post-content > * + *, .apo-main .wp-block-post-content > .alignfull { margin-block-start: 0; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }

/* Dark / coloured groups: headings follow the group's text colour */
.has-white-color :where(h1, h2, h3, h4, h5, h6),
.has-white-color .wp-block-post-title { color: inherit; }

/* Sections */
.apo-section { padding-block: var(--wp--preset--spacing--70); }
.apo-section--tight { padding-block: var(--wp--preset--spacing--60); }
.apo-section > .wp-block-heading:first-child,
.apo-section > .apo-eyebrow:first-child { margin-block-start: 0; }

.apo-page-head {
	background: var(--wp--preset--color--mist);
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}
.apo-page-head .wp-block-post-title { margin-block-start: 0.5rem; font-size: var(--wp--preset--font-size--huge); }

.apo-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gulf);
	margin-block-end: 0.25rem;
}
.has-white-color .apo-eyebrow,
.apo-hero .apo-eyebrow { color: var(--wp--preset--color--gold); }

.apo-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.6; color: var(--wp--preset--color--body); }
.has-white-color .apo-lead, .apo-hero .apo-lead { color: #E3EEF3; }
.apo-muted { color: var(--wp--preset--color--muted); }
.apo-small { font-size: var(--wp--preset--font-size--small); }

/* Section header: title left, intro right */
.apo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-block-end: var(--wp--preset--spacing--50); }
.apo-head > * { margin: 0; }
.apo-head__title { max-width: 680px; }
.apo-head__title > * { margin-block: 0; }
.apo-head__title > * + * { margin-block-start: 0.6rem; }
.apo-head__intro { max-width: 400px; color: var(--wp--preset--color--muted); }

/* Hero */
.apo-hero {
	position: relative;
	min-height: min(82vh, 720px);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding-block: 8rem 6rem;
	color: #fff;
	background-color: var(--wp--preset--color--ink);
	background-size: cover;
	background-position: center;
	isolation: isolate;
}
.apo-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(13, 46, 69, 0.15) 0%, rgba(13, 46, 69, 0.25) 45%, rgba(13, 46, 69, 0.82) 100%);
}
.apo-hero h1 { color: #fff; font-size: var(--wp--preset--font-size--huge); max-width: 15ch; margin-block: 0.5rem 0; }
.apo-hero .apo-lead { max-width: 36rem; }
.apo-hero + .wp-block-apolafsi-availability, .apo-hero + .apo-availability-wrap { margin-top: -3rem; position: relative; z-index: 2; }

/* Stats strip */
.apo-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
	border-block: 1px solid var(--wp--preset--color--line);
	padding-block: 1.75rem;
}
.apo-stats > * { margin: 0 !important; }
.apo-stat > * { margin: 0; }
.apo-stat__num { font-family: var(--wp--preset--font-family--serif); font-size: 2.5rem; line-height: 1; margin-block-end: 0.35rem !important; }
.apo-stat p:not(.apo-stat__num) { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }

/* Cards */
.apo-cards { gap: 1.5rem; }
.apo-card {
	background: var(--wp--preset--color--foam);
	border-radius: var(--apo-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.apo-card > * { margin: 0 !important; }
.apo-card__media,
.apo-photo {
	min-height: 220px;
	display: flex;
	align-items: flex-end;
	padding: 0.875rem;
	background-color: #BFD8E2;
	background-size: cover;
	background-position: center;
}
.apo-photo { border-radius: var(--apo-radius); }
.apo-photo--tall { min-height: 340px; }
.apo-photo--xl { min-height: 420px; }
.apo-card__media > p,
.apo-photo > p {
	margin: 0;
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
	background: rgba(255, 255, 255, 0.86);
	padding: 0.3rem 0.55rem;
	border-radius: 6px;
}
/* once a real photo is set as background, hide the "photo" label */
.apo-card__media.has-background-image > p, .apo-photo.has-background-image > p,
.apo-card__media[style*="background-image"] > p, .apo-photo[style*="background-image"] > p { display: none; }

.apo-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.apo-card__body > * { margin: 0 !important; }
.apo-card__body h3 { font-size: 1.5rem; }
.apo-card__body p { color: var(--wp--preset--color--muted); font-size: 0.9375rem; line-height: 1.55; }
.apo-card__body .wp-block-buttons { margin-top: auto !important; padding-top: 0.75rem; border-top: 1px solid var(--wp--preset--color--line); }
.apo-card--dark { background: var(--wp--preset--color--ink); color: #fff; }
.apo-card--dark .apo-card__body p { color: #D3E3EA; }
.apo-card--dark h3 { color: #fff; }
.apo-card--dark .apo-card__body .wp-block-buttons { border-top-color: #2B4D66; }

.apo-meta {
	font-size: 0.75rem !important;
	font-weight: 700;
	color: var(--wp--preset--color--sea-green) !important;
	letter-spacing: 0.02em;
}
.apo-card--dark .apo-meta { color: var(--wp--preset--color--gold) !important; }

/* Text-link buttons inside cards */
.apo-linkbtns .wp-block-button__link,
.wp-block-button.is-style-apo-text .wp-block-button__link {
	background: transparent !important;
	color: var(--wp--preset--color--gulf) !important;
	padding: 0.6rem 0 !important;
	border-radius: 0;
	min-height: 44px;
}
.apo-linkbtns .wp-block-button__link:hover { text-decoration: underline; color: var(--wp--preset--color--ink) !important; }
.apo-card--dark .apo-linkbtns .wp-block-button__link { color: var(--wp--preset--color--gold) !important; }

/* Outline buttons */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1.5px solid currentColor;
	padding: calc(0.85rem - 1.5px) calc(1.5rem - 1.5px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: #fff; border-color: var(--wp--preset--color--ink); }
.has-white-color .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }

/* Two-column feature (text + photos) */
.apo-feature { gap: var(--wp--preset--spacing--60); align-items: center; }
.apo-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 0.75rem; }
.apo-mosaic > * { margin: 0 !important; min-height: 0; }
.apo-mosaic > :first-child { grid-column: span 2; grid-row: span 2; }

/* Key / value lists (distances, info) */
.apo-kv { list-style: none; padding: 0; margin: 0; }
.apo-kv li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid #C9D9DF; }
.apo-kv li strong { text-align: right; }

/* Check list */
.apo-checks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem 1.75rem; }
.apo-checks li { position: relative; padding-left: 1.75rem; }
.apo-checks li::before {
	content: ""; position: absolute; left: 0; top: 0.35em; width: 1.1em; height: 1.1em;
	background: var(--wp--preset--color--sea-green);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Panels & tiles */
.apo-panel { background: #fff; border-radius: var(--apo-radius); padding: 1.4rem; }
.apo-panel > * { margin-block: 0; }
.apo-panel > * + * { margin-block-start: 0.6rem; }
.apo-tile { background: var(--wp--preset--color--foam); border-radius: 14px; padding: 1.1rem 1.2rem; }
.apo-tile > * { margin: 0; }
.apo-tile h4 { margin-bottom: 0.2rem; }

/* Rooms layout: content + side box */
.apo-room { gap: var(--wp--preset--spacing--60); align-items: flex-start; }
.apo-side { position: sticky; top: 1.5rem; }

.wp-block-separator { border-top-width: 1px; }

@media (max-width: 781px) {
	.apo-hero { padding-block: 6rem 5rem; min-height: 72vh; }
	.apo-mosaic { grid-auto-rows: 120px; }
	.apo-side { position: static; }
}
.apo-card__media > p:empty, .apo-photo > p:empty { display: none; }

/* Hero: keep text aligned to the content edge (flex column would centre each line) */
.apo-hero > * { width: 100%; box-sizing: border-box; }
.apo-hero h1 { max-width: 1280px !important; padding-right: max(0px, calc(100% - 11.5em)); text-wrap: balance; }
.apo-hero .apo-lead { max-width: 1280px !important; padding-right: max(0px, calc(100% - 36rem)); }
@media (max-width: 781px) {
	.apo-hero { padding-block: 4rem 5rem; min-height: 0; }
	.apo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apo-stat__num { font-size: 2rem; }
}

/* Page head: breadcrumbs aligned with the wide title */
.apo-page-head > .apo-crumbs { max-width: var(--wp--style--global--wide-size, 1280px) !important; width: 100%; }
.apo-page-head + .wp-block-post-content > .apo-section:first-child { padding-top: var(--wp--preset--spacing--60); }

/* Card grids capped at 3 / 2 columns (Stay page) */
.apo-cards.apo-cards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(16rem, calc((100% - 3rem) / 3))), 1fr)) !important; }
.apo-cards.apo-cards--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(18rem, calc((100% - 1.5rem) / 2))), 1fr)) !important; margin-top: 1.5rem; }
