/* ========================================
   Montville Oceanview - Custom Styles
   ======================================== */

/* --- Block Style: Uppercase Spaced --- */
.is-style-uppercase-spaced {
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}

/* --- Block Style: Accent Short Separator --- */
.wp-block-separator.is-style-accent-short {
	max-width: 80px;
	border-width: 1px;
}

/* --- Site Header --- */
.site-header {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header .wp-block-image {
	margin: 0;
	line-height: 0;
}

.site-header .wp-block-image img {
	max-height: 60px;
	width: auto !important;
	height: auto;
}

.site-header.is-transparent {
	background-color: transparent !important;
	box-shadow: none;
}

.site-header.is-scrolled {
	background-color: rgba(40, 60, 60, 0.97) !important;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header.is-scrolled .wp-block-image img {
	max-height: 45px;
}

/* Ensure nav links are visible */
.site-header .wp-block-navigation a {
	color: #fff !important;
	text-decoration: none;
}

.site-header .wp-block-navigation a:hover {
	color: #E6B478 !important;
}

/* --- Hero Carousel --- */
.hero-carousel {
	position: relative;
	overflow: hidden;
}

.hero-carousel .wp-block-cover__background {
	transition: opacity 1.2s ease;
}

.hero-carousel .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* --- Cottage Cards --- */
.cottage-card {
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.cottage-card .wp-block-cover__image-background,
.cottage-card video.wp-block-cover__video-background {
	transition: transform 0.7s ease;
}

.cottage-card:hover .wp-block-cover__image-background,
.cottage-card:hover video.wp-block-cover__video-background {
	transform: scale(1.06);
}

.cottage-card .wp-block-cover__background {
	transition: opacity 0.5s ease;
}

.cottage-card:hover .wp-block-cover__background {
	opacity: 0.55 !important;
}

/* --- Gallery Strip --- */
.gallery-strip .wp-block-image {
	overflow: hidden;
	margin: 0;
}

.gallery-strip .wp-block-image img {
	width: 100%;
	height: 250px;
	object-fit: cover;
	transition: transform 0.5s ease;
	display: block;
}

.gallery-strip .wp-block-image:hover img {
	transform: scale(1.05);
}

.gallery-strip figure {
	margin: 0 !important;
}

/* --- Fade In Animation --- */
.fade-in-up {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Contact Form Styling --- */
.montville-contact-form input:focus,
.montville-contact-form textarea:focus {
	border-color: #E6B478 !important;
	outline: none;
}

/* --- Button Hover Lift --- */
.wp-block-button__link {
	transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- Footer Link Styles --- */
footer .wp-block-group li a,
.wp-block-template-part[data-area="footer"] li a {
	color: var(--wp--preset--color--stone);
	text-decoration: none;
	transition: color 0.3s ease;
}

footer .wp-block-group li a:hover,
.wp-block-template-part[data-area="footer"] li a:hover {
	color: var(--wp--preset--color--accent);
}

/* Footer list style reset */
footer ul,
.wp-block-template-part[data-area="footer"] ul {
	list-style: none;
	padding-left: 0;
}

/* --- Separator Default Style (accent short) --- */
.wp-block-separator.is-style-default {
	max-width: 80px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 782px) {
	.site-header {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	.site-header .wp-block-navigation {
		font-size: 0.65rem;
	}

	.gallery-strip .wp-block-columns {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.gallery-strip .wp-block-column {
		min-width: 60vw;
		flex: 0 0 60vw;
	}

	.gallery-strip .wp-block-image img {
		height: 200px;
	}

	.hero-carousel h1 {
		font-size: clamp(2rem, 8vw, 3rem) !important;
	}
}

@media (max-width: 600px) {
	.cottage-card {
		min-height: 300px !important;
	}

	.site-header .wp-block-buttons {
		display: none;
	}
}

/* --- Smooth Scroll --- */
html {
	scroll-behavior: smooth;
}

/* --- Selection Color --- */
::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

/* ========================================
   Site-wide Subtle Animations
   ======================================== */

/* Scroll reveal — initial hidden state */
.mv-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
	            transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: opacity, transform;
}

.mv-reveal.mv-revealed {
	opacity: 1;
	transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.mv-reveal,
	.mv-reveal.mv-revealed {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	html { scroll-behavior: auto; }
}

/* Page load fade — applied to main areas */
.hp, .sp, .site-footer {
	animation: mvFadeInPage 0.8s ease-out both;
}

@keyframes mvFadeInPage {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Gentle breathing on hero dots */
.hp .hdot.active {
	animation: mvDotPulse 2.4s ease-in-out infinite;
}

@keyframes mvDotPulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.65; }
}

/* Button press feedback */
.hp .btn-gold,
.sp .btn-gold,
.hp .cottage-cta,
.sp .cottage-cta,
.hp .btn-submit,
.sp .btn-submit,
.site-footer .footer-book-btn {
	transition: background-color 0.3s ease,
	            color 0.3s ease,
	            transform 0.25s ease,
	            box-shadow 0.3s ease;
}

.hp .btn-gold:active,
.sp .btn-gold:active,
.hp .cottage-cta:active,
.sp .cottage-cta:active {
	transform: translateY(0) scale(0.98);
}

/* Link hover transitions */
.sp a,
.site-footer a,
.hp .nav-links a,
.hp .cottage-link,
.hp .thing-more,
.hp .text-link {
	transition: color 0.3s ease, opacity 0.3s ease, gap 0.3s ease;
}

/* Nav link underline slide */
.site-nav .nav-links a {
	position: relative;
}

.site-nav .nav-links a::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 0;
	height: 1px;
	background: #E6B478;
	transition: width 0.35s ease, left 0.35s ease;
}

.site-nav .nav-links a:not(.nav-book):hover::after {
	width: 100%;
	left: 0;
}

.site-nav .nav-links a.nav-book::after { display: none; }

/* Form field focus lift */
.hp .contact-form input,
.hp .contact-form select,
.hp .contact-form textarea,
.sp .contact-form input,
.sp .contact-form select,
.sp .contact-form textarea {
	transition: border-color 0.3s ease,
	            box-shadow 0.3s ease,
	            transform 0.2s ease;
}

.hp .contact-form input:focus,
.hp .contact-form select:focus,
.hp .contact-form textarea:focus,
.sp .contact-form input:focus,
.sp .contact-form select:focus,
.sp .contact-form textarea:focus {
	box-shadow: 0 4px 16px rgba(40, 60, 60, 0.08);
}

/* Cottage card subtle lift */
.hp .cottage-card,
.sp .cottage-card {
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
	            box-shadow 0.5s ease;
}

.hp .cottage-card:hover,
.sp .cottage-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(40, 60, 60, 0.18);
}

/* Feature cards gentle lift */
.hp .feature {
	transition: background-color 0.35s ease, transform 0.35s ease;
}

.hp .feature:hover {
	transform: translateY(-3px);
}

/* Things card subtle lift */
.hp .thing-card,
.sp .thing-card {
	transition: background-color 0.35s ease, transform 0.35s ease;
}

.hp .thing-card:hover,
.sp .thing-card:hover {
	transform: translateY(-3px);
}

/* Gallery item hover accent */
.hp .gal-item,
.sp .gallery-grid .gal-item {
	position: relative;
}

.hp .gal-item::after,
.sp .gallery-grid .gal-item::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(40, 60, 60, 0.35), rgba(40, 60, 60, 0));
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.hp .gal-item:hover::after,
.sp .gallery-grid .gal-item:hover::after {
	opacity: 1;
}

/* Mobile menu slide-in animation */
.nav-mobile-overlay {
	transition: opacity 0.3s ease;
}

.nav-mobile-overlay a {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-mobile-overlay.open a {
	opacity: 1;
	transform: translateY(0);
}

.nav-mobile-overlay.open a:nth-child(1) { transition-delay: 0.05s; }
.nav-mobile-overlay.open a:nth-child(2) { transition-delay: 0.10s; }
.nav-mobile-overlay.open a:nth-child(3) { transition-delay: 0.15s; }
.nav-mobile-overlay.open a:nth-child(4) { transition-delay: 0.20s; }
.nav-mobile-overlay.open a:nth-child(5) { transition-delay: 0.25s; }
.nav-mobile-overlay.open a:nth-child(6) { transition-delay: 0.30s; }
.nav-mobile-overlay.open a:nth-child(7) { transition-delay: 0.35s; }
.nav-mobile-overlay.open a:nth-child(8) { transition-delay: 0.40s; }

/* Hamburger icon smooth transitions */
.nav-hamburger span {
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
	            opacity 0.25s ease;
}
