/* =============================================================================
   Graphitium Carousel Widget
   Efect: primul card aliniat la stânga containerului, carusel se extinde
   full-width spre dreapta. La ultimul slide, invers.
   ============================================================================= */

/* ── Wrapper principal ──────────────────────────────────────────────────────── */

.gc-carousel {
	position: relative;
	width: 100%;
	/* Variabilele sunt setate de JS */
	--gc-offset-left: 0px;
	--gc-card-width: 400px;
	--gc-gap: 20px;
	--gc-translate: 0px;
}

/* ── Viewport — breakout full-width ─────────────────────────────────────────── */
/*
   Trucul cheie:
   - Lărgim viewport-ul la 100vw
   - Îl mutăm cu marginLeft negativ egal cu distanța de la stânga viewport-ului
     până la stânga containerului Elementor
   - overflow: hidden ascunde ce depășește spre stânga
   - Primul card din track pornește de la var(--gc-offset-left) — poziția containerului
*/

.gc-carousel__viewport {
	width: 100vw;
	overflow: hidden;
	margin-left: calc(-1 * var(--gc-offset-left));
}

/* ── Track — banda de slide-uri ──────────────────────────────────────────────── */

.gc-carousel__track {
	display: flex;
	align-items: stretch;
	will-change: transform;
	/* translateX = offset-left (aliniere container) + slide offset (navigare) */
	transform: translateX(calc(var(--gc-offset-left) + var(--gc-translate, 0px)));
	/* Tranziția e controlată din JS (e scoasă temporar la resize) */
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Slide ───────────────────────────────────────────────────────────────────── */

.gc-carousel__slide {
	flex: 0 0 var(--gc-card-width);
	width: var(--gc-card-width);
	min-width: 0;
}

.gc-carousel__slide-inner {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	cursor: default;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.gc-carousel__slide-inner {
	cursor: pointer;
}

a.gc-carousel__slide-inner:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2) !important;
}

/* ── Overlay pe imaginea de fundal ──────────────────────────────────────────── */

.gc-carousel__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

/* ── Conținut (titlu, desc, buton) ──────────────────────────────────────────── */

.gc-carousel__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 32px 28px;
	justify-content: flex-end;
	box-sizing: border-box;
}

/* Badge */
.gc-carousel__badge {
	display: inline-block;
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 10px;
	color: #ffffff;
}

/* Titlu */
.gc-carousel__title {
	margin: 0 0 10px;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.3;
	color: #ffffff;
	/* min-height e setat via control când "Align elements" e activ */
}

/* Descriere — flex: 1 împinge butonul mereu la fund */
.gc-carousel__desc {
	flex: 1;
	margin: 0 0 20px;
	font-size: 0.9rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
}

.gc-carousel__desc:last-child {
	margin-bottom: 0;
}

/* Buton */
.gc-carousel__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	padding: 10px 22px;
	background-color: #ff6600;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: opacity 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}

.gc-carousel__btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	text-decoration: none;
	color: #ffffff;
}

/* ── Aliniere cross-card (Align elements) ────────────────────────────────────── */
/*
   Când e activat, conținutul pornește de sus (flex-start).
   Titlul are min-height setat via control → descrierile pornesc de la același nivel.
   Descrierea are flex:1 → umple spațiul → butonul rămâne mereu la fund.
*/

.gc-align-elements .gc-carousel__content {
	justify-content: flex-start !important;
}

.gc-align-elements .gc-carousel__desc {
	flex: 1;
}

.gc-align-elements .gc-carousel__btn {
	margin-top: auto;
	align-self: flex-start;
}

/* ── Arrow animation (identică cu .arrow-button de pe site) ─────────────────── */

.gc-arrow-btn .gc-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	/* Lățime fixă = iconul + spațiu de ieșire pentru animație */
	width: 1.2em;
	height: 1.2em;
	flex-shrink: 0;
}

.gc-arrow-btn .gc-btn-icon svg,
.gc-arrow-btn .gc-btn-icon i {
	position: absolute;
	transition: transform 0.35s ease, opacity 0.35s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gc-arrow-btn:hover .gc-btn-icon svg,
.gc-arrow-btn:hover .gc-btn-icon i {
	animation: gcArrowRun 0.55s ease forwards;
}

@keyframes gcArrowRun {
	0% {
		transform: translateX(0);
		opacity: 1;
	}
	45% {
		transform: translateX(120%);
		opacity: 0;
	}
	46% {
		transform: translateX(-120%);
		opacity: 0;
	}
	100% {
		transform: translateX(0);
		opacity: 1;
	}
}

/* Icon în buton */
.gc-btn-icon {
	flex-shrink: 0;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

.gc-btn-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.gc-btn-icon i {
	line-height: 1;
}

.gc-btn-text {
	line-height: inherit;
}

/* ── Bottom bar (progress + arrows) ─────────────────────────────────────────── */
/*
   Bara de jos e aliniată la lățimea containerului (widget-ul e deja în container).
   Structură flex: [progress track ──────────────] [←] [→]
*/

.gc-carousel__bottom {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 16px;
	width: 100%;
}

/* ── Progress bar ────────────────────────────────────────────────────────────── */

.gc-carousel__progress-track {
	flex: 1;
	height: 4px;
	background-color: rgba(0, 0, 0, 0.12);
	border-radius: 4px;
	overflow: hidden;
	min-width: 40px;
}

.gc-carousel__progress-fill {
	height: 100%;
	width: 0%;
	background-color: #ff6600;
	border-radius: inherit;
	transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Navigare (săgeți) ───────────────────────────────────────────────────────── */

.gc-carousel__nav {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* Săgeți la mijloc (floating pe lateralele caruselului) */
.gc-nav--middle {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: 0;
	right: 0;
	justify-content: space-between;
	pointer-events: none;
	padding: 0 16px;
	box-sizing: border-box;
	margin-top: 0;
}

.gc-nav--middle .gc-carousel__arrow {
	pointer-events: auto;
}

/* Butonul săgeată */
.gc-carousel__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
	flex-shrink: 0;
}

.gc-carousel__arrow:hover {
	background: #1a1a2e;
	color: #ffffff;
	transform: scale(1.08);
}

.gc-carousel__arrow:hover svg {
	stroke: #ffffff;
}

.gc-carousel__arrow:disabled,
.gc-carousel__arrow.gc-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	transform: none;
}

.gc-carousel__arrow svg {
	width: 18px;
	height: 18px;
	display: block;
	stroke: #1a1a2e;
	transition: stroke 0.2s ease;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media ( max-width: 1024px ) {
	.gc-carousel__title {
		font-size: 1.15rem;
	}
}

@media ( max-width: 767px ) {
	.gc-carousel__content {
		padding: 20px 16px;
	}

	.gc-carousel__title {
		font-size: 1rem;
	}

	.gc-carousel__desc {
		font-size: 0.825rem;
	}
}
