/* ==========================================================================
   Locations — "Estudia en la sede que mejor se adapta para ti"
   Mobile-first
   ========================================================================== */

/* --- Section --- */
.locations {
	padding: 48px 0;
	background: #FFFFFF;
	overflow: hidden;
}

.locations > .container {
	padding-inline: 0;
}

/* --- Header --- */
.locations__header {
	padding-inline: var(--container-padding, 20px);
	text-align: center;
	margin-bottom: 24px;
}

.locations__title {
	font-family: var(--font-primary);
	font-size: 30px;
	font-weight: 700;
	line-height: 32px;
	letter-spacing: 0%;
	color: #03336A;
	margin: 0;
}

.locations__title-highlight {
	color: #016FDF;
}

/* --- Tabs --- */
.locations__tabs {
	display: flex;
	max-width: 900px;
	margin: 0 auto 42px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-left: var(--container-padding, 20px);
	padding-right: var(--container-padding, 20px);
	scroll-padding-left: var(--container-padding, 20px);
}

.locations__tabs::-webkit-scrollbar {
	display: none;
}

.locations__tab {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 16px 16px 20px;
	background: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	position: relative;
}

.locations__tab::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 8px;
	right: 8px;
	height: 6px;
	border-radius: 23px;
	background: #E9EBF1;
	transition: background 0.4s ease;
}

.locations__tab--active::after {
	background: #E9EBF1;
	overflow: hidden;
}

.locations__tab--active::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 8px;
	width: 0;
	max-width: calc(100% - 16px);
	height: 6px;
	border-radius: 23px;
	background: linear-gradient(90deg, #3F55DE 0%, #449AD4 50%, #33A3ED 100%);
	z-index: 1;
	animation: locations-progress 5s linear forwards;
}

@keyframes locations-progress {
	from { width: 0; }
	to { width: calc(100% - 16px); }
}

.locations__tab-icon {
	flex-shrink: 0;
	line-height: 0;
}

.locations__tab-icon--active {
	display: none;
}

.locations__tab-icon--inactive {
	display: inline-flex;
}

.locations__tab--active .locations__tab-icon--active {
	display: block;
}

.locations__tab--active .locations__tab-icon--inactive {
	display: none;
}

.locations__tab-info {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.locations__tab-name {
	font-family: var(--font-primary);
	font-size: 18px;
	font-weight: 700;
	line-height: 130%;
	letter-spacing: 0%;
	color: #647589;
}

.locations__tab--active .locations__tab-name {
	color: #016FDF;
}

.locations__tab-address {
	opacity: 0.55;
}

.locations__tab--active .locations__tab-address {
	opacity: 1;
}

.locations__tab-address {
	font-family: var(--font-primary);
	font-size: 14px;
	font-weight: 400;
	line-height: 120%;
	letter-spacing: 0%;
	color: #444444;
}

/* --- Carousel --- */
.locations__carousel {
	position: relative;
	overflow: hidden;
}

.locations__track {
	display: flex;
	gap: 80px;
	background: #FFFFFF;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 18px 0;
	width: max-content;
	margin: 0 auto;
}

/* --- Slide --- */
.locations__slide {
	flex-shrink: 0;
	width: calc(100vw - 40px);
	max-width: 900px;
	opacity: 0.2;
	transform: scale(0.92);
	transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.locations__slide--active {
	opacity: 1;
	transform: scale(1);
}

.locations__slide-inner {
	position: relative;
	border-radius: 24px;
	overflow: hidden;
	background: #FFFFFF;
	box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
}

/* --- Media wrapper --- */
.locations__media {
	position: relative;
	width: 100%;
	height: 232px;
}

/* --- Map + Image stacked --- */
.locations__map-wrap,
.locations__image-wrap {
	position: absolute;
	inset: 0;
}

.locations__map-wrap {
	display: none;
}

.locations__map-wrap iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.locations__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Toggle states: only one visible at a time */
.locations__image-wrap--hidden {
	display: none;
}

.locations__image-wrap--hidden + .locations__map-wrap,
.locations__media.show-map .locations__map-wrap {
	display: block;
}

.locations__media.show-map .locations__image-wrap {
	display: none;
}

/* --- Toggle Sede/Mapa --- */
.locations__toggle {
	position: absolute;
	bottom: 40px;
	left: 16px;
	z-index: 3;
	display: flex;
	background: #FFFFFF;
	border-radius: 60px;
	padding: 6px;
	border: 1px solid #BEC8D6;
	box-shadow: 0 4px 40px rgba(0, 0, 0, 0.10);
}

.locations__toggle-btn {
	padding: 8px 20px;
	border: none;
	background: #FFFFFF;
	font-family: var(--font-primary);
	font-size: 14px;
	font-weight: 700;
	line-height: 130%;
	letter-spacing: 0%;
	color: #03336A;
	cursor: pointer;
	transition: all 0.3s ease;
}

.locations__toggle-btn--active {
	background: #0798F9;
	color: #FFFFFF;
	border-radius: 48px;
}

/* --- Info Card --- */
.locations__info-card {
	position: relative;
	z-index: 2;
	padding: 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: #FFFFFF;
	border-radius: 20px 20px 0 0;
	margin-top: -30px;
}

.locations__info-title {
	font-family: var(--font-primary);
	font-size: 22px;
	font-weight: 700;
	line-height: 110%;
	letter-spacing: 0%;
	color: #016FDF;
	margin: 0;
}

.locations__info-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.locations__info-row svg {
	flex-shrink: 0;
	margin-top: 2px;
}

.locations__info-label {
	font-family: var(--font-primary);
	font-size: 10px;
	font-weight: 600;
	line-height: 120%;
	letter-spacing: 0%;
	text-transform: uppercase;
	color: #016FDF;
	display: block;
	margin-bottom: 2px;
}

.locations__info-text {
	font-family: var(--font-primary);
	font-size: 14px;
	font-weight: 500;
	line-height: 130%;
	letter-spacing: 0%;
	color: #444444;
	margin: 0;
}

/* --- Actions --- */
.locations__info-actions {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}

.locations__link {
	font-family: var(--font-primary);
	font-size: 15px;
	font-weight: 700;
	line-height: 130%;
	letter-spacing: 0%;
	color: #03336A;
	text-decoration: none;
}

.locations__waze-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px 13px 20px;
	background: #15CDFF;
	color: #232429;
	font-family: var(--font-primary);
	font-size: 16px;
	font-weight: 700;
	line-height: 130%;
	letter-spacing: 0%;
	border-radius: 29px;
	border: 1px solid #15CDFF;
	text-decoration: none;
	overflow: hidden;
	transition: background 0.3s ease;
}

.locations__waze-btn:hover {
	background: #0eb8e6;
	color: #232429;
}

/* ==========================================================================
   Tablet — min-width: 768px
   ========================================================================== */

@media (min-width: 768px) {

	.locations {
		padding: 56px 0;
	}

	.locations__title {
		font-size: 32px;
		line-height: 110%;
	}

	.locations__tabs {
		justify-content: center;
	}

	.locations__tab {
		flex: 0 0 auto;
		min-width: 200px;
		flex-direction: row;
		align-items: center;
		gap: 8px;
	}

	.locations__slide {
		width: 600px;
		max-width: 80vw;
	}

	.locations__track {
		gap: 40px;
	}

	.locations__media {
		height: 280px;
	}

	.locations__info-actions {
		flex-direction: row;
		align-items: center;
	}
}

/* ==========================================================================
   Desktop — min-width: 1024px
   ========================================================================== */

@media (min-width: 1024px) {

	.locations {
		padding: 64px 0;
	}

	.locations > .container {
		padding-inline: var(--container-padding, 20px);
	}

	.locations__tabs {
		padding-left: 0;
		padding-right: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.locations__title {
		font-size: 36px;
		line-height: 110%;
	}

	.locations__slide {
		flex: 0 0 900px;
	}

	.locations__slide-inner {
		position: relative;
		width: 900px;
		height: 395px;
		border-radius: 30px;
		overflow: hidden;
		background: #FFFFFF;
		box-shadow: 0 4px 40px rgba(0, 0, 0, 0.10);
	}

	.locations__toggle {
		bottom: 16px;
	}

	.locations__media {
		position: absolute;
		inset: 0;
		height: auto;
	}

	.locations__map-wrap,
	.locations__image-wrap {
		position: absolute;
		inset: 0;
	}

	.locations__info-card {
		position: absolute;
		right: 24px;
		top: 50%;
		transform: translateY(-50%);
		width: 377px;
		height: 351px;
		padding: 30px;
		border-radius: 20px;
		box-shadow: 0 7px 18px rgba(0, 0, 0, 0.32);
		z-index: 2;
		justify-content: space-between;
	}

	.locations__info-card {
		margin-top: 0;
		border-radius: 20px;
	}

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

	.locations__info-actions {
		flex-direction: row;
		align-items: center;
	}
}
