/* Case Study Specific Styles */

.case-study-hero {
    /* max-width: calc(100% - 400px); */
    padding: 140px 0 0;
    background: transparent;
}

.back-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #fff;
}

.case-study-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.case-study-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.case-study-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.meta-item strong {
    color: #fff;
    font-weight: 600;
}

/* Case Study Section */
.case-study-section {
    padding: 5rem 0;
    background: transparent;
}

/* Project Overview Content */
.project-overview-content {
    margin-top: 2rem;
}

/* Project Overview Text */
.project-overview-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.project-overview-text:last-child {
    margin-bottom: 0;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.overview-item h3 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #5c7cfa;
}

.overview-item p {
    font-size: 1.4rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.overview-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overview-item li {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.overview-item li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #5c7cfa;
    font-weight: bold;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

/* Allow grid items to shrink within the grid without forcing overflow */
.image-grid > * {
    min-width: 0;
}

/* Three-item single row layout for Soc page */
.image-grid.image-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.project-image {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-container {
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
    border-radius: 15px;
}

.video-container.playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s;
    pointer-events: auto;
}

.video-container:hover .play-icon {
    transform: scale(1.1);
}

.project-image img,
.project-video {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Keep a consistent media box height across items */
.project-image {
    aspect-ratio: 3 / 2;
}

/* Images fill the box */
.project-image img {
    height: 100%;
}

/* Videos keep the same height but reduce visual width (letterbox) */
.video-container .project-video {
    height: 100%;
    object-fit: contain;
}

.project-image:hover img,
.project-image:hover .project-video {
    transform: translateY(-5px);
    box-shadow: 0 0 0 rgba(102, 126, 234, 0.3);
}

.image-caption {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Technologies */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.tech-tag {
    background: rgba(92, 124, 250, 0.2);
    border: 1px solid rgba(92, 124, 250, 0.4);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.3s, border-color 0.3s;
}

.tech-tag:hover {
    background: rgba(92, 124, 250, 0.3);
    border-color: rgba(92, 124, 250, 0.6);
}

/* Next Project */
.next-project {
    text-align: center;
    padding: 3rem 0;
}

.next-project h3 {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.next-project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #5c7cfa;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.3s, transform 0.3s;
}

.next-project-link:hover {
    color: #748ffc;
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .overview-grid,
    .image-grid {
        grid-template-columns: 1fr;
        /* gap: 2rem; */
    }

    /* Ensure modifier collapses on smaller screens as well */
    .image-grid.image-grid-3 {
        grid-template-columns: 1fr;
    }

}
/*  */
.lightbox-overlay {
	position: fixed;
	inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 2000;
}

.lightbox-overlay.open {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.lightbox-image {
	max-width: 90vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.95rem;
}

.lightbox-close {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.5rem;
	line-height: 40px;
	cursor: pointer;
	backdrop-filter: blur(2px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
	transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.05);
}
