/*
Theme Name: Versatours
Theme URI: https://iam.yiannismakrakis.gr
Author: Yiannis Makrakis Digital Services
Author URI: https://iam.yiannismakrakis.gr
Description: Minimal performance-focused theme for the Versatours transfer booking website.
Version: 0.1.303
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: versatours
*/

:root {
	--vt-color-text: #163A40;
	--vt-color-muted: #5B6B6B;
	--vt-color-accent: #F0553A;
	--vt-color-surface: #fff;
	--vt-color-soft: #F0F6FA;
	--vt-width-content: 1180px;
	--vt-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--vt-color-surface);
	color: var(--vt-color-text);
	font-family: var(--vt-font-sans);
	font-size: 16px;
	line-height: 1.5;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
}

button,
input,
select,
textarea {
	font: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-main {
	flex: 1 0 auto;
}

.site-shell {
	width: min(100% - 32px, var(--vt-width-content));
	margin-inline: auto;
}

.site-header {
	border-bottom: 1px solid rgba(22, 58, 64, .1);
	background: #fff;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
}

.site-branding {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	letter-spacing: .01em;
	text-decoration: none;
}

.site-branding img {
	width: auto;
	max-height: 52px;
}

.site-nav ul {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.site-footer {
	padding: 32px 0;
	border-top: 1px solid rgba(22, 58, 64, .1);
	color: var(--vt-color-muted);
	font-size: 14px;
}

.entry-content:not(.entry-content--full) > * {
	max-width: var(--vt-width-content);
	margin-left: auto;
	margin-right: auto;
}

.entry-content:not(.entry-content--full) > .alignwide {
	max-width: min(100% - 32px, 1360px);
}

.entry-content:not(.entry-content--full) > .alignfull {
	max-width: none;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

/* Main header stays in the normal document flow. */
.vt-header-main {
	position: relative;
	z-index: 1000 !important;
}

/*
 * Compact header is fixed and initially hidden above the viewport.
 * z-index needs !important: Elementor's own per-element CSS for this
 * container computes z-index back to auto, which drops it below
 * .vt-header-main during the brief window both are visible on-screen
 * while scrolling back up (the compact header slides in before the
 * page has fully returned to scrollY 0), so the two headers' text
 * visibly overlap/ghost into each other instead of compact cleanly
 * covering main.
 */
.vt-header-compact {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 9999 !important;

	width: 100%;

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transform: translate3d(0, calc(-100% - 10px), 0);

	transition:
		transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
		opacity 180ms ease,
		visibility 0s linear 280ms;

	will-change: transform;
}

/* Compact header shown while scrolling upward. */
.vt-header-compact.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;

	transform: translate3d(0, 0, 0);

	transition-delay: 0s;
}

/*
 * Offset for the WordPress admin toolbar
 * while logged in.
 */
body.admin-bar .vt-header-compact {
	top: 32px;
}

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

/* Avoid animation for visitors who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.vt-header-compact {
		transition: none;
	}
}

/*
 * Make both headers editable inside Elementor instead of keeping
 * the compact header fixed over the editor.
 */
body.elementor-editor-active .vt-header-compact {
	position: relative;
	top: auto;

	opacity: 1;
	visibility: visible;
	pointer-events: auto;

	transform: none;
	transition: none;
}

/* Header Shadow */
.vt-header-compact {
	background: #ffffff;
	box-shadow: 0 8px 30px rgb(0 0 0 / 8%);
}

/* Homepage only: first container flush beneath the header */
:root {
	--vt-header-height: -120px;
}

.vt-hero,
.vt-home-hero {
	position: relative;
}

/* Inner Pages.
 *
 * Uses margin-top, NOT `top`. `position: relative` + `top` shifts an element
 * visually but leaves its original box occupying the layout - so pulling the
 * hero up by 120px moved the hero, but the 120px it vacated stayed reserved,
 * and everything after it kept its old position. That reserved slot was the
 * unexplained gap below the header.
 *
 * A negative margin-top removes the space as well as moving the element, so
 * the hero lands in the same place it does now and the content beneath it
 * closes up behind it. position: relative is kept above: the header
 * (.vt-header-main, z-index 1000) must still paint over the hero, and
 * relative positioning is what gives that stacking something to resolve
 * against.
 *
 * !important is required, for the same reason .vt-header-compact's z-index
 * needs it above: Elementor writes per-element CSS for a container's own
 * spacing controls, e.g.
 *   .elementor-1234 .elementor-element.elementor-element-abcd { margin-top: 0; }
 * That is roughly (0,3,0) against this rule's (0,1,0), and Elementor's
 * per-page stylesheet loads after the theme's - so a container that has ANY
 * margin value set in the Elementor panel silently wins and the hero never
 * moves. This is a real trap when converting `top` to `margin-top`: `top` is
 * a property Elementor does not manage, so the old version had no competition
 * and appeared to work, while the corrected property lands squarely on one
 * Elementor owns. Elementor's generated spacing is not itself !important,
 * so this takes precedence without needing a higher-specificity selector.
 */
.vt-hero {
	margin-top: var(--vt-header-height) !important;
}


/* Homepage only. */
body.home .vt-home-hero {
	top: var(--vt-header-height);
}

.vt-eyebrow-title .elementor-heading-title {
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	color: #f5a000;
}

.vt-eyebrow-title .elementor-heading-title::after {
	content: "";
	display: block;
	width: 40px;
	height: 2px;
	flex: 0 0 40px;
	background-color: currentColor;
}

.vt-booking-box {
	position: relative;
	z-index: 2;

	box-shadow:
		-22px 26px 58px rgba(7, 26, 56, 0.06),
		26px 30px 68px rgba(190, 116, 25, 0.055),
		0 8px 18px rgba(7, 26, 56, 0.07),
		0 40px 100px rgba(7, 26, 56, 0.09);
}

.vt-booking-inner {
	background: #fff;
	border: 1px solid rgba(7, 26, 56, 0.05);
	border-radius: 20px;

	box-shadow:
		0 2px 6px rgba(7, 26, 56, 0.025),
		0 10px 24px rgba(7, 26, 56, 0.04);
}

/*
 * Main nav menu's "Background" hover/active style (Elementor Pro Nav
 * Menu widget, e--pointer-background) paints an absolutely-positioned
 * ::before pseudo-element (inset:0) behind each item as the visible
 * highlight - the item itself has no background-color. Rounded to match
 * the site's pill-shaped chrome (CTA button, tourcarousel pager).
 */
.elementor-nav-menu--main.e--pointer-background .elementor-item:before {
	border-radius: 999px;
}

.elementor-location-header .vt-menu-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: #000;
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
	line-height: 0;
	padding: 0;
	text-decoration: none;
	transition: none;
}

.elementor-location-header .vt-menu-toggle:hover,
.elementor-location-header .vt-menu-toggle:focus,
.elementor-location-header .vt-menu-toggle:active {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #000 !important;
	outline: 0;
	text-decoration: none !important;
	transition: none;
}

.vt-menu.footer {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
	font-family: var(--e-global-typography-secondary-font-family);
	flex-direction: column;
	font-family: var( --e-global-typography-text-font-family ), Sans-serif;
}

.vt-menu.footer a {
	font-style: normal;
	font-weight: normal;
	text-decoration: none;
	color: inherit;
	font-size: 1rem;
	color: currentColor;
	transition: font-style 0.2s ease, font-weight 0.2s ease;
}

/* items: subtle, slowish staggered entrance + spacing after each li */
.animated-dashlist ul {
	padding: 0;
	list-style: none;
}

.animated-dashlist ul li {
	margin: 10px 0;
	line-height: 1.67em;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .8s ease-out, transform .8s ease-out;
	transition-delay: calc(var(--i, 0) * 150ms);
	list-style: none;
}

/* keep ALL direct children inline so mixed content doesn't break layout */
.animated-dashlist ul li > * {
	display: inline;
	margin: 0;
}

.animated-dashlist ul li > * + * {
	margin-left: .25em;
}

.animated-dashlist ul li::before {
	content: "";
	display: inline-block;
	vertical-align: middle;
	width: 0;
	height: 0;
	border-top: 1px solid currentColor;
	margin-right: 12px;
	transition: width .6s ease-out;
}

/* play animations when container is in view (your JS handles the class) */
.animated-dashlist.in-view ul li {
	opacity: 1;
	transform: translateX(0);
}

.animated-dashlist.in-view ul li::before {
	width: 20px;
}

/*
 * `.animated-checklist` - same staggered fade-in entrance as
 * `.animated-dashlist`, but a circled checkmark marker instead of a
 * growing dash, and a proper hanging indent for multi-line item text
 * (flex row per <li> instead of the dash-list's "everything inline"
 * trick, since checklist items are expected to wrap to 2-3 lines).
 * The stagger/in-view trigger is handled by
 * assets/js/animated-checklist.js (own small observer, not shared with
 * animated-dashlist's).
 */
.animated-checklist ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.animated-checklist ul li {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0 0 28px;
	line-height: 1.5;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .8s ease-out, transform .8s ease-out;
	transition-delay: calc(var(--i, 0) * 150ms);
}

.animated-checklist ul li:last-child {
	margin-bottom: 0;
}

.animated-checklist ul li::before {
	content: "\2713";
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	font-size: 13px;
	line-height: 1;
}

.animated-checklist.in-view ul li {
	opacity: 1;
	transform: translateX(0);
}

/*
 * `.two_columns_list` is combined with `.animated-dashlist` on the same
 * Elementor widget (e.g. the [vt_transfer_list] shortcode), but Elementor
 * puts widget-level CSS classes on the outer `.elementor-element` wrapper,
 * one level above the `<ul>` the shortcode actually renders. So these
 * rules target `.two_columns_list ul`/`li` (descendant selectors), not
 * `.two_columns_list` itself - matching the same ".. ul" pattern already
 * used above for `.animated-dashlist ul`, so the two combine correctly
 * instead of the grid landing on a wrapper with nothing to lay out.
 */
.two_columns_list ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 40px;
	row-gap: 12px;
	margin: 0;
	padding-left: 20px;
}

/*
 * Same specificity as `.animated-dashlist ul li` (one class + two type
 * selectors) but declared later, so this wins the cascade and the grid's
 * own row-gap isn't doubled up with the dash-list's li margin.
 */
.two_columns_list ul li {
	margin: 0;
	break-inside: avoid;
}

@media (max-width: 767px) {
	.two_columns_list ul {
		grid-template-columns: 1fr;
		column-gap: 0;
	}
}

/* Apple-style "story progress" dot pager for the "tourcarousel"
   Elementor Loop Carousel widget (Elementor Pro renders it as a
   standard Swiper.js instance - pagination:"bullets" - so the bullet
   markup and class names below, .swiper-pagination/.swiper-pagination-
   bullet/.swiper-pagination-bullet-active, come from Swiper itself, not
   this theme). The active bullet elongates into a track, and a ::after
   fill animates left-to-right across it - a timer for how long that
   slide has left before autoplay advances. The 5s duration matches this
   widget's own "autoplay_speed":5000 setting (Elementor > tourcarousel
   > Additional Options); update both together if that setting changes.
   Swiper swaps the -active class onto the next bullet on slide change,
   which removes/re-creates the ::after pseudo-element and restarts the
   animation from empty - no JS needed. */
.tourcarousel .swiper-pagination {
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	/* Swiper's "dynamic bullets" mode (auto-enabled when there are many
	   slides) applies its own inline-computed transform to this element
	   to slide a moving window of bullets into view, plus overflow:
	   hidden to clip the rest. That transform was shifting the bullets
	   sideways inside an otherwise correctly margin-centered box -
	   confirmed via computed styles (margin-left === margin-right, but
	   transform: matrix(...,-106,...) offsetting the content). Neutralize
	   both so all bullets render statically, centered, unclipped. */
	transform: none !important;
	overflow: visible !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap !important;
	/* 16px, not 8px: each bullet carries -4px horizontal margin as part of
	   its tap target, so 4px is eaten off each side of every gap. 16 - 8
	   leaves the 8px the dots are actually meant to sit apart by. */
	gap: 16px !important;
	width: max-content !important;
	max-width: calc(100% - 24px) !important;
	margin: 40px auto 0 !important;
	/* Bullets collapse to an 8px line (see their negative margin), so this
	   padding is most of the pill's height: 8 + 12 = ~20px. */
	padding: 6px 12px !important;
	border-radius: 999px !important;
	background: #ececec !important;
	text-align: center !important;
}

/* The dot is only 8px, far too small to tap reliably, so the bullet carries a
   transparent border purely as a tap target (borders receive pointer events),
   cancelled back out with an equal negative margin so layout and spacing are
   unchanged. Horizontal growth is capped at the 8px inter-bullet gap so
   neighbouring targets can't overlap and steal each other's taps; vertical
   growth is free, since nothing sits directly above or below.

   The dot itself is drawn by ::before rather than as the bullet's own
   background, and that part is NOT optional. border-radius applies to an
   element's OUTER edge, and the browser derives the inner corner radius as
   (outer radius - border width). With a transparent border that arithmetic
   drives the inner radius to zero, so a background painted inside it renders
   as a square - which is exactly what a first attempt at this produced. A
   pseudo-element takes its radius from its own 8x8 box, so it stays a true
   circle (and a clean pill when the active bullet widens to 32px). */
.tourcarousel .swiper-pagination-bullet {
	position: relative;
	transform: none !important;
	box-sizing: content-box !important;
	width: 8px !important;
	height: 8px !important;
	/* !important is essential, not decorative. Swiper ships its own bullet
	   margin at higher specificity (.swiper-horizontal > .swiper-pagination-
	   bullets .swiper-pagination-bullet), so without it this negative margin
	   is discarded, the 44px transparent border is left dictating the flex
	   line height, and the pager pill renders ~62px tall instead of ~20px. */
	margin: -18px -4px !important;
	border: 18px solid transparent;
	border-left-width: 4px;
	border-right-width: 4px;
	flex: 0 0 auto;
	background: transparent !important;
	opacity: 1;
	cursor: pointer;
	transition: width .3s ease;
}

/* Visible dot (inactive) / track (active). Fills the bullet's inner box
   exactly, so it is 8x8 normally and 32x8 once the active bullet widens. */
.tourcarousel .swiper-pagination-bullet::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #d9d9d9;
	transition: background-color .3s ease;
}

.tourcarousel .swiper-pagination-bullet-active {
	width: 32px !important;
}

.tourcarousel .swiper-pagination-bullet-active::before {
	background: rgba(0, 0, 0, .08);
}

/* Progress fill. Painted over ::before (later sibling, same stacking context)
   and revealed left-to-right with clip-path rather than scaleX. scaleX used to
   rely on overflow:hidden on the bullet to clip the squashed rounded ends back
   into a pill - that no longer works, because the transparent tap-target border
   flattens the bullet's inner radius, so its clip shape is now a plain
   rectangle. clip-path keeps this element's own border-radius intact and simply
   uncovers it, so the ends stay correctly rounded with no parent clipping. */
.tourcarousel .swiper-pagination-bullet-active::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: var(--vt-color-text);
	clip-path: inset(0 100% 0 0);
	animation: vt-tourcarousel-pager-fill 5s linear forwards;
}

.tourcarousel:hover .swiper-pagination-bullet-active::after {
	animation-play-state: paused;
}

@keyframes vt-tourcarousel-pager-fill {
	from {
		clip-path: inset(0 100% 0 0);
	}

	to {
		clip-path: inset(0 0 0 0);
	}
}

@media (max-width: 782px) {
	.site-header__inner {
		align-items: flex-start;
		flex-direction: column;
		padding: 18px 0;
	}

	.site-nav ul {
		flex-wrap: wrap;
		gap: 12px 18px;
	}
}


.elementor-location-header .vt-menu-toggle {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--vt-header-color);
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
	line-height: 0;
	padding: 0;
	text-decoration: none;
	transition: none;
}

.elementor-location-header .vt-menu-toggle:hover,
.elementor-location-header .vt-menu-toggle:focus,
.elementor-location-header .vt-menu-toggle:active {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--vt-header-color) !important;
	outline: 0;
	text-decoration: none !important;
	transition: none;
}

.elementor-location-header .vt-menu-toggle svg {
	color: var(--vt-header-color);
	display: block;
	height: 40px;
	transition: none;
	width: 50px;
}

.elementor-location-header .vt-menu-toggle svg [stroke] {
	stroke: var(--vt-header-color) !important;
	transition: none;
}

.elementor-location-header .vt-menu-toggle svg [fill]:not([fill="none"]) {
	fill: var(--vt-header-color) !important;
	transition: none;
}
