/* ==========================================================================
   COMPONENTS — Buttons, Cards, Lightbox, Nav, Misc
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.75rem;
	border-radius: var(--radius-btn);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background var(--duration) var(--ease-out),
	            color var(--duration) var(--ease-out),
	            border-color var(--duration) var(--ease-out),
	            transform var(--duration) var(--ease-out),
	            box-shadow var(--duration) var(--ease-out);
	white-space: nowrap;
}

.btn:active {
	transform: scale(0.97);
}

.btn-coral,
.btn-primary {
	background: var(--color-coral);
	color: #fff;
	border-color: var(--color-coral);
}
.btn-coral:hover,
.btn-primary:hover {
	background: var(--color-coral-dark);
	border-color: var(--color-coral-dark);
	color: #fff;
	box-shadow: 0 6px 20px rgba(240,122,91,0.4);
}

.btn-ocean {
	background: var(--color-ocean);
	color: #fff;
	border-color: var(--color-ocean);
}
.btn-ocean:hover {
	background: #1e6891;
	border-color: #1e6891;
	color: #fff;
	box-shadow: 0 6px 20px rgba(42,127,173,0.4);
}

.btn-outline {
	background: transparent;
	color: var(--color-ocean);
	border-color: var(--color-ocean);
}
.btn-outline:hover {
	background: var(--color-ocean);
	color: #fff;
}

.btn-outline-white {
	background: transparent;
	color: #fff;
	border-color: rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
	background: rgba(255,255,255,0.15);
	border-color: #fff;
	color: #fff;
}

.btn-sm {
	padding: 0.5rem 1.25rem;
	font-size: var(--text-xs);
}

.btn-lg {
	padding: 1rem 2.25rem;
	font-size: var(--text-base);
}

/* ---- Lightbox ---- */
.lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 20, 28, 0.95);
	z-index: 9000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--duration-md) var(--ease-out);
}

.lightbox-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-figure {
	position: relative;
	max-width: 90vw;
	max-height: 90svh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-img {
	max-width: 90vw;
	max-height: 90svh;
	object-fit: contain;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-hero);
	transition: opacity var(--duration) var(--ease-out);
}

.lightbox-img.is-loading {
	opacity: 0.3;
}

.lightbox-close {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255,255,255,0.12);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background var(--duration) var(--ease-out);
	z-index: 9001;
	border: none;
}
.lightbox-close:hover {
	background: rgba(255,255,255,0.25);
}

.lightbox-prev,
.lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255,255,255,0.12);
	color: #fff;
	font-size: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background var(--duration) var(--ease-out);
	z-index: 9001;
	border: none;
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(255,255,255,0.25);
}

.lightbox-counter {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,0.6);
	font-size: var(--text-sm);
	z-index: 9001;
}

/* ---- Scroll animation base states ---- */
.js-fade-up {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.js-fade-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger delay helpers */
.js-stagger > * {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.js-stagger.is-visible > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0.05s; }
.js-stagger.is-visible > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 0.12s; }
.js-stagger.is-visible > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 0.19s; }
.js-stagger.is-visible > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 0.26s; }
.js-stagger.is-visible > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 0.33s; }
.js-stagger.is-visible > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 0.40s; }
.js-stagger.is-visible > *:nth-child(7)  { opacity: 1; transform: none; transition-delay: 0.47s; }
.js-stagger.is-visible > *:nth-child(8)  { opacity: 1; transform: none; transition-delay: 0.54s; }
.js-stagger.is-visible > *:nth-child(n+9) { opacity: 1; transform: none; transition-delay: 0.60s; }

/* ---- WordPress default styles ---- */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; margin-top: 0.35rem; }

.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
.alignfull   { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

.wp-block-image img { border-radius: var(--radius-sm); }

/* Pagination */
.nav-links {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 3rem;
}
.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.75rem;
	border-radius: var(--radius-btn);
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-ocean);
	border: 2px solid var(--color-ocean);
	transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
}
.nav-links a:hover,
.nav-links .current {
	background: var(--color-ocean);
	color: #fff;
}

/* 404 page */
.page-404 {
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--section-pad) var(--container-pad);
}

.page-404__inner {
	max-width: 480px;
}

.page-404__code {
	font-family: var(--font-accent);
	font-size: clamp(5rem, 15vw, 9rem);
	color: var(--color-coral);
	line-height: 1;
	margin-bottom: 0.5rem;
}

.page-404 h1 {
	font-size: var(--text-2xl);
	margin-bottom: 1rem;
}

.page-404 p {
	color: var(--color-text-muted);
	margin-bottom: 2rem;
}

/* Misc utility classes */
.text-center { text-align: center; }
.text-coral  { color: var(--color-coral); }
.text-ocean  { color: var(--color-ocean); }
.mt-0        { margin-top: 0 !important; }
.mb-0        { margin-bottom: 0 !important; }
