/* =================================================
 * Get Over It · Video Gallery — Frontend styles
 * Self-contained; works inside any theme.
 * ================================================= */

.goi-vsec{
	background: #0A3A30;
	color: #fff;
	padding: 80px 0;
	overflow: hidden;
	direction: rtl;
	text-align: right;
	font-family: "Google Sans", system-ui, -apple-system, "Segoe UI", "Heebo", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
/* Force the whole section + descendants to use the same family */
.goi-vsec, .goi-vsec *{ font-family: inherit; }
.goi-vsec *,
.goi-vsec *::before,
.goi-vsec *::after{ box-sizing: border-box; }

.goi-vsec__inner{
	max-width: 1200px;
	margin: 0 auto;
	padding-inline: 24px;
}

.goi-vsec__eyebrow{
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #155848;
	background: #F8F4ED;
	padding: 8px 16px;
	border-radius: 999px;
	margin-bottom: 18px;
}

.goi-vsec__heading{
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 800;
	letter-spacing: -.01em;
	color: #fff;
	margin: 0 0 14px;
	line-height: 1.2;
	text-align: center;
}

.goi-vsec__sub{
	color: #A8C7BC;
	max-width: 760px;
	margin: 0 auto 48px;
	text-align: center;
}

/* Center the head block */
.goi-vsec__inner > .goi-vsec__eyebrow,
.goi-vsec__inner > .goi-vsec__heading,
.goi-vsec__inner > .goi-vsec__sub{
	text-align: center;
	margin-inline: auto;
}
.goi-vsec__inner > .goi-vsec__eyebrow{
	display: block;
	width: fit-content;
}

/* ===== Carousel ===== */
.goi-vc{ position: relative; }

.goi-vc__viewport{
	overflow: hidden;
	border-radius: 8px;
	margin-inline: -4px;
	padding-inline: 4px;
}

.goi-vc__track{
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 14px;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y;
}
.goi-vc__track::-webkit-scrollbar{ display: none; }

.goi-vc__card{
	flex: 0 0 calc((100% - 36px) / 3);
	scroll-snap-align: start;
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	/* Strong gradient placeholder — visible even before any media loads */
	background: linear-gradient(135deg, #155848 0%, #0A3A30 60%, #0E4A3D 100%);
	aspect-ratio: 9 / 14;
	cursor: pointer;
	transition: transform .3s ease;
	box-shadow: 0 16px 40px rgba(0,0,0,.30);
	margin: 0;
	padding: 0;
}
/* Decorative video icon — visible when no poster is set in admin.
   Naturally hidden whenever a poster <img> covers the card. */
.goi-vc__card::before{
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.2' opacity='0.22'><rect x='2' y='6' width='15' height='12' rx='2'/><path d='M22 8l-5 4 5 4z'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 64px 64px;
	z-index: 0;
	pointer-events: none;
}
.goi-vc__card:hover{ transform: translateY(-4px); }
.goi-vc__card video,
.goi-vc__card img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.goi-vc__card video{
	position: absolute;
	inset: 0;
	z-index: 0;
}
.goi-vc__card img{
	opacity: .95;
	transition: opacity .3s ease, transform .3s ease;
}
.goi-vc__card:hover img{
	opacity: 1;
	transform: scale(1.04);
}

/* Poster overlay — guarantees a visible thumbnail on iOS / Android
   even before the user taps play. Fades out once playback begins. */
.goi-vc__card__poster{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
	pointer-events: none;
	transition: opacity .35s ease;
}

.goi-vc__card__overlay{
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.60) 100%);
	pointer-events: none;
	transition: opacity .3s ease;
	z-index: 2;
}

.goi-vc__card__play{ z-index: 3; }
.goi-vc__card__title{ z-index: 3; }

.goi-vc__card.is-playing .goi-vc__card__poster,
.goi-vc__card.is-playing .goi-vc__card__overlay,
.goi-vc__card.is-playing .goi-vc__card__play,
.goi-vc__card.is-playing .goi-vc__card__title{
	opacity: 0;
	pointer-events: none;
}

/* Buffering spinner — instant feedback on tap while the video loads */
.goi-vc__card.is-buffering .goi-vc__card__play{
	opacity: 0;
	pointer-events: none;
}
.goi-vc__card.is-buffering::after{
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 50%;
	border: 3px solid rgba(255,255,255,.30);
	border-top-color: #fff;
	animation: goi-vc-spin .9s linear infinite;
	z-index: 4;
	pointer-events: none;
	box-shadow: 0 6px 20px rgba(0,0,0,.40);
}
@keyframes goi-vc-spin{
	to { transform: rotate(360deg); }
}

.goi-vc__card__play{
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255,255,255,.95);
	color: #0E4A3D;
	display: grid;
	place-items: center;
	box-shadow: 0 10px 24px rgba(0,0,0,.30);
	transition: transform .25s ease, opacity .25s ease;
	z-index: 2;
	pointer-events: none;
}
.goi-vc__card:hover .goi-vc__card__play{
	transform: translate(-50%, -50%) scale(1.08);
}

.goi-vc__card__title{
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 14px;
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	text-shadow: 0 2px 8px rgba(0,0,0,.6);
	z-index: 2;
	pointer-events: none;
	transition: opacity .3s ease;
}

/* ===== Nav ===== */
.goi-vc__nav{
	position: absolute;
	top: 50%;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	color: #0E4A3D;
	display: grid;
	place-items: center;
	box-shadow: 0 10px 24px rgba(0,0,0,.30);
	transform: translateY(-50%);
	z-index: 5;
	cursor: pointer;
	border: 0;
	padding: 0;
	transition: background .2s ease, transform .2s ease, opacity .2s ease;
}
.goi-vc__nav:hover{
	background: #F8F4ED;
	transform: translateY(-50%) scale(1.06);
}
.goi-vc__nav:disabled{
	opacity: .35;
	cursor: default;
}
.goi-vc__nav:disabled:hover{
	transform: translateY(-50%);
	background: #fff;
}
.goi-vc__nav--prev{ right: -20px; }
.goi-vc__nav--next{ left:  -20px; }
.goi-vc__nav svg{ width: 22px; height: 22px; }

/* ===== Dots ===== */
.goi-vc__dots{
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	flex-wrap: wrap;
}
.goi-vc__dots button{
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,.25);
	border: 0;
	cursor: pointer;
	padding: 0;
	transition: background .25s ease, width .25s ease;
}
.goi-vc__dots button.is-active{
	background: #D4A93C;
	width: 28px;
	border-radius: 4px;
}

/* ===== Empty state ===== */
.goi-vc__empty{
	padding: 48px 24px;
	text-align: center;
	color: #A8C7BC;
	border: 1px dashed rgba(255,255,255,.20);
	border-radius: 18px;
	flex: 1 0 100%;
}

/* ===== Responsive ===== */
@media (max-width: 1100px){
	.goi-vc__card{ flex-basis: calc((100% - 18px) / 2); }
	.goi-vc__nav--prev{ right: -8px; }
	.goi-vc__nav--next{ left:  -8px; }
}
@media (max-width: 680px){
	.goi-vc__card{ flex-basis: 78%; }
	.goi-vc__nav{ display: none; }
	.goi-vc__track{ gap: 14px; padding-inline: 0; }
	.goi-vsec{ padding: 60px 0; }
}
