/*
Theme Name: Blue Bay Ocean View 20
Theme URI: https://www.bluebayoceanview20.com
Description: Custom one-page theme for the Blue Bay Ocean View 20 holiday villa in Curaçao. English and Dutch pages, enquiry form, Google Maps location, SEO tags and photo gallery included. Activating the theme creates the pages and imports the photos automatically.
Version: 1.7.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bluebay
*/

/*
 * Brand colours — use ONLY these:
 *   Blue  #192537   Grey  #E9E9E9   Beige #B09E80   (+ white as paper)
 */
:root {
	--bb-blue: #192537;
	--bb-grey: #E9E9E9;
	--bb-beige: #B09E80;
	--bb-white: #FFFFFF;
	--bb-header-h: 84px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bb-header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; font-weight: 400; }
::selection { background: var(--bb-beige); color: var(--bb-blue); }

/* Page sections handle their own spacing. */
main.wp-block-group { margin-top: 0; }
main > .wp-block-post-content > * { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--bb-blue); outline-offset: 3px; }
:where(.bb-header, .bb-footer, .bb-band-blue, .bb-facts, .bb-hero) :where(a, button, summary):focus-visible { outline-color: var(--bb-beige); }

/* ---------- Skip link ---------- */
.bb-skip { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--bb-beige); color: var(--bb-blue); padding: .6rem 1rem; }
.bb-skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.bb-btn {
	display: inline-block; background: var(--bb-beige); color: var(--bb-blue) !important; text-decoration: none !important;
	font: inherit; font-size: .85rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
	border: 1px solid var(--bb-beige); border-radius: 2px; padding: .8rem 1.4rem; line-height: 1.2; cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.bb-btn:hover { background: var(--bb-blue); color: var(--bb-grey) !important; border-color: var(--bb-blue); }
/* On dark backgrounds the hover turns grey instead of blue. */
:where(.bb-header, .bb-footer, .bb-band-blue, .bb-hero) .bb-btn:hover,
:where(.bb-band-blue, .bb-hero) .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background: var(--bb-grey); color: var(--bb-blue) !important; border-color: var(--bb-grey); }
.wp-block-button__link { border: 1px solid var(--bb-beige); }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--bb-blue); border: 1px solid var(--bb-blue);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--bb-blue); color: var(--bb-grey); }
:where(.bb-band-blue, .bb-hero) .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--bb-grey); border-color: var(--bb-grey); }
:where(.bb-band-blue, .bb-hero) .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--bb-grey); color: var(--bb-blue); }
.bb-center { justify-content: center; }

/* ---------- Header ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 0; } }
.bb-header { background: var(--bb-blue); color: var(--bb-grey); border-bottom: 1px solid var(--bb-beige); }
.bb-header__inner {
	max-width: 1200px; margin: 0 auto; min-height: var(--bb-header-h);
	display: flex; align-items: center; gap: 1.5rem; padding: 0 clamp(1rem, 4vw, 2rem);
}
.bb-logo { display: block; line-height: 0; flex: none; }
.bb-logo img { height: 46px; width: auto; display: block; }
.bb-nav { margin-left: auto; display: flex; align-items: center; gap: 1.75rem; }
.bb-nav__links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.bb-nav__links a {
	color: var(--bb-grey); text-decoration: none; font-size: .82rem; font-weight: 500;
	letter-spacing: .16em; text-transform: uppercase; padding: .35rem 0; border-bottom: 1px solid transparent;
}
.bb-nav__links a:hover { color: var(--bb-beige); border-bottom-color: var(--bb-beige); }
.bb-lang { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; font-size: .78rem; font-weight: 500; letter-spacing: .12em; }
.bb-lang a { display: block; padding: .3rem .45rem; color: var(--bb-grey); text-decoration: none; border-bottom: 1px solid transparent; }
.bb-lang a[aria-current] { color: var(--bb-beige); border-bottom-color: var(--bb-beige); }
.bb-lang a:hover { color: var(--bb-beige); }
.bb-menu-toggle {
	display: none; margin-left: auto; align-items: center; gap: .5rem; background: none; border: 0;
	color: var(--bb-grey); font: inherit; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; padding: .5rem;
}
@media (max-width: 1020px) {
	.bb-menu-toggle { display: inline-flex; }
	.bb-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 1rem; padding: .5rem clamp(1rem, 4vw, 2rem) 1.5rem;
		background: var(--bb-blue); border-bottom: 1px solid var(--bb-beige);
	}
	.bb-nav.is-open { display: flex; }
	.bb-nav__links { flex-direction: column; gap: 0; }
	.bb-nav__links a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--bb-beige); }
	.bb-nav .bb-btn { text-align: center; }
	.bb-header__inner { position: relative; }
}
@media (max-width: 480px) { .bb-logo img { height: 38px; } }

/* ---------- Section basics ---------- */
.bb-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.bb-section--tight { padding-top: 0; }
.bb-band-grey { background: var(--bb-grey); }
.bb-band-blue { background: var(--bb-blue); color: var(--bb-grey); }
.bb-band-blue h2, .bb-band-blue h3 { color: var(--bb-grey); }
.bb-section > * { max-width: 1200px; }
/* Text keeps a readable line length but lines up with the wide content. */
.bb-section:not(.bb-legal) > :is(.wp-block-heading, p, .wp-block-details):not(.has-text-align-center) {
	max-width: 760px;
	margin-left: max(0px, calc((100% - 1200px) / 2)) !important;
	margin-right: auto !important;
}
h1, h2 { letter-spacing: .01em; }

/* Eyebrow: small caps label with a beige rule, echoing the logo lines. */
.bb-eyebrow {
	display: flex; align-items: center; gap: .8rem;
	text-transform: uppercase; letter-spacing: .24em; font-size: .78rem !important; font-weight: 500;
	color: var(--bb-blue); margin-bottom: .4rem !important;
}
.bb-eyebrow::before { content: ""; width: 2.5rem; height: 1px; background: var(--bb-beige); flex: none; }
.bb-band-blue .bb-eyebrow, .bb-hero .bb-eyebrow { color: var(--bb-beige); }
.has-text-align-center.bb-eyebrow { justify-content: center; }
.bb-lead { font-size: 1.15rem; font-weight: 300; }
.bb-legal { padding-top: var(--wp--preset--spacing--50); }
.bb-legal > * { max-width: 760px !important; }
.bb-legal h2 { font-size: 1.7rem; margin-top: 2rem; }

/* ---------- Hero ---------- */
/* Text sits low over the video/photo; a blue fade behind it keeps it readable while the rest of the image stays bright. */
.bb-hero.wp-block-cover {
	min-height: calc(88vh - var(--bb-header-h)) !important;
	align-items: flex-end; justify-content: center;
	padding-top: 3rem; padding-bottom: clamp(2rem, 6vh, 3.5rem);
}
.bb-hero .wp-block-cover__background {
	background: linear-gradient(to top, var(--bb-blue) 0%, rgba(25, 37, 55, .55) 30%, rgba(25, 37, 55, 0) 62%) !important;
	opacity: 1 !important;
}
.bb-hero .wp-block-cover__inner-container { max-width: 760px; text-align: center; color: var(--bb-grey); }
.bb-hero .bb-hero-logo, .bb-hero .wp-block-buttons { display: none; } /* removed from the hero (also hidden if an old page still has them) */
.bb-hero h1 { color: var(--bb-grey); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; margin: 0 0 .6rem; }
.bb-hero .bb-lead { color: var(--bb-grey); font-size: clamp(.92rem, 1.4vw, 1.05rem); line-height: 1.6; margin: 0 auto; max-width: 38rem; }
@media (max-width: 600px) {
	.bb-hero.wp-block-cover { min-height: 72vh !important; }
	.bb-hero h1 { font-size: 1.55rem; }
	.bb-hero .bb-lead { font-size: .9rem; }
}

/* ---------- Facts strip ---------- */
.bb-facts { background: var(--bb-blue); color: var(--bb-grey); padding-top: 2rem; padding-bottom: 2rem; border-top: 1px solid var(--bb-beige); }
.bb-facts-row.wp-block-columns { gap: 1rem; margin: 0 auto; flex-wrap: wrap !important; }
.bb-facts .bb-facts-row.wp-block-columns > .wp-block-column { text-align: center; flex: 1 1 40% !important; min-width: 0; }
@media (min-width: 782px) {
	.bb-facts .bb-facts-row.wp-block-columns > .wp-block-column { flex: 1 1 0 !important; }
	.bb-facts .bb-facts-row > .wp-block-column + .wp-block-column { border-left: 1px solid var(--bb-beige); }
}
.bb-fact-num { font-family: var(--wp--preset--font-family--serif); font-size: clamp(2rem, 3.8vw, 2.7rem); line-height: 1; margin: 0; color: var(--bb-grey); }
.bb-fact-label { margin: .45rem 0 0 !important; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bb-beige); }

/* ---------- Text + image, cards ---------- */
.bb-split.wp-block-columns { gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.bb-photo img, .bb-cards img { width: 100%; height: auto; border-radius: 2px; }
.bb-split .bb-photo img, .bb-cards .bb-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.bb-split .bb-photo { position: relative; }
.bb-split .bb-photo::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--bb-beige); z-index: -1; }
.bb-cards.wp-block-columns { gap: clamp(1.5rem, 3vw, 2.5rem); }
.bb-cards h3 { margin-top: 1.2rem; margin-bottom: .4rem; font-size: 1.6rem; }
.bb-cards p { margin-top: 0; }

/* Check lists with a beige crown-coloured tick */
.bb-checks { list-style: none; padding-left: 0; }
.bb-checks li { position: relative; padding-left: 1.9rem; margin: .5rem 0; }
.bb-checks li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
	background: var(--bb-beige) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23192537' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}
.bb-facilities.wp-block-columns { gap: 0 2.5rem; margin-top: 2rem; }
.bb-facilities .bb-checks { margin: 0; }
.bb-note { background: var(--bb-white); border-left: 3px solid var(--bb-beige); padding: 1rem 1.25rem; font-size: .95rem; }
.bb-band-grey .bb-split.wp-block-columns { align-items: flex-start; }

/* ---------- Gallery ---------- */
.bb-gallery.wp-block-gallery { gap: .75rem; margin-top: 2rem; }
.bb-gallery.wp-block-gallery .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
@media (max-width: 600px) {
	.bb-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { width: calc(50% - .375rem) !important; }
}

/* ---------- FAQ ---------- */
.bb-faq.wp-block-details { border-bottom: 1px solid var(--bb-beige); padding: 1.15rem 0; margin: 0 !important; max-width: 760px; }
.bb-faq summary { font-family: var(--wp--preset--font-family--serif); font-weight: 500; font-size: 1.35rem; color: var(--bb-blue); cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
.bb-faq summary::-webkit-details-marker { display: none; }
.bb-faq summary::after { content: "+"; position: absolute; right: 0; top: -.1rem; font-family: var(--wp--preset--font-family--sans); font-size: 1.5rem; font-weight: 300; color: var(--bb-beige); transition: transform .2s; }
.bb-faq[open] summary::after { transform: rotate(45deg); }
.bb-faq p { margin: .6rem 0 0; }

/* ---------- Location / map ---------- */
.bb-map { position: relative; aspect-ratio: 16 / 9; max-height: 480px; width: 100%; background: var(--bb-blue); border: 1px solid var(--bb-beige); overflow: hidden; }
@media (max-width: 600px) { .bb-map { aspect-ratio: 4 / 5; } }
.bb-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bb-map__placeholder {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
	padding: 1.5rem; text-align: center; color: var(--bb-grey);
}
.bb-map__crown { width: 56px; height: auto; }
.bb-map__placeholder p { margin: 0; max-width: 34rem; font-size: .9rem; }
.bb-map__placeholder strong { font-family: var(--wp--preset--font-family--serif); font-weight: 500; font-size: 1.6rem; letter-spacing: .02em; }
.bb-map__link { display: inline-block; margin-top: .9rem; font-size: .9rem; }

/* ---------- Contact ---------- */
.bb-contact.wp-block-columns { align-items: flex-start; }
.bb-contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.bb-contact-list li { display: flex; gap: .8rem; align-items: flex-start; }
.bb-contact-list .bb-icon { flex: none; color: var(--bb-beige); margin-top: .2rem; }
.bb-contact-list a { color: inherit; text-decoration: none; }
.bb-contact-list a:hover { text-decoration: underline; }

/* ---------- Enquiry form ---------- */
.bb-form {
	background: var(--bb-white); padding: clamp(1.25rem, 3vw, 2.25rem); border-top: 3px solid var(--bb-beige);
	display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.bb-field { margin: 0; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.bb-field--full { grid-column: 1 / -1; }
@media (max-width: 560px) { .bb-form { grid-template-columns: 1fr; } }
.bb-field label { font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--bb-blue); }
.bb-form input[type="text"], .bb-form input[type="email"], .bb-form input[type="tel"], .bb-form input[type="date"], .bb-form select, .bb-form textarea {
	font: inherit; width: 100%; box-sizing: border-box; padding: .7rem .85rem; min-height: 2.9rem;
	border: 1px solid var(--bb-beige); border-radius: 2px; background: var(--bb-white); color: var(--bb-blue);
}
.bb-form input:focus, .bb-form select:focus, .bb-form textarea:focus { border-color: var(--bb-blue); outline: 1px solid var(--bb-blue); outline-offset: 0; }
.bb-consent label { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.bb-consent input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--bb-blue); }
.bb-form .bb-btn { padding: 1rem 2rem; justify-self: start; }
.bb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.bb-alert { padding: 1rem 1.25rem; margin-bottom: 1rem; color: var(--bb-blue); }
.bb-alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.bb-alert--ok { background: var(--bb-white); border-left: 3px solid var(--bb-beige); }
.bb-alert--error { background: var(--bb-white); border: 2px solid var(--bb-blue); }

/* ---------- Footer ---------- */
.bb-footer { background: var(--bb-blue); color: var(--bb-grey); font-size: .95rem; border-top: 1px solid var(--bb-beige); }
.bb-footer a { color: var(--bb-grey); }
.bb-footer__inner {
	max-width: 1200px; margin: 0 auto; padding: 3.5rem clamp(1rem, 4vw, 2rem) 2rem;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.25rem;
}
.bb-footer__logo { width: 240px; max-width: 100%; height: auto; display: block; margin-bottom: 1.25rem; }
.bb-footer .bb-contact-list { margin: 0; }
.bb-footer__links { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.bb-footer__links a { text-decoration: none; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; }
.bb-footer__links a:hover { color: var(--bb-beige); }
.bb-footer__bottom {
	max-width: 1200px; margin: 0 auto; padding: 1.25rem clamp(1rem, 4vw, 2rem) 2rem;
	border-top: 1px solid var(--bb-beige); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font-size: .82rem;
}
.bb-footer__bottom a:hover { color: var(--bb-beige); }

/* Homepage video behind the hero (same placement as the photo, which stays underneath as fallback). */
.bb-hero .bb-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; border: 0; margin: 0; }
.bb-hero .wp-block-cover__background { z-index: 1; }
.bb-hero .wp-block-cover__inner-container { z-index: 2; }
.bb-hero :is(h1, .bb-lead) { text-shadow: 0 1px 14px rgba(25, 37, 55, .55); }
