/*
 * Functional rules for the Carolina Golf Experience theme.
 * The compiled source stylesheet (app.css) owns all design tokens and layout.
 */

[hidden] {
	display: none !important;
}

body.admin-bar .site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

/* Clickable affordances */
a,
button,
[role="button"],
summary,
label[for],
select,
input[type="checkbox"],
input[type="radio"],
input[type="submit"],
input[type="button"] {
	cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
	cursor: not-allowed;
}

/* Header text shadow over the hero photo, driven by the Customizer shadow color */
.theme-hero-shadow {
	text-shadow: 0 1px 8px color-mix(in srgb, var(--shadow-tint) 65%, transparent);
}

/* Identity */
.theme-header-logo {
	height: var(--logo-height, 68px) !important;
}

.site-logo-text {
	line-height: 1.15;
}

.nav-logo.no-filter {
	filter: none;
}

/* Inner pages sit below the fixed header */
.theme-inner {
	padding-top: 76px;
}

/* Scroll reveals */
.reveal-item {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--reveal-delay, 0s);
	will-change: opacity, transform;
}

.reveal-item.is-visible {
	opacity: 1;
	transform: none;
}

/* Hero entrance */
.hero-reveal {
	opacity: 0;
	transform: translateY(24px);
	filter: blur(10px);
	transition:
		opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
		transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
		filter 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-reveal--1 {
	transition-delay: 0.1s;
}

.hero-reveal--2 {
	transition-delay: 0.25s;
	transition-duration: 1.2s;
}

.hero-reveal--3 {
	transition-delay: 0.45s;
}

.hero-reveal.is-visible {
	opacity: 1;
	transform: none;
	filter: blur(0);
}

/* Clip image reveal */
.clip-image > div {
	clip-path: inset(12% 12% 12% 12% round 1.75rem);
	transition: clip-path 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.clip-image > div img {
	transform: scale(1.16);
	transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.clip-image.is-visible > div {
	clip-path: inset(0% 0% 0% 0% round 1.75rem);
}

.clip-image.is-visible > div img {
	transform: scale(1);
}

/* Scroll parallax layer */
.theme-parallax-layer {
	will-change: transform;
}

/* Services media crossfade */
.service-media-img {
	opacity: 0;
	transform: scale(1.06);
	filter: blur(8px);
	transition:
		opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
		filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-media-img.is-active {
	opacity: 1;
	transform: scale(1);
	filter: blur(0);
}

/* Experience card lift */
.portfolio-card {
	transition-property: transform, box-shadow, background-color, border-color;
	transition-duration: 0.5s, 0.7s, 0.7s, 0.7s;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
	transform: translateY(-12px);
}

/* FAQ panels */
.faq-panel {
	height: 0;
	opacity: 0;
	overflow: clip;
	transition:
		height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-panel.is-open {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.reveal-item,
	.hero-reveal,
	.clip-image > div,
	.clip-image > div img,
	.service-media-img,
	.faq-panel {
		transition-duration: 0.01ms;
	}

	.portfolio-card:hover,
	.portfolio-card:focus-visible {
		transform: none;
	}
}

/* Form submit lock */
.theme-btn-loading {
	opacity: 0.6;
	pointer-events: none;
	cursor: wait;
}

/* Customizer preview keeps reveal content visible */
body.is-customizer .reveal-item,
body.is-customizer .hero-reveal,
body.is-customizer .clip-image > div img {
	opacity: 1;
	transform: none;
	filter: none;
}

body.is-customizer .clip-image > div {
	clip-path: inset(0% 0% 0% 0% round 1.75rem);
}

body.is-customizer .faq-panel {
	opacity: 1;
}

/* WordPress generated markup: rich text inside pages */
.entry-content {
	color: var(--foreground);
	font-size: 1rem;
	line-height: 1.7;
}

.entry-content > * + * {
	margin-top: 1.1rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.entry-content h2 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.entry-content h3 {
	font-size: 1.5rem;
}

.entry-content h4 {
	font-size: 1.25rem;
}

.entry-content a {
	color: var(--primary);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5rem;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content img,
.entry-content figure img {
	border-radius: var(--radius-lg);
	height: auto;
}

.entry-content blockquote {
	border-left: 2px solid var(--primary);
	padding-left: 1.25rem;
	font-style: italic;
}

/* WordPress generated markup: pagination */
.theme-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2.5rem;
}

.theme-pagination .page-numbers {
	display: inline-flex;
	min-height: 2.75rem;
	min-width: 2.75rem;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 0 0.75rem;
	font-size: 0.9375rem;
	color: var(--muted-foreground);
}

.theme-pagination .page-numbers.current {
	background-color: var(--primary);
	border-color: var(--primary);
	color: var(--primary-foreground);
}

/* WordPress generated markup: forms and screen reader text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.theme-inner .search-form {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.theme-inner .search-form input[type="search"] {
	flex: 1;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background-color: var(--background);
	padding: 0.75rem 1rem;
	color: var(--foreground);
}

.theme-inner .search-form input[type="submit"],
.theme-inner .search-form button {
	border: 1px solid var(--primary);
	border-radius: var(--radius-lg);
	background-color: transparent;
	padding: 0.75rem 1.25rem;
	color: var(--primary);
	font-weight: 600;
}
