/* =========================================================================
   House Rules Section — Styles (v1.1.0)

   Layout logic
   - Desktop (>=1200px): two columns, image + content.
   - Laptop (1025–1199px): two columns, tighter spacing.
   - Tablet (<=1024px): stacked; image becomes a wide banner.
   - Mobile (<=767px): stacked, compact spacing, rules become a list.
   - The content column is also a CSS container, so the check-in cards,
     rules and footer adapt to the width they actually get (also when the
     widget sits inside a narrow Elementor column).
   Every selector starts with .hrul-wrapper so theme / Elementor Kit
   heading, paragraph and image styles cannot leak in.
   ========================================================================= */

.hrul-wrapper {
	width: 100%;
	box-sizing: border-box;
}

.hrul-wrapper *,
.hrul-wrapper *::before,
.hrul-wrapper *::after {
	box-sizing: border-box;
}

.hrul-wrapper .hrul-section {
	position: relative;
	background-color: #faf6f0;
	width: 100%;
	padding: var(--hrul-pad, 80px 64px);
	/* No overflow clipping (editor-safe): every decorative piece sits inside. */
}

.hrul-wrapper .hrul-decor {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 140px;
	height: 210px;
	color: #e6d3c0;
	opacity: 0.7;
	pointer-events: none;
	z-index: 0;
}

.hrul-wrapper.hrul-img-right .hrul-decor {
	right: auto;
	left: 20px;
	transform: scaleX(-1);
}

/* ---------------- Grid ---------------- */
.hrul-wrapper .hrul-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
	grid-template-areas: "image content";
	column-gap: var(--hrul-gap, 72px);
	row-gap: var(--hrul-gap, 72px);
	align-items: center;
	max-width: 1320px;
	margin: 0 auto;
}

.hrul-wrapper.hrul-valign-top .hrul-grid {
	align-items: start;
}

.hrul-wrapper.hrul-img-right .hrul-grid {
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
	grid-template-areas: "content image";
}

.hrul-wrapper .hrul-col-image {
	grid-area: image;
}

.hrul-wrapper .hrul-col-content {
	grid-area: content;
	min-width: 0;
	container-type: inline-size;
	container-name: hrulcontent;
}

.hrul-wrapper .hrul-col-content > :last-child {
	margin-bottom: 0 !important;
}

/* ---------------- Image column ---------------- */
.hrul-wrapper .hrul-col-image {
	position: relative;
	padding: 0;
}

.hrul-wrapper .hrul-col-image.hrul-has-panel {
	padding: 28px 0 0 28px;
}

.hrul-wrapper.hrul-img-right .hrul-col-image.hrul-has-panel {
	padding: 28px 28px 0 0;
}

.hrul-wrapper .hrul-col-image.hrul-has-quote {
	padding-bottom: 64px;
}

.hrul-wrapper .hrul-offset-panel {
	position: absolute;
	top: 0;
	left: 0;
	width: 72%;
	height: 62%;
	background-color: #a5613a;
	z-index: 0;
}

.hrul-wrapper.hrul-img-right .hrul-offset-panel {
	left: auto;
	right: 0;
}

.hrul-wrapper .hrul-image-frame {
	position: relative;
	z-index: 1;
	width: 100%;
	aspect-ratio: var(--hrul-img-ratio, 4 / 3);
	overflow: hidden;
	margin: 0;
	background-color: #e8ddc9;
}

.hrul-wrapper .hrul-image-frame img.hrul-image,
.hrul-wrapper .hrul-image-placeholder {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	object-position: center;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hrul-wrapper .hrul-image-placeholder {
	background: repeating-linear-gradient(45deg, #e8ddc9, #e8ddc9 10px, #ddcfb4 10px, #ddcfb4 20px);
}

.hrul-wrapper .hrul-quote-card {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	width: auto;
	max-width: min(260px, 78%);
	background-color: #fdf9f4;
	color: #3a281d;
	padding: 24px 26px;
	box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.18);
	font-size: 12px;
	letter-spacing: 1.5px;
	font-weight: 700;
	line-height: 1.7;
	text-transform: uppercase;
	overflow-wrap: break-word;
}

.hrul-wrapper.hrul-img-right .hrul-quote-card {
	left: auto;
	right: 0;
}

.hrul-wrapper .hrul-quote-card::after {
	content: "";
	display: block;
	width: 28px;
	height: 1px;
	background-color: currentColor;
	opacity: 0.4;
	margin-top: 12px;
}

/* ---------------- Header ---------------- */
.hrul-wrapper .hrul-eyebrow-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 16px 0;
}

.hrul-wrapper .hrul-eyebrow {
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 2.5px;
	font-weight: 700;
	color: #a5613a;
	text-transform: uppercase;
	min-width: 0;
}

.hrul-wrapper .hrul-eyebrow-line {
	height: 1px;
	width: 60px;
	background-color: #d8b596;
	flex-shrink: 0;
}

.hrul-wrapper .hrul-title {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 48px;
	font-weight: 400;
	font-style: normal;
	letter-spacing: 0;
	text-transform: none;
	color: #3a281d;
	margin: 0 0 16px 0;
	padding: 0;
	line-height: 1.15;
}

.hrul-wrapper .hrul-description {
	font-size: 16px;
	line-height: 1.7;
	color: #5c4d42;
	margin: 0 0 36px 0;
	padding: 0;
	max-width: 560px;
}

/* ---------------- Check-in / Check-out ---------------- */
.hrul-wrapper .hrul-cio-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 0 0 44px 0;
}

.hrul-wrapper .hrul-cio-card {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
	border: 1px solid #e3d2c0;
	border-radius: 6px;
	padding: 18px 22px;
	background-color: transparent;
	transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.hrul-wrapper .hrul-cio-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: #f0ddc9;
	color: #a5613a;
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hrul-wrapper .hrul-cio-icon svg,
.hrul-wrapper .hrul-rule-icon svg,
.hrul-wrapper .hrul-footer-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.hrul-wrapper .hrul-cio-text {
	min-width: 0;
}

.hrul-wrapper .hrul-cio-label {
	font-size: 13px;
	line-height: 1.3;
	font-weight: 700;
	color: #a5613a;
	margin-bottom: 4px;
}

.hrul-wrapper .hrul-cio-time {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 24px;
	line-height: 1.2;
	color: #3a281d;
	white-space: nowrap;
}

/* ---------------- Rules ---------------- */
.hrul-wrapper .hrul-rules-row {
	display: grid;
	grid-template-columns: repeat(var(--hrul-rule-count, 3), minmax(0, 1fr));
	row-gap: 32px;
	margin: 0 0 44px 0;
	padding-top: 6px;
	/* Each rule draws a divider on its left; the first one in every row
	   sits 1px outside and is clipped, so dividers are always "between". */
	overflow-x: clip;
}

.hrul-wrapper .hrul-rule {
	text-align: center;
	padding: 0 18px;
	margin-left: -1px;
	border-left: 1px solid #e3d2c0;
	min-width: 0;
	transition: transform 0.4s ease;
}

.hrul-wrapper .hrul-rule-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 16px auto;
	border-radius: 50%;
	background-color: #f0ddc9;
	color: #a5613a;
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s ease, color 0.4s ease;
}

.hrul-wrapper .hrul-rule-title {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 400;
	color: #3a281d;
	margin-bottom: 8px;
}

.hrul-wrapper .hrul-rule-desc {
	font-size: 13px;
	line-height: 1.6;
	color: #6b5d51;
	margin: 0;
	padding: 0;
}

/* ---------------- Footer ---------------- */
.hrul-wrapper .hrul-footer-divider {
	display: block;
	height: 1px;
	background-color: #e3d2c0;
	margin-bottom: 24px;
}

.hrul-wrapper .hrul-footer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 28px;
}

.hrul-wrapper .hrul-footer-left {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.hrul-wrapper .hrul-footer-icon {
	color: #c58860;
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	flex-shrink: 0;
	animation: hrulSpin 8s linear infinite;
}

@keyframes hrulSpin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.hrul-wrapper .hrul-footer-script {
	font-family: 'Brush Script MT', 'Segoe Script', cursive;
	font-style: italic;
	font-size: 22px;
	line-height: 1.3;
	color: #a5613a;
}

.hrul-wrapper .hrul-footer-note {
	font-size: 11px;
	letter-spacing: 1px;
	font-weight: 600;
	color: #a5613a;
	text-align: right;
	text-transform: uppercase;
	max-width: 280px;
	line-height: 1.6;
	flex-shrink: 1;
}

/* ---------------- Hover (real pointers only, no sticky hover on touch) ---------------- */
@media (hover: hover) and (pointer: fine) {
	.hrul-wrapper .hrul-image-frame:hover .hrul-image {
		transform: scale(1.05);
	}
	.hrul-wrapper .hrul-cio-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 16px 32px -12px rgba(165, 97, 58, 0.16);
	}
	.hrul-wrapper .hrul-cio-card:hover .hrul-cio-icon {
		transform: scale(1.1) rotate(-8deg);
	}
	.hrul-wrapper .hrul-rule:hover {
		transform: translateY(-4px);
	}
	.hrul-wrapper .hrul-rule:hover .hrul-rule-icon {
		transform: scale(1.1);
		background-color: #a5613a;
		color: #ffffff;
	}
}

/* ---------------- Entrance animation ---------------- */
.hrul-wrapper[data-entrance="true"] .hrul-entrance-item {
	opacity: 0;
	transform: translateY(24px);
}

.hrul-wrapper[data-entrance="true"] .hrul-entrance-item.hrul-in-view {
	animation-name: hrulFadeUp;
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	animation-fill-mode: forwards;
}

@keyframes hrulFadeUp {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.hrul-wrapper[data-entrance="true"] .hrul-entrance-item {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
	}
	.hrul-wrapper .hrul-footer-icon {
		animation: none !important;
	}
}

/* =========================================================================
   Content-column adaptations (follow the real width of the text column)
   ========================================================================= */

/* Footer: script and note stack once they no longer fit side by side. */
@container hrulcontent (max-width: 600px) {
	.hrul-wrapper .hrul-footer-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.hrul-wrapper .hrul-footer-note {
		text-align: left;
		max-width: none;
	}
}

/* Rules: tighter cells when columns get narrow. */
@container hrulcontent (max-width: 620px) {
	.hrul-wrapper .hrul-rule {
		padding: 0 12px;
	}
	.hrul-wrapper .hrul-rule-title {
		font-size: 17px;
	}
}

/* Rules: four items share a narrow column -> 2 x 2 grid. */
@container hrulcontent (max-width: 640px) {
	.hrul-wrapper .hrul-rules-row[data-count="4"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 28px;
	}
}

/* Rules: switch to a clean list (icon left, text right). */
@container hrulcontent (max-width: 480px) {
	.hrul-wrapper .hrul-rules-row {
		grid-template-columns: minmax(0, 1fr) !important;
		row-gap: 0 !important;
		padding-top: 0 !important;
		overflow-x: visible !important;
	}
	.hrul-wrapper .hrul-rule {
		display: grid !important;
		grid-template-columns: 48px minmax(0, 1fr) !important;
		grid-template-rows: auto auto;
		column-gap: 16px !important;
		align-items: center;
		text-align: left !important;
		margin-left: 0 !important;
		padding: 16px 0 !important;
		border-left: 0 !important;
		border-top: 1px solid #e3d2c0;
	}
	.hrul-wrapper .hrul-rule:first-child {
		border-top: 0 !important;
		padding-top: 0 !important;
	}
	.hrul-wrapper .hrul-rule:last-child {
		padding-bottom: 0 !important;
	}
	.hrul-wrapper .hrul-rule-icon {
		grid-row: 1 / span 2;
		width: 48px !important;
		height: 48px !important;
		font-size: 18px !important;
		margin: 0 !important;
	}
	.hrul-wrapper .hrul-rule-title {
		font-size: 17px !important;
		margin-bottom: 2px !important;
		align-self: end;
	}
	.hrul-wrapper .hrul-rule-desc {
		grid-column: 2;
		align-self: start;
	}
	.hrul-wrapper .hrul-rule-title:last-child {
		grid-row: 1 / span 2;
		align-self: center;
	}
}

/* Check-in / out: compact tiles (icon on top) when cards get narrow. */
@container hrulcontent (max-width: 420px) {
	.hrul-wrapper .hrul-cio-row {
		gap: 12px !important;
	}
	.hrul-wrapper .hrul-cio-card {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 12px !important;
		padding: 16px !important;
	}
	.hrul-wrapper .hrul-cio-icon {
		width: 40px !important;
		height: 40px !important;
		font-size: 16px !important;
	}
	.hrul-wrapper .hrul-cio-time {
		font-size: 20px !important;
	}
}

@container hrulcontent (max-width: 250px) {
	.hrul-wrapper .hrul-cio-row {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* =========================================================================
   Viewport breakpoints (match Elementor: tablet <=1024, mobile <=767)
   ========================================================================= */

/* Laptop */
@media (max-width: 1199px) {
	.hrul-wrapper .hrul-section {
		padding: var(--hrul-pad, 64px 40px);
	}
	.hrul-wrapper .hrul-grid {
		column-gap: var(--hrul-gap, 48px);
		row-gap: var(--hrul-gap, 48px);
	}
	.hrul-wrapper .hrul-title {
		font-size: 42px;
	}
	.hrul-wrapper .hrul-description {
		margin-bottom: 30px;
	}
	.hrul-wrapper .hrul-cio-card {
		padding: 16px 18px;
		gap: 14px;
	}
	.hrul-wrapper .hrul-cio-icon {
		width: 44px;
		height: 44px;
	}
	.hrul-wrapper .hrul-cio-time {
		font-size: 22px;
	}
	.hrul-wrapper .hrul-cio-row,
	.hrul-wrapper .hrul-rules-row {
		margin-bottom: 36px;
	}
	.hrul-wrapper .hrul-decor {
		width: 110px;
		height: 165px;
		opacity: 0.5;
	}
}

/* Tablet: stack the columns */
@media (max-width: 1024px) {
	.hrul-wrapper .hrul-section {
		padding: var(--hrul-pad, 64px 40px) !important;
	}
	.hrul-wrapper .hrul-grid,
	.hrul-wrapper.hrul-img-right .hrul-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-template-areas: "image" "content" !important;
		row-gap: var(--hrul-gap, 48px) !important;
		align-items: start !important;
	}
	.hrul-wrapper.hrul-stack-content-first .hrul-grid {
		grid-template-areas: "content" "image" !important;
	}
	.hrul-wrapper .hrul-col-image.hrul-has-panel,
	.hrul-wrapper.hrul-img-right .hrul-col-image.hrul-has-panel {
		padding-top: 24px !important;
		padding-left: 24px !important;
		padding-right: 0 !important;
	}
	.hrul-wrapper.hrul-img-right .hrul-offset-panel {
		left: 0 !important;
		right: auto !important;
	}
	.hrul-wrapper.hrul-img-right .hrul-quote-card {
		left: 0 !important;
		right: auto !important;
	}
	.hrul-wrapper .hrul-col-image.hrul-has-quote {
		padding-bottom: 56px !important;
	}
	.hrul-wrapper .hrul-offset-panel {
		width: 60% !important;
		height: 55% !important;
	}
	.hrul-wrapper .hrul-image-frame {
		aspect-ratio: var(--hrul-img-ratio, 16 / 9) !important;
		max-height: var(--hrul-img-max, 480px);
	}
	.hrul-wrapper .hrul-title {
		font-size: 40px !important;
	}
	.hrul-wrapper .hrul-description {
		max-width: 640px !important;
	}
	.hrul-wrapper .hrul-decor,
	.hrul-wrapper.hrul-img-right .hrul-decor {
		top: 12px !important;
		right: 12px !important;
		left: auto !important;
		transform: none !important;
		width: 90px !important;
		height: 135px !important;
		opacity: 0.4 !important;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.hrul-wrapper .hrul-section {
		padding: var(--hrul-pad, 48px 20px) !important;
	}
	.hrul-wrapper .hrul-grid,
	.hrul-wrapper.hrul-img-right .hrul-grid {
		row-gap: var(--hrul-gap, 36px) !important;
	}
	.hrul-wrapper .hrul-decor {
		display: none !important;
	}
	.hrul-wrapper .hrul-col-image.hrul-has-panel,
	.hrul-wrapper.hrul-img-right .hrul-col-image.hrul-has-panel {
		padding-top: 16px !important;
		padding-left: 16px !important;
	}
	.hrul-wrapper .hrul-col-image.hrul-has-quote {
		padding-bottom: 44px !important;
	}
	.hrul-wrapper .hrul-image-frame {
		aspect-ratio: var(--hrul-img-ratio, 4 / 3) !important;
		max-height: none !important;
	}
	.hrul-wrapper .hrul-quote-card {
		max-width: min(240px, 80%) !important;
		padding: 16px 18px !important;
		font-size: 11px !important;
		letter-spacing: 1.2px !important;
		line-height: 1.6 !important;
	}
	.hrul-wrapper .hrul-quote-card::after {
		margin-top: 8px !important;
	}
	.hrul-wrapper .hrul-eyebrow-row {
		gap: 12px !important;
		margin-bottom: 12px !important;
	}
	.hrul-wrapper .hrul-eyebrow {
		font-size: 11px !important;
		letter-spacing: 2px !important;
	}
	.hrul-wrapper .hrul-eyebrow-line {
		width: 40px !important;
	}
	.hrul-wrapper .hrul-title {
		font-size: 34px !important;
		margin-bottom: 12px !important;
	}
	.hrul-wrapper .hrul-description {
		font-size: 15px !important;
		line-height: 1.65 !important;
		margin-bottom: 28px !important;
		max-width: none !important;
	}
	.hrul-wrapper .hrul-cio-row {
		margin-bottom: 32px !important;
	}
	.hrul-wrapper .hrul-rules-row {
		margin-bottom: 32px !important;
	}
	.hrul-wrapper .hrul-footer-divider {
		margin-bottom: 20px !important;
	}
	.hrul-wrapper .hrul-footer-script {
		font-size: 20px !important;
	}
}

/* Small phones */
@media (max-width: 400px) {
	.hrul-wrapper .hrul-section {
		padding: var(--hrul-pad, 44px 16px) !important;
	}
	.hrul-wrapper .hrul-title {
		font-size: 30px !important;
	}
	.hrul-wrapper .hrul-quote-card {
		padding: 14px 16px !important;
	}
}
