/*
 * Project case-study pages (Projects, first one: Hindu College, Figma 783:829).
 * Loaded on every Project page; the bl-case-* classes come from the "Case study" saved template.
 * Layout, sizes, fonts and colours are Elementor settings; only what Elementor can't express is here.
 */

/* Photos fill their column with no inline-image baseline gap */
.bl-case-img img {
	display: block;
	width: 100%;
}
.bl-case-img a { display: block; }

/* Title row: the tag pills take only the room they need, on the right of the title */
.e-con.bl-case-tags {
	--width: auto;
	width: auto !important;
	flex: 0 0 auto;
	justify-content: flex-end;
}
@media (max-width: 767px) {
	.e-con.bl-case-tags { justify-content: flex-start; }
}
/* 'tags_last_line' (a long title, e.g. IIIT Pune): the title keeps the full width and wraps as usual, and the pills
   sit on the right of its last line, just above the photo, bottom-aligned with the title's box (client note).
   Phones: the pills go under the title, as everywhere. */
.e-con.bl-case-titlerow--tags-last { --position: relative; position: relative; }
.e-con.bl-case-tags--row { --position: absolute; position: absolute; right: 0; bottom: 0; }
.bl-case-titlerow--tags-last .bl-case-heading .elementor-heading-title { text-wrap: wrap; }
@media (max-width: 767px) {
	.e-con.bl-case-tags--row { --position: static; position: static; }
}
/* A title too long for one line breaks into even lines */
.bl-case-heading .elementor-heading-title { text-wrap: balance; }
/* Tags without a link are labels; linked tags (to a Solutions card) turn gold on hover, like "View All Projects" */
.bl-case-tag .elementor-button:not([href]) { pointer-events: none; cursor: default; }
.bl-case-tag a.elementor-button[href] { transition: background-color .2s ease, color .2s ease; }
/* Linked pills are buttons, not text links: no underline (the theme underlines links; client note) */
.bl-case-tag .elementor-button,
.bl-case-tag .elementor-button * { text-decoration: none !important; }
.bl-case-tag a.elementor-button[href]:hover,
.bl-case-tag a.elementor-button[href]:focus-visible {
	background-color: var(--bl-gold) !important;
	color: var(--bl-dark) !important;
}
.bl-case-tag a.elementor-button[href]:hover .elementor-button-text,
.bl-case-tag a.elementor-button[href]:focus-visible .elementor-button-text { color: var(--bl-dark) !important; }

/* Hero: the label (e.g. "Delhi University") sits on the photo's top-left corner */
.e-con.bl-case-hero { position: relative; }
.bl-case-label .elementor-heading-title { white-space: nowrap; }

/* Full-width feature photo and strips crop to their frame */
.bl-case-feature img { object-position: center; }

/* Full-width video (Elementor Video widget): 1290x609 frame, rounded corners, poster with a black
   round play button (Figma); a click plays it in place with controls */
.bl-case-video .elementor-wrapper {
	--video-aspect-ratio: 2.1182;
	aspect-ratio: 1290 / 609 !important;
	position: relative; /* so the poster overlay is clipped to the rounded corners too */
	overflow: hidden;
	border-radius: 10px;
	background: #000;
}
.bl-case-video video { width: 100%; height: 100%; object-fit: cover; }
.bl-case-video .elementor-custom-embed-image-overlay { background-size: cover; background-position: center; }
.bl-case-video .elementor-custom-embed-play {
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: #000;
	transition: transform .2s ease, background-color .2s ease;
}
/* Elementor's icon is a ringed triangle; the design is a plain white triangle, drawn here */
.bl-case-video .elementor-custom-embed-play i,
.bl-case-video .elementor-custom-embed-play svg { display: none !important; }
.bl-case-video .elementor-custom-embed-play::before {
	content: "";
	width: 0;
	height: 0;
	margin-left: 8px; /* optical centre of the triangle */
	border-style: solid;
	border-width: 19px 0 19px 32px;
	border-color: transparent transparent transparent #fff;
}
.bl-case-video .elementor-custom-embed-image-overlay:hover .elementor-custom-embed-play { transform: translate(-50%, -50%) scale(1.08); }
@media (max-width: 767px) {
	.bl-case-video .elementor-custom-embed-play { width: 60px; height: 60px; }
	.bl-case-video .elementor-custom-embed-play::before { margin-left: 5px; border-width: 12px 0 12px 20px; }
}

/* "View All Projects": dark pill, gold with dark text on hover / click (design note) */
.bl-case-all .elementor-button {
	text-decoration: none !important;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.bl-case-all .elementor-button * { text-decoration: none !important; }
.bl-case-all .elementor-button:hover,
.bl-case-all .elementor-button:focus-visible,
.bl-case-all .elementor-button:active {
	background-color: var(--bl-gold) !important;
	color: var(--bl-dark) !important;
}
.bl-case-all .elementor-button:hover .elementor-button-text,
.bl-case-all .elementor-button:focus-visible .elementor-button-text,
.bl-case-all .elementor-button:active .elementor-button-text { color: var(--bl-dark) !important; }
.bl-case-all .elementor-button:active { transform: scale(.97); }

/* Figma: "Client Reflections" etc. are Asta Sans SemiBold */
.bl-case-text strong,
.bl-case-text b { font-weight: 600; }
.bl-case-text .elementor-widget-text-editor p:last-child { margin-bottom: 0 !important; }

/* Tiles (Figma "Social Mohali": the four zone photos): label top-right; on hover the photo dims
   over a dark backing and its text fades in. Touch screens get the same on tap. */
.e-con.bl-case-tiles {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 38px; /* Figma 916:638…: ~293px photos, 38–44px apart */
}
.e-con.bl-case-tiles > .e-con { --width: auto; width: auto; }
.e-con.bl-case-tile {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background: #090909;
	cursor: pointer;
}
.bl-case-tile-img img { transition: opacity .35s ease, transform .6s ease; }
.elementor-widget.bl-case-tile-text {
	position: absolute !important;
	inset: 0;
	z-index: 2;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 64px 22px 22px;
	display: flex;
	align-items: flex-end;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .35s ease, transform .35s ease;
	pointer-events: none;
}
.bl-case-tile-text p:last-child { margin-bottom: 0; }
.e-con.bl-case-tile:hover .bl-case-tile-img img,
.e-con.bl-case-tile:focus-within .bl-case-tile-img img { opacity: .35; transform: scale(1.03); }
.e-con.bl-case-tile:hover .bl-case-tile-text,
.e-con.bl-case-tile:focus-within .bl-case-tile-text { opacity: 1; transform: none; }
/* Labelled photos without hover text (e.g. Qavalli's outlets): no dimming, no pointer */
.e-con.bl-case-tile--plain { cursor: default; }
.e-con.bl-case-tile--plain:hover .bl-case-tile-img img,
.e-con.bl-case-tile--plain:focus-within .bl-case-tile-img img { opacity: 1; transform: none; }
@media (max-width: 1024px) {
	.e-con.bl-case-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 767px) {
	.e-con.bl-case-tiles { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.bl-case-tile-img img, .elementor-widget.bl-case-tile-text { transition-duration: .01s; }
}

/* Testimonial: portrait video (9:16) beside the name and story */
.bl-case-video--portrait .elementor-wrapper {
	--video-aspect-ratio: .5625;
	aspect-ratio: 9 / 16 !important;
}
/* 4:5 clips (e.g. AMPM's social-media videos) */
.bl-case-video--4x5 .elementor-wrapper {
	--video-aspect-ratio: .8;
	aspect-ratio: 4 / 5 !important;
}
.e-con.bl-case-quote-media { flex-shrink: 0; }

/* Related projects: three white cards; each photo slider has a fixed frame and round white arrows.
   Figma 916:1324…: 400x580 cards at x=62 / 523 / 977, so the row runs 13px past the 1290 content box. */
.e-con.bl-case-cards {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 57.5px;
}
@media (min-width: 1341px) {
	.e-con.bl-case-cards { margin-left: -13px !important; margin-right: -13px !important; width: auto !important; }
}
.e-con.bl-case-cards > .e-con { --width: auto; width: auto; }
.bl-case-slider .swiper,
.bl-case-slider .elementor-image-carousel-wrapper { border-radius: 10px; overflow: hidden; }
.bl-case-slider .swiper-slide-image {
	display: block;
	width: 100%;
	height: 500px; /* Figma: 370x500 */
	object-fit: cover;
}
/* Arrows (Figma 924:1374 etc.): 36px light-grey circle, 22px in from the photo's edges, centred on the
   photo, dark chevron. Every card shows them, as in the design: */
.bl-case-slider .elementor-swiper-button {
	display: flex !important; /* Elementor sets flex without centring; the chevron must sit in the middle */
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f7f7f7;
	color: #090909;
	box-shadow: none;
	transition: transform .2s ease, background-color .2s ease;
}
.bl-case-slider .elementor-swiper-button svg {
	width: 18px !important;
	height: 18px !important;
	fill: currentColor;
}
.bl-case-slider .elementor-swiper-button:hover,
.bl-case-slider .elementor-swiper-button:focus-visible { background: var(--bl-gold); transform: translateY(-50%) scale(1.08); }
.bl-case-slider .elementor-swiper-button-prev { left: 22px !important; inset-inline-start: 22px !important; }
.bl-case-slider .elementor-swiper-button-next { right: 22px !important; inset-inline-end: 22px !important; left: auto !important; }
/* ... a one-photo slider has no Elementor arrows, so the same two are drawn here. They are pictures
   only: a click falls through to the photo, which opens the project like the card's caption. */
.elementor-widget.bl-case-slider--single { position: relative; }
.elementor-widget.bl-case-slider--single::before,
.elementor-widget.bl-case-slider--single::after {
	content: "";
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	transform: translateY(-50%);
	background: #f7f7f7 center / 18px 18px no-repeat;
	pointer-events: none;
}
.elementor-widget.bl-case-slider--single::before {
	left: 22px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath fill='%23090909' d='M646 125C629 125 613 133 604 142L308 442C296 454 292 471 292 487 292 504 296 521 308 533L604 854C617 867 629 875 646 875 663 875 679 871 692 858 704 846 713 829 713 812 713 796 708 779 692 767L438 487 692 225C700 217 708 204 708 187 708 171 704 154 692 142 675 129 663 125 646 125Z'/%3E%3C/svg%3E");
}
.elementor-widget.bl-case-slider--single::after {
	right: 22px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath fill='%23090909' d='M696 533C708 521 713 504 713 487 713 471 708 454 696 446L400 146C388 133 375 125 354 125 338 125 325 129 313 142 300 154 292 171 292 187 292 204 296 221 308 233L563 492 304 771C292 783 288 800 288 817 288 833 296 850 308 863 321 871 338 875 354 875 371 875 388 867 400 854L696 533Z'/%3E%3C/svg%3E");
}
.bl-case-card .elementor-heading-title a { color: inherit; }
.bl-case-card .elementor-heading-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1024px) {
	.e-con.bl-case-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.bl-case-slider .swiper-slide-image { height: 420px; }
}
@media (max-width: 767px) {
	.e-con.bl-case-cards { grid-template-columns: 1fr; gap: 20px; }
	.bl-case-slider .swiper-slide-image { height: 400px; }
}
