/* Intro page specific styles */

.main-wrapper {
	position: relative;
	width: 100%;
	min-height: 100vh;
	min-height: -webkit-fill-available;
	min-height: 100dvh;
	overflow: hidden;
	opacity: 0;
	animation: slideFromTop 1.5s ease forwards;
}

/* Animation keyframes */

@keyframes slideFromTop {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes headerSlideDown {
	from {
		opacity: 0;
		transform: translateY(-44px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes titleAnimation {
	from {
		opacity: 0;
		transform: translateX(40px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideFromRight {
	from {
		opacity: 0;
		transform: translateX(129.5px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideLeft {
	0% {
		transform: translateX(0);
		opacity: 1;
	}
	100% {
		transform: translateX(-100%);
		opacity: 0;
	}
}

@keyframes slideRight {
	0% {
		transform: translateX(0);
		opacity: 1;
	}
	100% {
		transform: translateX(100%);
		opacity: 0;
	}
}

@keyframes zoomIn {
	0% {
		transform: scale(0.5);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.vertical-line-left,
.vertical-line-center,
.vertical-line-right {
	z-index: 0;
}

/* Header styles */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	opacity: 0;
	animation: headerSlideDown 0.55s cubic-bezier(0, 0, 0, 1) forwards;
	animation-delay: 0.08s;
}

/* Scroll container */

.scroll-container {
	width: 100%;
	height: 100vh;
	height: -webkit-fill-available;
	height: 100dvh;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	position: relative;
	padding-left: 3rem;
}

/* Hide scrollbar but allow scrolling */

.scroll-container::-webkit-scrollbar {
	display: none;
}

.scroll-container {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* Grid Layout - Using dynamic column widths */

.grid-layout {
	display: grid;
	grid-template-rows: 36vh 36vh 28vh;
	gap: 8px;
	height: 100%;
	position: relative;
	width: 120%;
	min-width: max-content;
}

/* Grid cells */

.grid-cell {
	position: relative;
	z-index: 12;
	min-height: 150px;
	border-right: none;
	opacity: 0;
}

/* Animation classes */

.animate-title {
	opacity: 1;
}

/* Individual word animations */

.title-word {
	opacity: 0;
	transform: translateX(40px);
	display: inline-block;
	animation: titleWordAnimation 0.495s cubic-bezier(0, 0, 0, 1) forwards;
	/* animation-delay is set inline for each word via JavaScript */
}

@keyframes titleWordAnimation {
	from {
		opacity: 0;
		transform: translateX(40px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.animate-artist {
	animation: fadeIn 1s forwards;
	animation-delay: 0.5s;
}

.animate-etude {
	animation: slideFromRight 1s cubic-bezier(0, 0, 0, 1) forwards;
	will-change: transform, opacity;
	/* animation-delay is set inline for each etude via JavaScript */
}

/* Empty cells for spacing */

.empty-cell {
	width: 5vw;
	min-width: 50px;
	border: none;
}

/* Title cell styles */

.title-cell {
	padding: 1.5rem 0;
	display: flex;
	align-items: center;
	border-bottom: none;
}

.main-title {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-bold);
	font-size: var(--font-size-heading-extra-large);
	line-height: var(--line-height-heading-extra-large);
	letter-spacing: 5%;
	color: var(--color-text-primary);
}

/* Artist cell styles */

.artist-cell {
	position: relative;
	height: 100%;
	margin-top: 3rem;
}

/* Etude content */

.etude-content {
	padding-right: 1.75rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	position: relative;
	transition: all 0.3s ease;
	cursor: pointer;
}

/* Add margin-top for second row etudes */

.grid-cell[style*="grid-row: 2"] .etude-content {
	margin-top: calc(2rem - var(--header-height));
}

/* Add padding to all etude content elements */

.etude-content {
	margin-top: 3rem;
	padding-top: 2rem;
}

.etude-title {
	font-family: var(--font-primary);
	font-weight: var(--font-weight-normal);
	font-size: var(--font-size-heading-medium);
	line-height: var(--line-height-heading-medium);
	letter-spacing: 0px;
	margin-bottom: 0.5rem;
	color: var(--color-text-primary);
	transition: font-weight 0.3s ease;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.etude-title-text {
	flex: 1;
}

.etude-play-button {
	display: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin-left: 10px;
}

.etude-play-button i {
	color: #000;
	font-size: 10px;
	margin-left: 2px;
}

.etude-image-container {
	flex-grow: 1;
	position: relative;
	overflow: hidden;
	min-height: 150px;
}

.etude-image {
	width: auto;
	height: 100%;
	max-height: 220px;
	aspect-ratio: 16/9;
	object-fit: cover;
	filter: grayscale(100%);
	transition: all 0.3s ease;
}

/* Hover effects */

.etude-content:hover .etude-image {
	filter: none;
	transform: translateY(-1px);
}

.etude-content:hover .etude-title {
	font-weight: 700;
}

.etude-content:hover .etude-play-button {
	display: flex;
}

/* Center play button styles */

.center-play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	background-color: #4b5563;
	border: 1px solid #ced4da;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: -0.73px 0.73px 0.73px -1.46px rgba(255, 255, 255, 0.35) inset;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 5;
	cursor: pointer;
	transition: all 0.3s ease;
}

.center-play-button .icon-play {
	font-size: 16px;
	color: #ffffff;
	margin-left: 2px;
}

/* Play button */

.play-button {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.play-button i {
	color: #000;
	font-size: 10px;
	margin-left: 2px;
}

.fixed-calendar .icon {
	color: #111928;
	font-size: 40px;
}

/* Fixed calendar for all screen sizes */

.fixed-calendar {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 60px;
	height: 60px;
	background: var(--color-background);
	border: 1px solid var(--color-line);
	box-shadow: 0px 5px 12px 0px #0000001a;
	z-index: 90;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	transition: transform 0.3s ease;
}

/* Events slider */

.events-container {
	position: absolute;
	bottom: 20px;
	right: 20px;
	z-index: 91;
	max-width: 500px;
}

.artist-content {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 2.5rem 2.5rem 0;
	color: #ffffff;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	cursor: pointer;
}

.artist-subtitle {
	font-family: var(--font-primary);
	font-weight: 400;
	font-size: 32px;
	color: var(--color-text-secondary);
	margin-bottom: 0.25rem;
}

.artist-name {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-bold);
	font-size: 100px;
	line-height: 1;
	letter-spacing: -0.5px;
	padding-bottom: 1rem;
	color: transparent;
	background-image: linear-gradient(
		to right,
		var(--color-text-primary) 0%,
		var(--color-text-primary) var(--pct, 0%),
		var(--color-text-secondary) var(--pct, 0%),
		var(--color-text-secondary) 100%
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	white-space: nowrap;
	transition: background-position 0.3s ease;
}

.artist-content:hover .artist-name {
	background-position: left;
}

/* Add styles for the video player modal */

.video-player-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	display: none;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.video-player-modal.active {
	display: flex;
	opacity: 1;
}

/* Make sure the video player container has appropriate size in the modal */

.video-player-modal .video-player-container {
	width: 100%;
	height: auto;
	max-height: 100vh;
}

/* Animation classes */

.slide-left {
	animation: slideLeft 0.3s ease-in-out forwards;
}

.slide-right {
	animation: slideRight 0.4s ease-in-out forwards;
}

.zoom-in {
	animation: zoomIn 0.5s ease-in-out forwards;
}

/* Video intro styles */

.intro-video-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 150;
	background-color: rgba(0, 0, 0, 0.85);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s ease;
	visibility: hidden;
}

.intro-video-container.active {
	opacity: 1;
	pointer-events: all;
	visibility: visible;
}

.intro-video-wrapper {
	width: 100%;
	height: auto;
	max-height: 100%;
	aspect-ratio: 16/9;
	max-width: 1920px;
	position: relative;
	opacity: 0;
}

.intro-video-wrapper.active {
	animation: zoomIn 0.5s ease-in-out forwards;
	animation-delay: 0.6s;
}

.intro-video-skip {
	position: absolute;
	top: 20px;
	right: 20px;
	padding: 12px 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	z-index: 151;
	transition: background-color 0.3s ease;
	text-decoration: none;
}

.intro-video-skip:hover {
	background-color: rgba(23, 26, 31, 0.8);
}

.intro-video-skip span {
	color: var(--color-background);
	font-family: var(--font-primary);
	font-weight: var(--font-weight-medium);
	font-size: 16px;
	letter-spacing: 0.5px;
}

/* Video interaction blocker */

.video-interaction-blocker {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.6) 0%,
		rgba(0, 0, 0, 0) 20%,
		rgba(0, 0, 0, 0) 70%,
		rgba(0, 0, 0, 0.6) 100%
	);
	cursor: default;
}

/* Video controls for unmuting */

.video-controls {
	position: absolute;
	bottom: 20px;
	left: 20px;
	z-index: 10;
}

.teaser-control-btn {
	background-color: rgba(0, 0, 0, 0.6);
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.teaser-control-btn:hover {
	background-color: rgba(0, 0, 0, 0.8);
}

.teaser-control-btn .icon-play,
.teaser-control-btn .icon-pause,
.teaser-control-btn .icon-volume-up,
.teaser-control-btn .icon-volume-mute {
	font-size: 16px;
}

/* Large screens - 1440px and above */

@media (min-width: 1440px) {
	.grid-layout {
		grid-template-columns: 22.5% 22.5% 22.5% 22.5% 30%;
		width: 120%;
	}
}

/* Mobile styles */

@media (max-width: 768px) {
	.main-wrapper {
		overflow: hidden;
		min-height: 100vh;
		min-height: -webkit-fill-available;
		min-height: 100dvh;
	}
	.scroll-container {
		padding-left: 1rem;
		position: relative;
		height: 100vh;
		height: -webkit-fill-available;
		height: 100dvh;
	}
	.grid-layout {
		grid-template-rows: 1fr 1fr 1fr;
		/* Minimize row 1, equal height for etude rows */
		width: 100%;
	}
	.title-cell {
		grid-area: 1 / 1 / 1 / 2;
		padding-left: 1rem;
		align-items: center;
		margin-top: var(--header-height);
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 10;
	}
	.grid-cell.etude-odd {
		grid-row: 2 !important;
	}
	/* Tất cả etudes chẵn (hàng dưới) */
	.grid-cell.etude-even {
		grid-row: 3 !important;
	}
	/* Empty cells tương ứng với etudes */
	.grid-cell.empty-cell-odd {
		grid-row: 2 !important;
	}
	.grid-cell.empty-cell-even {
		grid-row: 3 !important;
	}
	.main-title {
		font-size: var(--font-size-heading-large);
		line-height: var(--line-height-heading-large);
	}
	/* Artist cell */
	.artist-cell {
		grid-row: 1 / 4 !important;
		/* Change from 1/4 to 2/4 to eliminate row 1 space */
		height: 100%;
	}
	.grid-cell {
		width: var(--etude-width-mobile);
		min-height: auto;
		border-right: none;
		border-bottom: none;
		scroll-snap-align: start;
	}
	.grid-cell[class*="empty-cell"] {
		width: var(--empty-cell-width-mobile);
		display: block;
		border: none;
	}
	.etude-content {
		padding: 0.5rem 0.75rem 0.5rem 1rem;
		margin-top: 0 !important;
	}
	.etude-image-container {
		height: 120px;
	}
	.etude-image {
		width: 100%;
		height: auto;
		max-width: 350px;
		aspect-ratio: 16/9;
		object-fit: cover;
		filter: grayscale(100%);
		transition: all 0.3s ease;
	}
	.artist-content {
		padding: 1.5rem;
	}
	.artist-subtitle {
		font-size: 24px;
		line-height: 1.5;
	}
	.artist-name {
		font-family: var(--font-heading);
		font-weight: var(--font-weight-bold);
		font-size: 76px;
		line-height: 1;
		margin-bottom: 2rem;
		letter-spacing: -0.5px;
		padding-bottom: 1rem;
		color: transparent;
		background-image: linear-gradient(
			to right,
			var(--color-text-primary) 50%,
			var(--color-text-secondary) 50%
		);
		background-size: 200% 100%;
		background-position: right;
		-webkit-background-clip: text;
		background-clip: text;
		transition: background-position 0.3s ease;
	}
}

/* Small mobile screens - Column layout only for screens <= 425px */

@media (max-width: 425px) {
	:root {
		--etude-width-mobile: 250px;
		--empty-cell-width-mobile: 250px;
	}
	.scroll-container {
		padding: 1rem;
		overflow-y: auto;
		overflow-x: hidden;
	}
	.grid-layout {
		display: flex;
		flex-direction: column;
		width: 100%;
		min-width: auto;
		height: auto;
		padding-top: var(--header-height);
	}
	.title-cell {
		position: relative;
		padding: 1rem 0;
		width: 100%;
		z-index: 10;
		order: 1;
		margin-top: 0;
	}
	/* Container for all etudes */
	.etudes-container {
		display: flex;
		flex-direction: column;
		width: 100%;
		gap: 2rem;
		order: 2;
	}
	.artist-cell {
		margin-top: 0;
		margin-bottom: 2rem;
		order: 3;
	}
	/* Hide all empty cells on small mobile */
	.grid-cell[class*="empty-cell"] {
		display: none;
	}
	.grid-cell.etude-odd,
	.grid-cell.etude-even {
		width: 100%;
		margin-bottom: 1.5rem;
		grid-row: auto !important;
	}
	.etude-content {
		padding: 0;
		margin: 0;
	}
	.etude-image-container {
		height: auto;
		position: relative;
	}
	.etude-image {
		aspect-ratio: 16/9;
		max-width: 100%;
	}
	/* Show center play button only on small mobile */
	.center-play-button {
		display: flex;
	}
	.main-title {
		font-size: 40px;
		line-height: 48px;
	}
	.artist-content {
		position: relative;
		padding: 0;
	}
	.intro-video-skip {
		top: 0;
		right: 0;
		padding: 0.5rem;
	}
	.artist-name.active {
		background-position: left;
	}
}

/* Màn hình trung bình - Từ 426px đến 768px */

@media (min-width: 426px) and (max-width: 768px) {
	:root {
		--etude-width-mobile: 300px;
		--empty-cell-width-mobile: 300px;
	}
}

.home .page-container {
	max-width: 100% !important;
}
