@import url('https://fonts.googleapis.com/css2?family=Red+Rose&display=swap');


.movie-posters .poster:nth-child(4n) {
	position: relative;
	overflow: hidden; /* keeps tint inside border-radius */
}

.movie-posters .poster:nth-child(4n)::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		/* Top-right vignette */
		radial-gradient(
			circle farthest-corner at 100% 0%,
			rgba(0, 0, 0, 0.8) 0%,
			rgba(0, 0, 0, 0.6) 20%,
			rgba(0, 0, 0, 0) 50%
		),
		/* Bottom-left vignette */
		radial-gradient(
			circle farthest-corner at 0% 100%,
			rgba(0, 0, 0, 0.8) 0%,
			rgba(0, 0, 0, 0.6) 20%,
			rgba(0, 0, 0, 0) 50%
		);
	border-radius: 10px;
	z-index: 1;
	pointer-events: none;
}

.movie-posters .poster:nth-child(4n) img {
	position: relative;
	z-index: 0;
	display: block;
	border-radius: 10px;
}

/* Highlight Section Styles */
.highlight-section {
	background: url('../../images/project-highlight-bg.webp') no-repeat center center / cover;
	padding: 2rem 0;
	position: relative;
	margin-top: 10vh;
	font-family: 'Red Rose', serif;
}


/* Hide by default on desktop */
.hamburger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 25px;
	height: 20px;
	background: transparent;
	border: none;
	cursor: pointer;
	z-index: 10;
}

.hamburger span {
	display: block;
	height: 3px;
	width: 100%;
	background: white;
	border-radius: 2px;
	transition: 0.3s;
}

.highlight-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 1;
}

.container {
	position: relative;
	z-index: 2;
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 1rem;
	font-family: 'Red Rose', serif;
}

/* Top Highlight Section */
.highlight-top {
	text-align: center;
}

.highlight-nav-bar {
	display: flex;
	margin: 50px 0;
	justify-content: space-between;
}

.highlight-nav-bar h1 {
	font-size: 3rem;
	padding: 0 0 0 60px;
	color: white;
	/* z-index: 1; */
}

.genre-nav {
	z-index: 1;
	background-color: rgba(44,
			39,
			39,
			0.8);
	/* Semi-transparent background */
	padding: 20px 30px;
	display: flex;
	gap: 60px;
	align-items: center;

	clip-path: polygon(20px 0%, 100% 0%, 100% 100%, 0% 100%);
}

.genre-nav a {
	text-decoration: none;
	color: #cccccc;
	font-size: 18px;
	padding-bottom: 5px;
	/* Space for the underline */
	border-bottom: 2px solid transparent;
	/* Transparent underline by default */
	transition: color 0.3s, border-bottom-color 0.3s;
}

.genre-nav a:hover {
	color: #ff9900;
	border-bottom-color: #ff9900;
}

.genre-nav a.active {
	color: #ff9900;
	/* Orange color for the active link */
	border-bottom-color: #ff9900;
	/* Orange underline for the active link */
	font-weight: bold;
	/* Make active link bold */
}

.movie-posters {
	display: flex;
	justify-content: center;
	gap: 2.5rem;
	flex-wrap: wrap;
}

.poster {
	width: 230px;
	transition: transform 0.3s ease;
	cursor: pointer;
}

.poster:hover {
	transform: scale(1.05);
}

.poster img {
	width: 100%;
	border-radius: 10px;
}

/* Bottom Highlight Section */
.highlight-bottom {
	margin-top: 4rem;
	/* Increased top margin for more space */
	padding-bottom: 1rem;
	/* Increased top padding */
	border-bottom: 2px solid #3498db;
}

.highlight-bottom-yellow-border {
	border-bottom: 2px solid #EBA219;
	margin: 15px 0;
}

.movie-details-container {
	display: flex;
	gap: 5rem;
	/* Increased gap for more space between poster and info */
	align-items: center;
	/* Vertically aligns the poster and info block to their center */
	padding: 0 50px;
}

.movie-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 30px;
}

.movie-poster-details {
	position: relative;
	text-align: center;
	width: 330px;
	height: auto;
	flex-shrink: 0;
	z-index: 1;
	padding: 50px 50px 20px 50px;
	box-sizing: border-box;
	border-radius: 15px;
	overflow: hidden;
}

.movie-poster-details::before {
	content: "";
	position: absolute;
	inset: 0;
	/* Use a CSS variable for the background image */
	background-image: linear-gradient(to top,
			rgba(0, 0, 0, 0.8) 0%,
			rgba(0, 0, 0, 0.4) 40%,
			rgba(0, 0, 0, 0.3) 80%,
			rgba(0, 0, 0, 0.3) 100%),
		var(--bg-image, url("/images/kgf2.png"));
	/* Fallback to KGF2 */
	background-size: cover;
	background-position: center;
	filter: blur(3px);
	border-radius: 15px;
	z-index: -1;
	/* Add a smooth transition for the background change */
	transition: background-image 0.5s ease-in-out;
}


.movie-poster-details img {
	width: 100%;
	border-radius: 10px;
	display: block;
}

.movie-text {
	margin-top: 5px;
	/* controls the gap between image and text */
	text-align: center;
}

.movie-text h3 {
	font-family: 'Red Rose', serif;
	color: #ffffff;
	font-size: 2.2rem;
	margin: 0;
}

.movie-text p {
	color: #ccc;
	font-size: 1.5rem;
	margin: 5px 0 0 0;
}


.movie-info {
	flex-grow: 1;
}

.cast-bubbles {
	display: flex;
	gap: 20px;
	/* Replaced negative gap with positive space */
	margin-bottom: 2rem;
	/* Added more space below the bubbles */
}

.cast-bubbles img {
	width: 80px;
	/* Increased size of bubbles */
	height: 80px;
	border-radius: 50%;
	border: 3px solid #fff;
	/* Slightly thicker border */
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	transition: transform 0.3s ease-in-out;
}

.movie-description {
	font-size: 1.2rem;
	/* Slightly larger text */
	line-height: 1.7;
	margin-bottom: 2rem;
	/* More space below description */
	max-width: 700px;
	/* Allow description to be a bit wider */
	color: #e0e0e0;
	/* A slightly brighter white */
}

.movie-credits p {
	margin: 0.5rem 0;
	color: #ccc;
	font-size: 1.1rem;
    transition: transform 0.3s ease-in-out; /* <-- ADD THIS LINE */
}

.movie-credits strong {
	color: #fff;
}

.movie-links {
	margin-top: 2.5rem;
	/* More space above the links */
	display: flex;
	gap: 2rem;
	align-items: center;
}

.movie-links a {
	color: #fff;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 1rem;
	/* Increased gap between text and icon */
	font-size: 1.8rem;
	font-weight: bold;
	padding: 0.8rem 1.8rem;
	/* Increased padding for a bigger button feel */
	border: none;
	/* Removed the border */
	border-radius: 30px;
	/* Fully rounded corners */
	background-color: rgba(20, 20, 20, 0.3);
	/* Dark semi-transparent background */
	transition: background-color 0.3s;
}

/*.movie-links a:hover {*/
/*	background-color: #e5a00d;*/
/*	color: #000;*/
/*}*/

.movie-links img {
	width: 40px;
	height: 40px;
	   transition: 0.3s ease-in-out;
    cursor: pointer;
}

/* New CSS for Pure CSS Icon Hover Effect */

.icon-wrapper {
    position: relative;
    /* This defines the size of the icon area */
    width: 40px; 
    height: 40px;
}

.icon-wrapper img {
    /* Make icons stack on top of each other */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Add a smooth transition for the fade effect */
    transition: opacity 0.3s ease-in-out;
}

/* By default, the hover icon is invisible */
.icon-wrapper .icon-hover {
    opacity: 0;
}

/* When hovering the INDIVIDUAL wrapper, hide its default icon... */
.icon-wrapper:hover .icon-default {
    opacity: 0;
}

/* ...and show its hover icon */
.icon-wrapper:hover .icon-hover {
    opacity: 1;
}

.movie-details-container {
	transition: opacity 0.5s ease-in-out;
}

.movie-details-container.fade-out {
	opacity: 0;
}

/*=============================================
=            Horizontal Layout Styles         =
=============================================*/

.movie-details-container-horizontal {
	color: #fff;
	padding: 0 40px;
}

.movie-poster-horizontal {
	position: relative;
	width: 100%;
	border-radius: 15px;
	overflow: hidden;
	margin-bottom: 2rem;
	display: flex;
	justify-content: center;
	/* gap: 1.5rem; */
}

.movie-poster-horizontal img {
	width: 70%;
}

.movie-text-horizontal {
	background: rgba(0, 0, 0, 0.2);
	padding: 10px 20px;
	border-radius: 10px;
	margin: auto;
	padding: auto;
}

.movie-text-horizontal h3 {
	font-size: 2.8rem;
	margin: 0;
	font-family: 'Red Rose', serif;
}

.movie-credits-horizontal {
	margin-top: 1.5rem;
}

.movie-credits-horizontal p {
	margin: 0.5rem 0;
	color: #ccc;
	font-size: 1.1rem;
    transition: transform 0.3s ease-in-out; /* <-- ADD THIS LINE */
}

.movie-credits p:hover,
.movie-credits-horizontal p:hover {
    transform: scale(1.03) translateX(5px); /* Zooms slightly and shifts right */
}

.movie-credits-horizontal strong {
	color: #fff;
}

.movie-links-horizontal {
	margin-top: 2.5rem;
	/* More space above the links */
	display: flex;
	gap: 2rem;
	align-items: center;
}

.movie-links-horizontal a {
	color: #fff;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 1rem;
	/* Increased gap between text and icon */
	font-size: 1.8rem;
	font-weight: bold;
	padding: 0.8rem 1.8rem;
	/* Increased padding for a bigger button feel */
	border: none;
	/* Removed the border */
	border-radius: 30px;
	/* Fully rounded corners */
	background-color: rgba(20, 20, 20, 0.3);
	/* Dark semi-transparent background */
	transition: background-color 0.3s;
}

.movie-links-horizontal img {
	width: 40px;
	height: 40px;
}


.movie-text-horizontal p {
	font-size: 1.8rem;
	margin: 0;
	color: #ccc;
}

.movie-info-horizontal {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
}

.movie-description-horizontal {
	font-size: 1.2rem;
	line-height: 1.5;
	max-width: 1000px;
	color: #e0e0e0;
}

.movie-info-horizontal {
	flex-basis: 50%;
	font-size: 1.1rem;
	line-height: 1.8;
}

.cast-bubbles-horizontal {
	display: flex;
	gap: 20px;
	/* Replaced negative gap with positive space */
	/* Added more space below the bubbles */
}

.cast-bubbles-horizontal img {
	width: 80px;
	/* Increased size of bubbles */
	height: 80px;
	border-radius: 50%;
	border: 3px solid #fff;
	/* Slightly thicker border */
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	transition: transform 0.3s ease-in-out;
}

/* Add hover effect for cast bubbles */
.cast-bubbles img:hover,
.cast-bubbles-horizontal img:hover {
    transform: scale(1.1); /* Zooms the bubble to 110% of its size */
}

.movie-info-horizontal .cast-bubbles-horizontal {
	margin-top: 1.3rem;
	justify-content: flex-end;
	/* Align bubbles to the left */
}

.movie-meta-horizontal {
	flex-basis: 45%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.movie-meta-horizontal .movie-links {
	margin-top: 1rem;
	justify-content: flex-start;
	/* Align links to the left */
}

/*=====  End of Horizontal Layout Styles  ======*/

/* Add fade-out transition to the parent container */
.highlight-bottom {
	transition: opacity 0.5s ease-in-out;
}

.highlight-bottom.fade-out {
	opacity: 0;
}


/* =============================================
   ===== NEW ANIMATION AND TRANSITION STYLES =====
   ============================================= */

/* 1. Main container handles the master fade and prevents overflow */
.highlight-bottom {
	transition: opacity 0.4s ease-in-out;
    /* Prevents scrollbars from appearing during slide animations */
	overflow-x: hidden;
}

.highlight-bottom.fade-out {
	opacity: 0;
}


/* 2. Image Hover Animation */
/* Add a transition to the image for smooth scaling */
.movie-poster-details img,
.movie-poster-horizontal img {
    transition: transform 0.4s ease-in-out;
}

/* On hover of the parent container, scale the image */
.movie-poster-details:hover img,
.movie-poster-horizontal:hover img {
    transform: scale(1.05);
}


/* 3. Directional Entrance Animations */

/* --- INITIAL STATE: Elements are invisible and shifted off-center --- */

/* Vertical Layout Initial State */
.highlight-bottom .movie-wrapper {
	opacity: 0;
	transform: translateX(-50px); /* Start from the left */
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.highlight-bottom .movie-info {
	opacity: 0;
	transform: translateX(50px); /* Start from the right */
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Horizontal Layout Initial State */
.highlight-bottom .movie-poster-horizontal {
	opacity: 0;
	transform: translateX(-50px); /* Start from the left */
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.highlight-bottom .movie-info-horizontal {
	opacity: 0;
	transform: translateX(50px); /* Start from the right */
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}


/* --- FINAL STATE: Triggered by the .animate-in class from JavaScript --- */

/* Vertical Layout Final State */
.highlight-bottom.animate-in .movie-wrapper,
.highlight-bottom.animate-in .movie-info {
	opacity: 1;
	transform: translateX(0); /* Move to original position */
}

/* Horizontal Layout Final State */
.highlight-bottom.animate-in .movie-poster-horizontal,
.highlight-bottom.animate-in .movie-info-horizontal {
	opacity: 1;
	transform: translateX(0); /* Move to original position */
}


/* --- STAGGERED DELAYS: Make the animation feel more fluid --- */

/* The first element in both layouts starts animating slightly sooner */
.highlight-bottom.animate-in .movie-wrapper,
.highlight-bottom.animate-in .movie-poster-horizontal {
	transition-delay: 0.1s;
}

/* The second element animates shortly after */
.highlight-bottom.animate-in .movie-info,
.highlight-bottom.animate-in .movie-info-horizontal {
	transition-delay: 0.2s;
}

/* =============================================
   ===== END OF NEW ANIMATION STYLES       =====
   ============================================= */


/* Responsive Design */
@media (max-width: 1024px) {
	.movie-links-horizontal {
		gap: 1rem;
	}

	.movie-links-horizontal a {
		gap: 0.8rem;
		font-size: 1.5rem;
		padding: 0.8rem 1.8rem;
	}
}

@media (max-width: 992px) {
	.movie-posters {
		gap: 0rem;
	}

	.poster img {
		width: 90%;
	}

	.cast-bubbles {
		justify-content: center;
	}

	.movie-links img {
		width: 30px;
		height: 30px;
	}
}

@media (max-width: 942px) {
	.container {
		padding: 0 0rem;
	}

	.movie-details-container {
		gap: 3rem;
		padding: 0 40px;
	}

	.movie-links a {
		gap: 1rem;
		font-size: 1.5rem;
	}

	.movie-poster-horizontal img {
		width: 65%;
	}

	.movie-description-horizontal {
		font-size: 1rem;
		line-height: 1.3;
		max-width: 1000px;
		color: #e0e0e0;
	}

	.movie-credits-horizontal {
		margin-top: 1.2rem;
	}

	.movie-credits-horizontal p {
		margin: 0.3rem 0;
		font-size: 1rem;
	}
}

@media (max-width: 855px) {

	.highlight-nav-bar h1 {
		font-size: 2rem;
	}

	.genre-nav {
		padding: 10px;
		gap: 10px;
		clip-path: none;
	}

	.movie-links {
		margin-top: 1.5rem;
		gap: 1.8rem;
	}

	.movie-links a {
		font-size: 1.2rem;
	}

	.movie-poster-details {
		width: 250px;
	}

	.movie-details-container {
		gap: 2rem;
		padding: 0 40px;
	}

	.movie-text h3 {
		font-size: 1.5rem;
	}

	.movie-links-horizontal a {
		gap: 0.6rem;
		font-size: 1.2rem;
		padding: 0.8rem 1.2rem;
	}

	.movie-info-horizontal .cast-bubbles-horizontal {
		margin-top: 0.5rem;
	}

	.movie-info-horizontal {
		gap: 0rem;
	}

	.cast-bubbles-horizontal {
		gap: 20px;
	}

	.cast-bubbles-horizontal img {
		width: 70px;
		height: 70px;
	}

}


@media (max-width: 768px) {

	.movie-details-container {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.movie-info {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.movie-posters {
		gap: 1rem;
	}

	.poster {
		width: 150px;
	}

	.poster img {
		width: 100%;
	}

	.genre-nav a {
		margin: 0 0.5rem;
		padding: 0.4rem 0.8rem;
		font-size: 0.9rem;
	}

	.highlight-nav-bar {
		flex-direction: row;
		align-items: center;
		position: relative;
		gap: 1rem;
		margin: 40px 0;
	}

	.hamburger {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 30px;
		height: 24px;
		background: transparent;
		border: none;
		cursor: pointer;
		z-index: 10;
		position: relative;
		margin-right: 80px;

	}

	.hamburger span {
		display: block;
		width: 100%;
		height: 3px;
		background: white;
		border-radius: 2px;
		transition: all 0.3s ease-in-out;
	}

	/* Animate to X when active */
	.hamburger.active span:nth-child(1) {
		transform: rotate(45deg) translate(5px, 5px);
	}

	.hamburger.active span:nth-child(2) {
		opacity: 0;
	}

	.hamburger.active span:nth-child(3) {
		transform: rotate(-45deg) translate(5px, -5px);
	}

	.genre-nav {
		display: none;
		flex-direction: column;
		align-items: center;
		background-color: rgba(44, 39, 39, 0.95);
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		padding: 1rem 0;
		clip-path: none;
	}

	.genre-nav.active {
		display: flex;
	}

	.movie-details-container {
		gap: 1rem;
		padding: 0 20px;
	}

	.movie-links {
		margin-top: 1.8rem;
		gap: 1.8rem;
	}

	.movie-links a {
		font-size: 1.4rem;
	}

	.movie-links-horizontal img {
		width: 30px;
		height: 30px;
	}

	.movie-info-horizontal {
		text-align: center;
		flex-direction: column;
		gap: 1.5rem;
	}

	.movie-description-horizontal {
		font-size: 1.2rem;
		line-height: 1.1;
	}

	.movie-text-horizontal h3 {
		font-size: 2.5rem;
	}

	.movie-text-horizontal p {
		font-size: 1.5rem;
	}

	.movie-info-horizontal .cast-bubbles-horizontal {
		justify-content: center;
	}

	.movie-meta-horizontal {
		justify-content: center;
	}

	.movie-links-horizontal {
		gap: 1rem;
		margin-top: 1rem;
		justify-content: center;
	}
}

@media (max-width: 600px) {
	.movie-description {
		font-size: 1rem;
		line-height: 1.3;
		margin-bottom: 1.2rem;
		max-width: 700px;
		color: #e0e0e0;
	}

	.movie-credits p {
		margin: 0rem 0;
		color: #ccc;
		font-size: 1.1rem;
	}

	.movie-poster-horizontal {
		margin-bottom: 1rem;
		justify-content: center;
		flex-direction: column;
		gap: 1rem;
	}

	.movie-poster-horizontal img {
		width: 90%;
		justify-content: center;
		margin: auto;
	}

	.movie-text-horizontal h3 {
		font-size: 2rem;
	}

	.movie-text-horizontal p {
		font-size: 1rem;
	}
}

@media (max-width: 480px) {
	.highlight-section {
		padding: 1rem 0;
	}

	.movie-posters {
		justify-content: space-around;
	}

	.poster {
		width: 45%;
	}

	.movie-description {
		font-size: 1rem;
		line-height: 1.7;
		margin-bottom: 1rem;
	}

	.movie-posters {
		gap: 0.1rem;
	}

	.movie-description-horizontal {
		font-size: 1rem;
		line-height: 1.1;
	}

	.movie-links-horizontal {
		margin-top: 0.5rem;
	}

	.movie-info-horizontal .cast-bubbles-horizontal {
		margin-top: 0rem;
	}

	.movie-poster-horizontal {
		margin-bottom: 0.8rem;
		justify-content: center;
		flex-direction: column;
		gap: 0rem;
	}

	.movie-poster-horizontal img {
		width: 100%;
	}

	.movie-details-container-horizontal {
		padding: 0 20px;
	}
}

@media (max-width: 426px) {
	.hamburger {
		margin-right: 40px;
	}

	.highlight-nav-bar h1 {
		padding: 0 0 0 30px;
	}

	.movie-poster-details {
		width: 200px;
		padding: 0;
		background-image: none;
	}

	.movie-info {
		max-width: 350px;
	}

	.movie-links {
		margin-top: 1rem;
		gap: 1rem;
		flex-direction: column;
	}

	.movie-links img {
		width: 25px;
		height: 25px;
	}

	.movie-links a {
		font-size: 1.5rem;
	}
}

@media (max-width: 326px) {
	.movie-links-horizontal a {
		gap: 0.6rem;
		font-size: 1.1rem;
		padding: 0.8rem;
	}
}