/*
 * Havenara landing base styles.
 * Scoped to avoid conflicts with Elementor widget styling.
 */

:root {
	--havenara-side-space: clamp(16px, 3vw, 36px);
	--havenara-body-bg: #ffffff;
	--havenara-text: #111111;
	--havenara-muted: #5f6368;
	--havenara-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--havenara-font-display: 'Philosopher', Georgia, 'Times New Roman', serif;
}

body.havenara-landing-body {
	margin: 0;
	background: var(--havenara-body-bg);
	color: var(--havenara-text);
	font-family: var(--havenara-font-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.bounce {
  -moz-animation: bounce 2s infinite;
  -webkit-animation: bounce 2s infinite;
  animation: bounce 2s infinite;
}

.bounce svg{
	padding-top:15px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

.havenara-main h1,
.havenara-main h2,
.havenara-main h3,
.havenara-main h4,
.havenara-main h5,
.havenara-main h6 {
	font-family: var(--havenara-font-display);
}

.havenara-main p,
.havenara-main li,
.havenara-main span,
.havenara-main .elementor-widget-text-editor,
.havenara-main .elementor-widget-text-editor p,
.havenara-main .elementor-widget-heading .elementor-heading-title.havenara-font-body {
	font-family: var(--havenara-font-body);
}

.havenara-main p,
.havenara-main .elementor-widget-text-editor p {
	font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
	line-height: 1.6;
	margin: 0;
}

@media (max-width: 1024px) {
	.havenara-main p,
	.havenara-main .elementor-widget-text-editor p {
		font-size: 1rem;
	}
}

@media (max-width: 767px) {
	.havenara-main p,
	.havenara-main .elementor-widget-text-editor p {
		font-size: 1rem;
		line-height: 1.5;
	}
}

.havenara-main p + p,
.havenara-main .elementor-widget-text-editor p + p {
	margin-top: 0.9em;
}

.havenara-main .elementor-widget-heading .elementor-heading-title,
.havenara-main .elementor-widget-heading h1,
.havenara-main .elementor-widget-heading h2,
.havenara-main .elementor-widget-heading h3,
.havenara-main .elementor-widget-heading h4,
.havenara-main .elementor-widget-heading h5,
.havenara-main .elementor-widget-heading h6 {
	font-family: var(--havenara-font-display);
}

.havenara-font-body {
	font-family: var(--havenara-font-body) !important;
}

.havenara-font-display {
	font-family: var(--havenara-font-display) !important;
}

.havenara-main {
	width: 100%;
	margin: 0;
}

.havenara-entry {
	margin: 0;
	padding: 0;
}

.havenara-header {
	padding-top: clamp(20px, 4vw, 48px);
}

.havenara-title {
	margin: 0;
	line-height: 1.15;
	letter-spacing: -0.01em;
	font-size: clamp(1.75rem, 2.8vw, 2.75rem);
}

.havenara-content {
	padding-block: clamp(12px, 2vw, 28px);
	padding-top: 0;
}

.havenara-content.is-elementor {
	padding: 0;
}

.havenara-content.is-elementor > .elementor {
	margin: 0;
}

/* Full-screen hero utility for landing pages. */
.havenara-hero-full {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	place-items: center;
	overflow: hidden;
}

body.admin-bar .havenara-hero-full {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 32px));
}

.havenara-hero-full > * {
	position: relative;
	z-index: 1;
}

.havenara-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.52));
	pointer-events: none;
	z-index: 0;
}

.havenara-hero-title h1,.havenara-hero-title h2 {
    color: #ffffff;
    text-align: center;
    font-size: 4rem;
}

@media (max-width: 1024px) and (min-width: 768px) {
	.havenara-hero-title h1,
	.havenara-hero-title h2 {
		font-size: 3.2rem;
	}

	.havenara-main .havenara-hero-description.elementor-widget-text-editor p,
	.havenara-main .havenara-hero-description p {
		font-size: 1.2rem;
	}
}

@media (max-width: 767px) {
	.havenara-hero-title h1,
	.havenara-hero-title h2 {
		font-size: 2.2rem;
	}

	.havenara-main .havenara-hero-description.elementor-widget-text-editor p,
	.havenara-main .havenara-hero-description p {
		font-size: 1rem;
		margin-top: 0.5rem;
	}
}

/* Elementor support: add class "havenara-hero-full" on the top section/container. */
.elementor-section.havenara-hero-full {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
}

.elementor-section.havenara-hero-full > .elementor-container {
	min-height: inherit;
	align-items: center;
}

.elementor-element.havenara-hero-full {
	min-height: 100vh !important;
	min-height: 100svh !important;
}

body.admin-bar .elementor-element.havenara-hero-full {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)) !important;
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 32px)) !important;
}

.elementor-element.havenara-hero-full.e-con {
	display: flex;
	align-items: center;
}

.elementor-element.flex-half.e-con {
	gap: 0 !important;
	--gap: 0 !important;
	align-items: stretch;
}

.elementor-element.flex-half.e-con > .e-con,
.elementor-element.flex-half.e-con > .elementor-element {
	flex: 1 1 50%;
	max-width: 50%;
	width: 50%;
	min-width: 0;
	margin: 0;
}

.elementor-element.flex-half.e-con > .e-con {
	padding: 0;
	--padding-top: 0;
	--padding-right: 0;
	--padding-bottom: 0;
	--padding-left: 0;
}

/* Mobile utility: prevent equal-height stretching on grid containers. */
@media (max-width: 767px) {
	.elementor-element.havenara-mobile-grid-auto.e-grid {
		grid-template-rows: auto !important;
		--grid-template-rows: auto !important;
		grid-auto-rows: auto !important;
		--grid-auto-rows: auto !important;
		align-items: start !important;
		align-content: start !important;
	}

	.elementor-element.havenara-mobile-grid-auto.e-grid > .e-con,
	.elementor-element.havenara-mobile-grid-auto.e-grid > .elementor-element {
		height: auto !important;
		min-height: auto !important;
		align-self: start !important;
	}

	/* Fallback for hero grid blocks that still carry equal-row inline vars. */
	.elementor-element.havenara-hero-full .elementor-element.e-grid.e-con-full {
		grid-template-rows: auto !important;
		--grid-template-rows: auto !important;
		grid-auto-rows: auto !important;
	}
}

@media (max-width: 1024px) {
	.elementor-element.flex-half.e-con > .e-con,
	.elementor-element.flex-half.e-con > .elementor-element {
		flex: 1 1 50% !important;
		max-width: 50% !important;
		width: 50% !important;
		--container-widget-width: 50% !important;
	}
}

@media (max-width: 767px) {
	.elementor-element.flex-half.e-con > .e-con,
	.elementor-element.flex-half.e-con > .elementor-element {
		flex: 1 1 100% !important;
		max-width: 100% !important;
		width: 100% !important;
		--container-widget-width: 100% !important;
	}
}

/* Do not constrain Elementor canvas sections. */
.elementor .elementor-section.elementor-section-boxed > .elementor-container {
	max-width: none;
}

.havenara-main .havenara-hero-description.elementor-widget-text-editor p,
.havenara-main .havenara-hero-description p {
    color: #ffffff;
    text-align: center;
    font-size: 1.5rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.havenara-main .havenara-hero-description-icon.elementor-widget-text-editor p,
.havenara-main .havenara-hero-description-icon p {
	font-size: 1rem;
}

.havenara-hero-logo img{
	max-width: 200px;
	margin: 0 auto 1rem;
}

/* Password-protected page layout (Havenara template only). */
article.post-password-required .havenara-header {
	text-align: center;
}

article.post-password-required .havenara-content {
	min-height: min(70vh, 720px);
	display: grid !important;
	place-items: center !important;
	padding: clamp(20px, 4vw, 48px);
}

article.post-password-required .post-password-form {
	width: min(100%, 720px);
	margin: 0;
	padding: clamp(20px, 4vw, 36px);
	border: 1px solid #d8dee4;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	display: grid;
	gap: 0.9rem;
}

article.post-password-required .post-password-form p {
	margin: 0;
	font-size: clamp(1rem, 0.92rem + 0.2vw, 1.125rem);
	line-height: 1.6;
}

article.post-password-required .post-password-form input[type='password'] {
	width: 100%;
	min-height: 52px;
	padding: 0.75rem 0.9rem;
	border: 1px solid #c7d0dc;
	border-radius: 8px;
	font-size: 1rem;
	font-family: var(--havenara-font-body);
	box-sizing: border-box;
}

article.post-password-required .post-password-form input[type='submit'] {
	min-height: 52px;
	padding: 0.75rem 1.4rem;
	border: 0;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	font-family: var(--havenara-font-body);
	cursor: pointer;
	background: #0d5e78;
	color: #ffffff;
}

@media (max-width: 767px) {
	article.post-password-required .post-password-form input[type='submit'] {
		width: 100%;
		margin-top: 0.75rem;
	}
}

/* Final mobile overrides (placed last to beat earlier rules/cached order). */
@media (max-width: 767px) {
	.havenara-hero-title h1,
	.havenara-hero-title h2 {
		font-size: 2.2rem !important;
	}

	.havenara-main .havenara-hero-description.elementor-widget-text-editor p,
	.havenara-main .havenara-hero-description p {
		font-size: 1rem !important;
		margin-top: 0.5rem !important;
	}
}

/* Contact Form 7 override for Havenara landing page. */
.havenara-main .wpcf7 {
	--havenara-cf7-panel: #fff;
	--havenara-cf7-label: #2f3337;
	--havenara-cf7-field-bg: #ffffff;
	--havenara-cf7-field-border: #b9b9b9;
	--havenara-cf7-submit-bg: #2f3639;
	--havenara-cf7-submit-bg-hover: #252b2e;
	--havenara-cf7-focus: #1f6b88;
	font-family: var(--havenara-font-body);
}

.havenara-main .wpcf7 form {
	background: var(--havenara-cf7-panel);
	padding: 24px;
	max-width: 360px;
	margin: 0;
	border-radius: 0;
	box-sizing: border-box;
	border:1px solid #D9D9D9;
}

.havenara-main .wpcf7 form p {
	margin: 0 0 0;
	font-size: 0;
	line-height: 1;
}

.havenara-main .wpcf7 form p:last-of-type {
	margin-bottom: 0;
}

.havenara-main .wpcf7 label {
	display: block;
	margin: 0;
	font-family: var(--havenara-font-body);
	font-size: 1rem;
	line-height: 1.3;
	font-weight: 400;
	color: var(--havenara-cf7-label);
}

.havenara-main .wpcf7 .wpcf7-form-control-wrap {
	display: block;
	margin-top: 8px;
}

.havenara-main .wpcf7 input[type='text']:focus,
.havenara-main .wpcf7 input[type='email']:focus,
.havenara-main .wpcf7 input[type='tel']:focus,
.havenara-main .wpcf7 input[type='text'],
.havenara-main .wpcf7 input[type='email'],
.havenara-main .wpcf7 input[type='tel'] {
	width: 100%;
	min-height: 40px;
	padding: 10px 12px;
	border: 1px solid var(--havenara-cf7-field-border);
	background: var(--havenara-cf7-field-bg);
	border-radius: 0;
	box-sizing: border-box;
	font-family: var(--havenara-font-body);
	font-size: 1rem;
	line-height: 1.3;
	color: #2e3135;
	appearance: none;
	margin-bottom:0;
}

.havenara-main .wpcf7 input[type='text']::placeholder,
.havenara-main .wpcf7 input[type='email']::placeholder,
.havenara-main .wpcf7 input[type='tel']::placeholder {
	color: #8a8f94;
}

.havenara-main .wpcf7 input[type='text']:focus,
.havenara-main .wpcf7 input[type='email']:focus,
.havenara-main .wpcf7 input[type='tel']:focus,
.havenara-main .wpcf7 input[type='checkbox']:focus {
	outline: none;
	outline-offset: 1px;
}

.havenara-main .wpcf7 .wpcf7-checkbox {
	display: grid;
	gap: 10px;
	margin-top: 4px;
}

.havenara-main .wpcf7 .wpcf7-list-item {
	display: block;
	margin: 0;
}

.havenara-main .wpcf7 .wpcf7-list-item label {
	display: grid;
	grid-template-columns: 18px 1fr;
	column-gap: 12px;
	align-items: start;
	font-size: 1rem;
	line-height: 1.4;
	cursor: pointer;
}

.havenara-main .wpcf7 input[type='checkbox'] {
	margin: 4px 0 0;
	width: 18px;
	height: 18px;
	border: 1px solid #80868b;
	border-radius: 3px;
	background: #ffffff;
	appearance: none;
	position: relative;
	cursor: pointer;
	flex-shrink: 0;
}

.havenara-main .wpcf7 input[type='checkbox']:checked {
	background: var(--havenara-cf7-submit-bg);
	border-color: var(--havenara-cf7-submit-bg);
}

.havenara-main .wpcf7 input[type='checkbox']:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.havenara-main .wpcf7 .wpcf7-list-item-label {
	display: block;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--havenara-cf7-label);
}

.havenara-main .wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	padding: 10px 16px;
	margin-top: 15px;
	border: 0;
	border-radius: 0;
	background: linear-gradient(90deg, #2e3538 0%, #24292d 100%);
	color: #ffffff;
	font-family: var(--havenara-font-body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color 160ms ease, transform 160ms ease;
	appearance: none;
}

.havenara-main .wpcf7 .wpcf7-submit:hover,
.havenara-main .wpcf7 .wpcf7-submit:focus-visible {
	background: linear-gradient(90deg, var(--havenara-cf7-submit-bg-hover) 0%, #1f2427 100%);
	transform: translateY(-1px);
}

.havenara-main .wpcf7 .wpcf7-spinner {
	vertical-align: middle;
	margin-left: 10px;
}

.havenara-main .wpcf7 .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 8px 10px;
	font-size: 0.8125rem;
	line-height: 1.4;
	border-width: 1px;
	border-radius: 0;
}

@media (max-width: 767px) {
	.havenara-main .wpcf7 form {
		max-width: 100%;
		padding: 18px;
	}

	.havenara-main .wpcf7 label,
	.havenara-main .wpcf7 .wpcf7-list-item-label {
		font-size: 1rem;
	}

	.havenara-main .wpcf7 .wpcf7-submit {
		font-size: 1rem;
	}
}

.havenara-whatsapp-float {
	position: fixed;
	right: clamp(16px, 2.5vw, 32px);
	bottom: clamp(16px, 2.5vw, 32px);
	z-index: 9999;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 69px;
	height: 69px;
	overflow: visible;
	text-decoration: none;
	border-radius: 0;
	box-shadow: none;
	opacity: 1;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	-webkit-font-smoothing: antialiased;
	will-change: transform, opacity;
}

.havenara-whatsapp-float:hover,
.havenara-whatsapp-float:focus-visible {
	transform: translateY(-2px) scale(1.02);
}

.havenara-whatsapp-float.is-hiding {
	animation: havenara-whatsapp-out 280ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.havenara-whatsapp-float.is-showing {
	animation: havenara-whatsapp-in 340ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.havenara-whatsapp-float.is-hidden {
	opacity: 0;
	transform: translate3d(170%, 0, 0) scale(0.92);
	pointer-events: none;
}

.havenara-whatsapp-float img,
.havenara-whatsapp-float svg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transform: none;
	border-radius: 0;
}

@keyframes havenara-whatsapp-out {
	0% {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate3d(170%, 0, 0) scale(0.92);
	}
}

@keyframes havenara-whatsapp-in {
	0% {
		opacity: 0;
		transform: translate3d(170%, 0, 0) scale(0.92);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

body.havenara-modal-open {
	overflow: hidden;
}

.havenara-modal {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 18px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 220ms ease, visibility 220ms ease;
	z-index: 10020;
}

.havenara-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.havenara-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.58);
}

.havenara-modal__dialog {
	position: relative;
	width: min(100%, 590px);
	padding: clamp(22px,5vw, 64px);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
	transform: translateY(10px) scale(0.98);
	transition: transform 220ms ease;
	text-align: center;
	z-index: 1;
}

.havenara-modal.is-open .havenara-modal__dialog {
	transform: translateY(0) scale(1);
}

.havenara-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 999px;
	background: #eef2f5;
	color: #2e3135;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.havenara-modal__title {
	margin: 0;
	font-family: var(--havenara-font-display);
	font-size: 48px;
	line-height: 1.2;
	color: #7F8E7D;
}

.havenara-modal__message {
	margin: 0.85rem 0 0;
	font-family: var(--havenara-font-body);
	font-size: 20px;
	line-height: 1.65;
	color: #2C3131;
	white-space: normal;
	text-align: center;
}

.havenara-modal__message p {
	margin: 0.65rem 0 0;
}

.havenara-modal__message p:first-child {
	margin-top: 0;
}

@media (max-width: 767px) {
	.havenara-modal__title {
		font-size: 40px;
	}

	.havenara-modal__message {
		font-size: 16px;
	}
	.havenara-main .havenara-hero-description-icon p {
		font-size: .75rem !important;
	}
}

/* Phase 3: Lazy-loading images optimization - prevent layout shift */
img[loading="lazy"] {
	background: transparent;
	transition: opacity 200ms ease-in;
}

img[loading="lazy"]:not([src]) {
	opacity: 0.5;
}

/* Phase 3: Font loading strategy - ensure fallback fonts render during font load */
@font-face {
	font-display: swap;
	font-family: 'Inter';
	src: url('//fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700') format('css');
}

@font-face {
	font-display: swap;
	font-family: 'Philosopher';
	src: url('//fonts.googleapis.com/css2?family=Philosopher:wght@400;700') format('css');
}

/* Phase 3: Defer non-critical Elementor styles to reduce render-blocking */
link[data-lazy="true"] {
	display: none;
}

@media all {
	link[data-lazy="true"] {
		display: block;
	}
}