/* ============================================================================
 * Roamwell Unified Site-Wide Spacing, Padding, Margin & Gap System
 * Eliminates oversized vertical voids, doubled section gaps, mobile overflow,
 * cramped page-head subtitles, and clipped sticky sidebars.
 * ============================================================================ */

:root{
	--rw-sec:clamp(40px,4.5vw,60px);
	--rw-head-gap:clamp(20px,2.4vw,28px);
	--rw-gap:24px;
}

/* 0. Bulletproof responsive foundation: zero horizontal overflow at any viewport */
html,body{overflow-x:clip;max-width:100%}
.site-main{overflow-x:clip}
img,video,iframe{max-width:100%}
.rt-grid>*,.tours-layout>*,.v-hero__split>*,.story__inner>*,.hero--aside .hero__inner>*,.footer-grid>*{min-width:0}

/* 1. Consistent container gutters & high-contrast header brand */
.container{padding-inline:24px !important}
.site-header .brand__name,
.site-header .brand a{color:var(--rw-btn,var(--rw-accent,#0f172a)) !important}
body.header-bar .site-header .brand__name,
body.header-bar .site-header .brand a,
body.header-overlay .site-header:not(.is-scrolled) .brand__name,
body.header-overlay .site-header:not(.is-scrolled) .brand a{color:#ffffff !important}

/* 2. Unified section rhythm (use padding-block so .container.section keeps its horizontal gutters!) */
.section{padding-block:var(--rw-sec) !important}
.section--tight{padding-block:clamp(28px,3.5vw,44px) !important}
.section-head{margin-bottom:var(--rw-head-gap) !important;gap:16px 24px !important}
.category-hub-section{padding-block:clamp(36px,4vw,52px) !important}
.cta{padding-block:clamp(40px,4.5vw,56px) !important}
.newsletter{padding-block:clamp(36px,4.5vw,52px) !important}
.site-footer{padding-top:48px !important;padding-bottom:0 !important}
.footer-grid{padding-bottom:36px !important;gap:28px 36px !important}
.footer-bottom{padding-block:18px 24px !important;margin-top:0 !important}
.footer-powered{margin:0 !important;display:inline-flex;align-items:center}
.footer-powered a{
	display:inline-flex;align-items:center;
	padding:8px 20px;border-radius:16px;
	background:#ffffff;
	box-shadow:0 6px 18px rgba(0,0,0,.22);
	transition:transform .2s ease,opacity .2s ease;
}
.footer-powered a:hover{transform:translateY(-1px);opacity:1}
.footer-powered img{display:block;height:54px !important;width:auto !important;max-width:240px !important;object-fit:contain}

/* 3. Hero proportions (remove 300px+ empty vertical voids above/below hero) */
.hero.hero--photo{min-height:0 !important;padding:clamp(112px,11vw,152px) 0 clamp(88px,9vw,124px) !important}
.hero--photo .hero__inner{padding:0 !important}
.hero--photo .hero__actions{margin-top:24px !important}
.finder-wrap{margin-top:-44px !important;margin-bottom:24px !important}
.v-hero .finder-wrap{margin-top:24px !important;margin-bottom:0 !important}
.finder{padding:20px 24px 28px !important}
.finder.finder--stack,
.hero__card .finder{
	display:grid !important;
	grid-template-columns:1fr !important;
	gap:12px !important;
	padding:0 !important;
	box-shadow:none !important;
	background:transparent !important;
	width:100% !important;
	max-width:100% !important;
}
.finder.finder--stack .btn,
.hero__card .finder .btn{width:100% !important;justify-content:center}
.hero__card{overflow:hidden}

/* 4. Page headers: breathing room above overlapping sheets on desktop & mobile */
.page-head{padding:clamp(96px,9vw,124px) 0 clamp(48px,5.5vw,68px) !important}
.page-head h1{margin:0 0 10px !important}
.page-head .lead{margin:0 !important}

/* 5. Card grids & compact edge-to-edge tour card images */
.rt-grid{gap:24px !important}
.rt-card__media{display:block !important;width:100% !important;position:relative}
.rt-card__img,
.carousel .rt-card__img,
.rt-card--editorial .rt-card__img,
.rt-card--booking .rt-card__img,
.rt-card--journey .rt-card__img,
.rt-card--airy .rt-card__img{
	display:block !important;
	width:100% !important;
	height:215px !important;
	max-height:none !important;
	aspect-ratio:auto !important;
	overflow:hidden !important;
}
.rt-grid--list .rt-card__img{
	display:block !important;
	width:100% !important;
	height:100% !important;
	min-height:210px !important;
	max-height:none !important;
	aspect-ratio:auto !important;
	overflow:hidden !important;
}
.rt-card__img img,
.carousel .rt-card__img img,
.rt-card--editorial .rt-card__img img,
.rt-grid--list .rt-card__img img{
	width:100% !important;
	height:100% !important;
	object-fit:cover !important;
	display:block !important;
}
.rt-card--overlay>.rt-card__img{aspect-ratio:auto !important;max-height:none !important;height:100% !important}
.rt-card__body{padding:16px 18px !important}
.topic-tile{min-height:248px;gap:22px}

/* 5b. Category Hub cards: real category cover photo + dead-center icon */
.category-card__icon{
	display:inline-flex !important;
	align-items:center !important;
	justify-content:center !important;
	line-height:0 !important;
	padding:0 !important;
}
.category-card__icon svg{display:block !important;margin:0 !important;flex-shrink:0}
.category-card--photo{padding:0 !important;overflow:hidden !important}
.category-card__thumb{
	position:relative;
	width:100%;
	height:148px;
	overflow:hidden;
	background:var(--rw-soft,#f1f5f9);
}
.category-card__thumb img{
	width:100% !important;
	height:100% !important;
	object-fit:cover !important;
	display:block !important;
	transition:transform .55s cubic-bezier(.16,1,.3,1);
}
.category-card--photo:hover .category-card__thumb img{transform:scale(1.06)}
.category-card__thumb .category-card__badge{
	position:absolute;
	top:12px;
	right:12px;
	background:rgba(255,255,255,.92) !important;
	color:#0f172a !important;
	backdrop-filter:blur(6px);
	border:0 !important;
	box-shadow:0 2px 8px rgba(0,0,0,.1);
}
.category-card__inner{
	display:flex;
	flex-direction:column;
	flex:1 1 auto;
	padding:0 22px 20px;
	text-align:center;
}
.category-card--photo .category-card__icon{
	margin:-26px auto 12px !important;
	position:relative;
	z-index:2;
	background:#ffffff !important;
	border:3px solid #ffffff !important;
	box-shadow:0 6px 18px rgba(15,23,42,.12) !important;
	border-radius:14px !important;
}
.category-card--photo .category-card__body{margin-bottom:14px !important}
.category-card--photo .category-card__footer{
	display:flex;
	align-items:center;
	justify-content:space-between;
	margin-top:auto;
	padding-top:14px !important;
}

/* 6. Tours archive sticky filter sidebar: always fits inside 768px+ viewport */
.tours-layout{gap:28px !important;align-items:start}
.tours-side .filters{
	position:sticky;
	top:96px;
	max-height:calc(100vh - 112px);
	overflow-y:auto;
	scrollbar-width:thin;
	padding:18px !important;
	gap:12px !important;
}
.tours-side .filters__f{margin-bottom:0 !important}
.tours-side .filters__go{padding-top:6px}

/* 7. Trust credentials bar: never overflow horizontally on mobile */
.trust-credentials-bar{padding:22px 0 !important}
.trust-credentials-bar .container{width:100%;max-width:var(--rw-wrap,1200px);margin-inline:auto;padding-inline:24px}
.trust-credentials__grid{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(200px,1fr)) !important;gap:16px 24px !important;overflow:visible !important}

.booking-card__inq-title{font-size:1.35rem !important;line-height:1.25 !important}
.booking-card__top .booking-card__price{border-bottom:0 !important;padding-bottom:0 !important;margin-bottom:0 !important}
.booking-card .rt-form{border-top:0 !important;padding-top:0 !important;margin-top:0 !important}

/* 8. Back-to-top button: compact & clear of CTA copy */
.to-top{right:16px !important;bottom:16px !important;width:42px !important;height:42px !important}

/* 9. Tablet & small laptop (<= 1140px): keep header & finder from ever clipping */
@media (max-width:1140px){
	.header-search-bar{display:none !important}
	.finder:not(.finder--stack){grid-template-columns:repeat(2,minmax(0,1fr)) !important}
	.finder:not(.finder--stack) .btn{grid-column:1/-1;width:100%;justify-content:center}
	.rt-grid,.rt-grid--3{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}

@media (max-width:900px){
	.hero--aside .hero__inner,
	.v-hero__split,
	.story__inner,
	.tours-layout,
	.tour-layout{grid-template-columns:1fr !important;gap:24px !important}
	.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}

/* 10. Mobile (<= 768px) uniform gutters, touch targets, clean stacking, zero horizontal overflow */
@media (max-width:768px){
	.container,
	.trust-credentials-bar .container{padding-inline:16px !important}
	.header-inner{gap:8px !important}
	.brand__name{font-size:1rem !important;max-width:52vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
	.header-cta{display:none !important}
	.section{padding-block:36px !important}
	.section--tight{padding-block:24px 32px !important}
	.cta,.newsletter{padding-block:32px !important}
	.site-footer{padding-top:36px !important;padding-bottom:0 !important}
	.footer-grid{grid-template-columns:1fr !important;padding-bottom:24px !important;gap:24px !important}
	.footer-bottom{padding-block:16px 20px !important}
	.hero.hero--photo{padding:100px 0 72px !important}
	.hero--aside{padding:96px 0 48px !important}
	.hero__actions{flex-wrap:wrap;gap:10px}
	.finder-wrap{margin-top:-28px !important;margin-bottom:20px !important}
	.v-hero .finder-wrap{margin-top:20px !important;margin-bottom:0 !important}
	.finder,.finder:not(.finder--stack){grid-template-columns:1fr !important;padding:18px 16px 24px !important;gap:12px !important}
	.finder input,.finder select,.finder .btn{font-size:16px;min-height:46px}
	.page-head{padding:92px 0 56px !important}
	.rt-grid,.rt-grid--3{grid-template-columns:1fr !important;gap:16px !important}
	.rt-card__img,
	.carousel .rt-card__img,
	.rt-card--editorial .rt-card__img{height:195px !important}
	.trust-credentials__grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important}
	.tours-side .filters{position:static;max-height:none;overflow:visible}
	.topic-tile{min-height:208px;gap:18px}
	.results-bar{flex-wrap:wrap;gap:10px}
}
@media (max-width:480px){
	.trust-credentials__grid{grid-template-columns:1fr !important}
	.hero__actions .btn{width:100%;justify-content:center}
}
