/* Base theme layout: header, footer, CTA, content area. Color vars (--header-bg,
   --header-text, --footer-bg, --footer-text, --accent) are printed inline in <head>
   by aguwana_output_theme_color_vars() (inc/theme-setup.php), sourced from the
   Theme Options color pickers. */

/* Design-token drift (known, intentionally deferred): border-radius (8px card vs
   12px booking-card), hover box-shadows (0 8px 24px .12 / 0 6px 16px .2 /
   0 2px 8px .08 / .15), transition durations (.2s / .25s / .35s) and hover-lift
   translateY (-1px / -2px / -4px) vary across theme.css, tour.css and
   carousel.css. Normalize via shared custom properties in a future
   design-system cleanup; not changed here. */

* { box-sizing: border-box; }

/* Responsive media baseline: stops classic-editor content images/embeds with
   explicit width attributes overflowing narrow (320px) viewports. height:auto
   only on img/video (keeps aspect ratio); iframes keep their height attribute,
   since height:auto would collapse them to the 150px UA default. Class-based
   rules elsewhere (card thumb, gallery, lightbox, category icon) out-specify
   these element selectors. */
img,
video {
	max-width: 100%;
	height: auto;
}

iframe,
embed,
object {
	max-width: 100%;
}

body {
	margin: 0;
	font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Clearance for fixed mobile-nav (carousel.css), ~80px tall:
   border 1 + padding 6+6 + icon 38 + gap 2 + label 2.4em @ 0.7rem (26.88)
   = 79.88px, plus ~8px breathing room. .has-mobile-nav is added by
   aguwana_mobile_nav_body_class() (inc/nav-walker.php) only when the bar
   actually renders, so no blank space is reserved when it has no items. */
body.has-mobile-nav {
	padding-bottom: 88px;
}

@media (min-width: 769px) {
	body.has-mobile-nav { padding-bottom: 0; }
}

.site-header {
	background: var(--header-bg, #0a2540);
	color: var(--header-text, #fff);
	position: sticky;
	/* Offset below WP admin bar for logged-in users (core sets this var on <html>). */
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.site-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 20px;
}

@media (min-width: 769px) {
	.site-header-inner {
		padding: 16px 24px;
	}

	.site-nav {
		display: block;
	}
}

.site-title {
	color: var(--header-text, #fff);
	font-weight: 700;
	font-size: 1.25rem;
	text-decoration: none;
}

.site-branding {
	display: flex;
	align-items: center;
	/* Allow shrinking below logo's intrinsic width so a wide logo plus the
	   nowrap CTA can't overflow a 320px header. */
	min-width: 0;
}

/* WP custom-logo with flex-height/flex-width renders the image at its native
   intrinsic size (no width/height attrs), so without this cap an uploaded
   logo can blow up the header on any screen. Mobile-first: small by default,
   slightly larger at the 769px desktop breakpoint used elsewhere in this file. */
.custom-logo-link {
	display: inline-flex;
}

.custom-logo {
	display: block;
	max-height: 36px;
	max-width: 100%;
	width: auto;
	height: auto;
}

@media (min-width: 769px) {
	.custom-logo {
		max-height: 52px;
	}
}

.primary-menu {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu a {
	position: relative;
	color: var(--header-text, #fff);
	text-decoration: none;
	font-weight: 400;
	transition: color 0.2s;
}

.primary-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 0;
	height: 2px;
	background: var(--accent, #0f7a94);
	transition: width 0.2s;
}

.primary-menu a:hover::after,
.primary-menu a:focus-visible::after {
	width: 100%;
}

.header-cta-button {
	background: var(--accent, #0f7a94);
	color: #fff;
	padding: 10px 20px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s, box-shadow 0.2s;
}

.header-cta-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.aguwana-content-area {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 20px;
}

/* Post/tour body content: let long unbroken words/URLs break instead of
   forcing horizontal scroll at 320-375px (pairs with tour.css grid guards). */
.entry-content {
	overflow-wrap: anywhere;
}

.cta-section {
	background: var(--accent, #0f7a94);
	color: #fff;
	text-align: center;
	padding: 48px 20px;
}

.cta-inner { max-width: 640px; margin: 0 auto; }

.cta-button {
	display: inline-block;
	margin-top: 16px;
	/* Inverted: section bg is already var(--accent), so a same-color button would blend in. */
	background: #fff;
	color: var(--accent, #0f7a94);
	padding: 12px 28px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.site-footer {
	background: var(--footer-bg, #061a2d);
	color: var(--footer-text, #cfe3f0);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.site-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
}

/* Fixed 4 columns only where 4 x 220px + 3 x 32px gaps + 40px padding fit
   (~1016px); below that the auto-fit minmax(220px) rule above reflows.
   Accepted tradeoff: with all 4 columns present, ~764-1023px shows 3 + 1
   (4th item wraps alone). Not forced to 2 x 2 because footer-about, -map and
   -tour-terbaru each render nothing when empty (1-4 items), and auto-fit
   handles every count; a fixed 2-col rule would just orphan the 3-item case. */
@media (min-width: 1024px) {
	.site-footer-inner {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.footer-heading {
	margin-top: 0;
	margin-bottom: 12px;
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	opacity: .75;
}

.site-footer a { color: var(--footer-text, #cfe3f0); }

.footer-contact-list,
.footer-tour-list,
.footer-about-text {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	line-height: 2;
}

.footer-contact-list li,
.footer-tour-list li {
	margin-bottom: 10px;
}

.footer-contact-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.footer-contact-list li svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	color: var(--accent, #0f7a94);
	opacity: .85;
}

.footer-contact-list a,
.footer-tour-list a,
.footer-about-text a {
	text-decoration: none;
	transition: color 0.2s;
}

.footer-contact-list a:hover,
.footer-tour-list a:hover,
.footer-about-text a:hover {
	color: var(--accent, #0f7a94);
}

.site-footer-bottom {
	padding: 16px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.85rem;
}

.site-footer-bottom-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.site-footer-bottom p {
	margin: 0;
}

.footer-bottom-social {
	display: flex;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-bottom-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	transition: color 0.2s;
}

.footer-bottom-social a:hover {
	color: var(--accent, #0f7a94);
}

.footer-map-embed iframe {
	width: 100%;
	max-width: 100%;
	border: 0;
}

.back-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--accent, #0f7a94);
	color: #fff;
	border: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .2s, transform .2s, visibility .2s;
	z-index: 900;
	cursor: pointer;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.back-to-top:hover {
	transform: translateY(-2px);
}

/* Clear the fixed mobile-nav bar (carousel.css: position:fixed, bottom:0,
   z-index:1000, ~80px tall — see body padding-bottom calc above), hidden at
   the same 769px breakpoint used elsewhere in this theme. 96px = nav + 16px gap.
   Stays z-index:900 (below mobile-nav) throughout. */
@media (max-width: 768px) {
	/* Only when the mobile-nav bar exists (see body.has-mobile-nav above). */
	body.has-mobile-nav .back-to-top {
		bottom: 96px;
	}

	/* Desktop primary nav hidden on mobile (mobile-nav bar takes over).
	   Explicit max-width query so it never overrides the >=769px rule
	   regardless of source order. */
	.site-nav {
		display: none;
	}
}

/* Visually-hidden but screen-reader/crawler accessible (WP-standard pattern). */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* Skip link: hidden via .screen-reader-text until keyboard focus reveals it (WCAG 2.4.1). */
.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 18px;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: #fff;
	color: #111;
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.primary-menu a,
	.primary-menu a::after,
	.header-cta-button,
	.cta-button,
	.back-to-top {
		transition: none;
	}

	.header-cta-button:hover,
	.cta-button:hover,
	.back-to-top:hover {
		transform: none;
	}
}
