/* ==========================================================================
   Travelad Scroll Slider Shortcode - Frontend Stylesheet
   ========================================================================== */

.travelad-scroll-section {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* Sticky Inner Container */
.travelad-sticky-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	box-sizing: border-box;
	z-index: 10;
	transition: none;
}

/* Fixed Pinned State applied dynamically by JS when top reaches viewport */
.travelad-sticky-container.is-pinned {
	position: fixed !important;
	top: 0 !important;
	padding-left: 18% !important;
	padding-right: 18% !important;
	width: 100% !important;
	height: 100vh !important;
	z-index: 9 !important;
}

/* Bottom Unpinned State applied dynamically by JS when scrolled past */
.travelad-sticky-container.is-bottom {
	position: absolute !important;
	top: auto !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100vh !important;
}

/* Container Grid */
.travelad-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	max-width: 100%;
	width: 100%;
	margin: 0 auto;
	padding: 0px;
	align-items: center;
	position: relative;
	box-sizing: border-box;
}

/* Media Position Left Mode */
.travelad-container.media-position-left .travelad-text-column {
	order: 2;
}

.travelad-container.media-position-left .travelad-visual-column {
	order: 1;
}

.travelad-container.media-position-left .travelad-dots-navigation {
	right: auto;
	left: -32px;
}

/* ==========================================================================
   Left Column: Text Content Items
   ========================================================================== */
.travelad-text-column {
	position: relative;
	height: 380px;
	display: flex;
	align-items: center;
	overflow: hidden; /* Cleanly clips text exiting top or entering bottom */
}

.travelad-text-item {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	transform: translateY(-50%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 1;
	transition: none; /* Smooth 60fps RAF scroll interpolation */
}

.travelad-text-item.active {
	z-index: 5;
}

/* Text Typography Elements */
.travelad-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--travelad-eyebrow-color, #1f8bf5);
	background: var(--travelad-eyebrow-bg, rgba(31, 139, 245, 0.1));
	padding: 6px 14px;
	border-radius: 20px;
	margin-bottom: 18px;
}

.travelad-title {
	font-size: 33px;
	font-weight: 400;
	line-height: 1.15;
	color: var(--travelad-title-color, #0f172a);
	margin: 0 0 20px 0;
	letter-spacing: -0.5px;
	overflow-x: clip; 
  	display: block;
}

.travelad-title::first-line {
  /* Style your first word */
  color: #1490ff;

  /* Push everything after the first word to line 2 */
  word-spacing: 50em;
}

.travelad-desc {
	font-size: 17px;
	line-height: 1.6;
	color: var(--travelad-desc-color, #475569);
	margin: 0 0 28px 0;
	max-width: 480px;
}

.travelad-btn-wrapper {
	display: flex;
	align-items: center;
}

.travelad-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	font-size: 15px;
	font-weight: 600;
	color: var(--travelad-btn-color, #ffffff) !important;
	background-color: var(--travelad-btn-bg, #1f8bf5);
	border-radius: 12px;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(31, 139, 245, 0.3);
	transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
	border: 1px solid transparent;
}

.travelad-btn:hover {
	background-color: var(--travelad-btn-hover-bg, #0d76db);
	color: var(--travelad-btn-hover-color, #ffffff) !important;
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(31, 139, 245, 0.4);
}

/* ==========================================================================
   Right Column: Media Frame & Visual Stack
   ========================================================================== */
.travelad-visual-column {
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
}

.travelad-sticky-visual {
	position: relative;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* --- Frame Style 1: Phone Frame --- */
.travelad-phone-frame {
	position: relative;
	width: 320px;
	height: 600px;
	background: var(--travelad-frame-bg, #0f172a);
	border: 12px solid var(--travelad-frame-border, #1e293b);
	border-radius: 48px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 
	            0 0 0 1px rgba(255, 255, 255, 0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.travelad-phone-speaker {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	background: #334155;
	border-radius: 4px;
	z-index: 20;
}

.travelad-phone-notch {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 110px;
	height: 22px;
	background: #1e293b;
	border-bottom-left-radius: 14px;
	border-bottom-right-radius: 14px;
	z-index: 15;
}

.travelad-phone-statusbar {
	height: 32px;
	padding: 8px 20px 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	color: #ffffff;
	z-index: 10;
	background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
}

.travelad-phone-header {
	height: 44px;
	padding: 4px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border-bottom: 1px solid #e2e8f0;
	z-index: 10;
}

.phone-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, #1f8bf5, #3b82f6);
}

.phone-operator {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #0f172a;
}

.phone-verified-check {
	color: #1f8bf5;
	font-weight: bold;
}

.travelad-phone-home-indicator {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 120px;
	height: 4px;
	background: rgba(255, 255, 255, 0.6);
	border-radius: 4px;
	z-index: 20;
}

/* --- Frame Style 2: Rounded Card --- */
.travelad-card-frame {
	position: relative;
	width: 380px;
	height: 520px;
	background: #ffffff;
	border-radius: 28px;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12),
	            0 4px 12px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.8);
	box-sizing: border-box;
}

.travelad-card-frame .travelad-phone-speaker,
.travelad-card-frame .travelad-phone-notch,
.travelad-card-frame .travelad-phone-statusbar,
.travelad-card-frame .travelad-phone-header,
.travelad-card-frame .travelad-phone-home-indicator {
	display: none !important;
}

/* --- Frame Style 3: Clean Frameless --- */
.travelad-clean-frame {
	position: relative;
	width: 400px;
	height: 75vh;
	border-radius: 16px;
	overflow: hidden;
	box-sizing: border-box;
}

.travelad-clean-frame .travelad-phone-speaker,
.travelad-clean-frame .travelad-phone-notch,
.travelad-clean-frame .travelad-phone-statusbar,
.travelad-clean-frame .travelad-phone-header,
.travelad-clean-frame .travelad-phone-home-indicator {
	display: none !important;
}

/* Media Stack Container */
.travelad-media-stack {
	position: relative;
	width: 100%;
	height: 100%;
	flex: 1;
	background: transparent;
	overflow: hidden;
}

.travelad-media-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* Fade-out: smoothly reduce opacity, then flip visibility off at 0.5s */
    transition: 
        opacity 0.5s ease-in-out,
        visibility 0s linear 0.5s;
}

.travelad-media-item.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    /* Fade-in: immediately make visible, smoothly increase opacity */
    transition: 
        opacity 0.5s ease-in-out,
        visibility 0s linear 0s;
}

.travelad-media-item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
}

/* ==========================================================================
   Navigation Dots (Vertical)
   ========================================================================== */
.travelad-dots-navigation {
	position: absolute;
	right: -32px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 100;
	padding: 8px;
}

.travelad-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: var(--travelad-dot-inactive, #cbd5e1);
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
	display: block;
	border: none;
	outline: none;
}

.travelad-dot:hover {
	background-color: #94a3b8;
	transform: scale(1.2);
}

.travelad-dot.active {
	height: 28px;
	border-radius: 14px;
	background-color: var(--travelad-dot-active, #1f8bf5);
	box-shadow: 0 0 12px rgba(31, 139, 245, 0.4);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Device Optimization
   ========================================================================== */
@media screen and (min-width: 1440px) {
	.travelad-title {
		font-size: 42px;
	}
	.travelad-desc {
    	color: #737677;
		font-size: 22px;
	}
}
@media (max-width: 991px) {
	.travelad-container {
		grid-template-columns: 1fr;
		gap: 16px;
		padding: 16px 14px;
		max-width: 100%;
	}

	.travelad-text-column {
		height: 300px; /* Compact responsive height */
		text-align: center;
		justify-content: center;
	}

	.travelad-eyebrow {
		font-size: 11px;
		padding: 4px 10px;
		margin-bottom: 8px;
	}

	.travelad-title {
		font-size: 24px;
		line-height: 1.2;
		margin-bottom: 8px;
		text-align: left;
		margin-left: 15px;
	}

	.travelad-desc {
		font-size: 13.5px;
		line-height: 1.45;
		margin: 0 auto 12px auto;
		max-width: 92%;
		text-align: left;
	}

	.travelad-sticky-container.is-pinned .travelad-title, .travelad-sticky-container.is-pinned .travelad-desc {
		margin-left: 15px;
	}

	.travelad-btn-wrapper {
		justify-content: center;
	}

	.travelad-btn {
		padding: 10px 20px;
		font-size: 13px;
		border-radius: 8px;
	}

	.travelad-visual-column {
		width: 100%;
	}

	.travelad-phone-frame {
		width: 230px;
		height: 380px;
		border-width: 8px;
		border-radius: 32px;
	}

	.travelad-phone-speaker {
		width: 40px;
		height: 3px;
		top: 6px;
	}

	.travelad-phone-notch {
		width: 80px;
		height: 16px;
	}

	.travelad-phone-statusbar {
		height: 24px;
		padding: 4px 12px 0 12px;
		font-size: 9px;
	}

	.travelad-phone-header {
		height: 36px;
		padding: 2px 10px;
	}

	.phone-avatar {
		width: 20px;
		height: 20px;
	}

	.phone-operator {
		font-size: 10px;
	}

	.travelad-card-frame {
		width: 250px;
		height: 350px;
		border-radius: 20px;
	}

	.travelad-clean-frame {
		width: 260px;
		height: 350px;
		border-radius: 12px;
	}

	.travelad-dots-navigation {
		right: 4px;
		gap: 8px;
	}

	.travelad-dot {
		width: 8px;
		height: 8px;
	}

	.travelad-dot.active {
		height: 18px;
	}

	.travelad-sticky-container.is-pinned {
		
		padding-left: 8% !important;
		padding-right: 8% !important;
	}
}

@media (max-width: 480px) {
	.travelad-text-column {
		height: 375px;
	}

	.travelad-title {
		font-size: 24px;
	}

	.travelad-desc {
		font-size: 16px;
	}

	.travelad-phone-frame {
		width: 200px;
		height: 430px;
		border-width: 6px;
		border-radius: 24px;
	}

	.travelad-card-frame,
	.travelad-clean-frame {
		width: 100%;
		height: 500px;
	}

	.travelad-dots-navigation {
		right: 0px;
	}
}
