/**
 * IISAUH THEME2026 — Facilities Page Stylesheet
 * 100% Pixel-Perfect Uniform 3D Cards with Interactive Details Modal
 *
 * @package IISAUH_Theme2026
 */

/* --------------------------------------------------------------------------
   1. Root Variables & Scoping
   -------------------------------------------------------------------------- */
.facilities-page {
	--navy: #071a2d;
	--primary-blue: #0284c7;
	--primary-blue-hover: #0369a1;
	--teal: #00a896;
	--teal-light: #02c4ae;
	--sky-blue: #38bdf8;
	--slate-body: #475569;
	--slate-muted: #64748b;
	background: #f8fafc;
	color: var(--slate-body);
	overflow-x: hidden;
	position: relative;
}

/* --------------------------------------------------------------------------
   2. Hero Banner (Exact Same Size as Careers Page Header)
   -------------------------------------------------------------------------- */
.facilities-hero {
	position: relative;
	min-height: auto;
	padding: clamp(32px, 3.5vw, 48px) 0 clamp(32px, 3.5vw, 48px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.facilities-hero__shell {
	position: relative;
	z-index: 2;
	width: min(100%, var(--container-max, 1680px));
	max-width: var(--container-max, 1680px);
	margin: 0 auto;
	padding: 0 var(--gutter, clamp(16px, 3.5vw, 40px));
	box-sizing: border-box;
}

.facilities-hero__title {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: #ffffff;
	font-size: clamp(22px, 2.6vw, 32px);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.facilities-hero__title-icon {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #00a896;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}

/* Facilities Header Freely Moving Floating Icons (Subtle & Elegant like IIS Achievements) */
.facilities-hero__floating-icons .about-hero__float-item {
	position: absolute;
	top: var(--fy, 20%);
	left: var(--fx, 20%);
	pointer-events: none;
	z-index: 2;
	will-change: transform;
	animation-duration: var(--dur, 22s);
	animation-delay: var(--delay, 0s);
	animation-iteration-count: infinite;
	animation-timing-function: ease-in-out;
	animation-direction: alternate;
}

.facilities-hero__floating-icons .about-hero__float-item--sci {
	animation-name: facIconFloat1;
	color: #38bdf8;
	opacity: 0.28;
}

.facilities-hero__floating-icons .about-hero__float-item--lrc {
	animation-name: facIconFloat2;
	color: #02c4ae;
	opacity: 0.24;
}

.facilities-hero__floating-icons .about-hero__float-item--sports {
	animation-name: facIconFloat3;
	color: #38bdf8;
	opacity: 0.25;
}

.facilities-hero__floating-icons .about-hero__float-item--stage {
	animation-name: facIconFloat1;
	color: #00a896;
	opacity: 0.22;
}

.facilities-hero__floating-icons .about-hero__float-item--tech {
	animation-name: facIconFloat2;
	color: #38bdf8;
	opacity: 0.26;
}

.facilities-hero__floating-icons .about-hero__float-item--canteen {
	animation-name: facIconFloat3;
	color: #02c4ae;
	opacity: 0.22;
}

.facilities-hero__floating-icons .about-hero__float-item--prayer {
	animation-name: facIconFloat1;
	color: #38bdf8;
	opacity: 0.25;
}

/* Seamless & Subtle Icon Presentation (No Bright Discs/Borders) */
.facilities-hero__floating-icons .about-hero__float-chip {
	background: transparent !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	border: none !important;
	box-shadow: none !important;
	width: auto !important;
	height: auto !important;
	display: block !important;
	padding: 0 !important;
}

.facilities-hero__floating-icons .about-hero__float-chip svg {
	width: clamp(28px, 2.6vw, 34px) !important;
	height: clamp(28px, 2.6vw, 34px) !important;
	opacity: 1 !important;
	filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.25)) !important;
	display: block;
}

.facilities-hero__floating-icons .about-hero__float-item:hover .about-hero__float-chip {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	transform: none !important;
}

.facilities-hero__floating-icons .about-hero__float-item:hover .about-hero__float-chip svg {
	transform: none !important;
	filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.25)) !important;
}

@keyframes facIconFloat1 {
	0%   { transform: translate(0, 0) rotate(0deg); }
	50%  { transform: translate(14px, -18px) rotate(6deg); }
	100% { transform: translate(-10px, 12px) rotate(-4deg); }
}

@keyframes facIconFloat2 {
	0%   { transform: translate(0, 0) rotate(0deg); }
	50%  { transform: translate(-16px, 14px) rotate(-6deg); }
	100% { transform: translate(12px, -10px) rotate(5deg); }
}

@keyframes facIconFloat3 {
	0%   { transform: translate(0, 0) rotate(0deg); }
	50%  { transform: translate(12px, 16px) rotate(5deg); }
	100% { transform: translate(-14px, -12px) rotate(-6deg); }
}

/* --------------------------------------------------------------------------
   3. Main Facilities Grid Section with Animated Outer Pattern
   -------------------------------------------------------------------------- */
.fac-showcase {
	position: relative;
	padding: clamp(44px, 5.5vw, 72px) 0 clamp(64px, 8vw, 100px);
	background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 40%, #ffffff 100%);
	overflow: hidden;
}

.fac-showcase__backdrop {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 1;
}

/* Floating Ambient Light Orbs */
.fac-bg-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	pointer-events: none;
	will-change: transform, opacity;
}

.fac-bg-orb--1 {
	top: 5%;
	left: -5%;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(2, 196, 174, 0.05) 50%, transparent 70%);
	animation: facOrbFloat1 18s ease-in-out infinite alternate;
}

.fac-bg-orb--2 {
	top: 45%;
	right: -8%;
	width: 550px;
	height: 550px;
	background: radial-gradient(circle, rgba(2, 196, 174, 0.16) 0%, rgba(56, 189, 248, 0.06) 50%, transparent 70%);
	animation: facOrbFloat2 24s ease-in-out infinite alternate;
}

.fac-bg-orb--3 {
	bottom: 5%;
	left: 25%;
	width: 480px;
	height: 480px;
	background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(56, 189, 248, 0.04) 50%, transparent 70%);
	animation: facOrbFloat3 20s ease-in-out infinite alternate;
}

/* SVG Pattern Mesh */
.fac-bg-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.fac-bg-wave--1 {
	animation: facWavePulse1 12s ease-in-out infinite alternate;
}

.fac-bg-wave--2 {
	animation: facWavePulse2 15s ease-in-out infinite alternate;
}

.fac-bg-circle--1 {
	transform-origin: 200px 300px;
	animation: facCircleSpin 45s linear infinite;
}

.fac-bg-circle--2 {
	transform-origin: 1250px 550px;
	animation: facCircleSpinRev 55s linear infinite;
}

.fac-bg-plus-markers {
	animation: facPlusFade 8s ease-in-out infinite alternate;
}

/* Keyframe Animations */
@keyframes facOrbFloat1 {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	100% {
		transform: translate3d(80px, 60px, 0) scale(1.15);
	}
}

@keyframes facOrbFloat2 {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	100% {
		transform: translate3d(-70px, -50px, 0) scale(1.2);
	}
}

@keyframes facOrbFloat3 {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	100% {
		transform: translate3d(50px, -60px, 0) scale(1.1);
	}
}

@keyframes facWavePulse1 {
	0% {
		stroke-dashoffset: 0;
		opacity: 0.5;
	}
	100% {
		stroke-dashoffset: 60;
		opacity: 0.85;
	}
}

@keyframes facWavePulse2 {
	0% {
		stroke-dashoffset: 0;
		opacity: 0.45;
	}
	100% {
		stroke-dashoffset: -70;
		opacity: 0.8;
	}
}

@keyframes facCircleSpin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes facCircleSpinRev {
	from {
		transform: rotate(360deg);
	}
	to {
		transform: rotate(0deg);
	}
}

@keyframes facPlusFade {
	0% {
		opacity: 0.2;
		transform: scale(0.95);
	}
	100% {
		opacity: 0.55;
		transform: scale(1.05);
	}
}

.fac-showcase__container {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--container-max, 1680px);
	margin: 0 auto;
	padding: 0 var(--gutter, clamp(20px, 2.5vw, 56px));
}

/* --------------------------------------------------------------------------
   4. 3-Column Uniform Dimensions Grid
   -------------------------------------------------------------------------- */
.fac-uniform-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	align-items: stretch;
}

/* 100% Identical Uniform 3D Card */
.fac-card-box {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 20px;
	border: 1.5px solid rgba(56, 189, 248, 0.25);
	box-shadow:
		0 14px 35px -8px rgba(15, 42, 74, 0.08),
		0 4px 12px rgba(56, 189, 248, 0.04),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	overflow: hidden;
	transition:
		transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.35s ease;
	cursor: pointer;
}

.fac-card-box:hover {
	transform: translateY(-8px);
	border-color: var(--teal-light);
	box-shadow:
		0 24px 55px -10px rgba(15, 42, 74, 0.16),
		0 8px 24px rgba(2, 196, 174, 0.14),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Photo Header */
.fac-card-box__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10.5;
	overflow: hidden;
	background: #0f2a4a;
}

.fac-card-box__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fac-card-box:hover .fac-card-box__img {
	transform: scale(1.06);
}

/* Numbered Watermark Chip (Top Right) */
.fac-card-box__index {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(7, 26, 45, 0.75);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

/* Specular Reflection Glare */
.fac-card-box__glare {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
	opacity: 0.6;
	z-index: 2;
}

/* Content Body */
.fac-card-box__body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Title (Consistent 2-line max height) */
.fac-card-box__title {
	margin: 0 0 10px 0;
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	color: var(--primary-blue);
	line-height: 1.35;
	min-height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.fac-card-box:hover .fac-card-box__title {
	color: var(--primary-blue-hover);
}

/* Description Preview (Clean 3-line clamp for equal dimensions) */
.fac-card-box__excerpt {
	margin: 0 0 16px 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--slate-body);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 64px;
}

/* Card Action Button Bar */
.fac-card-box__action {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 14px;
	border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.fac-card-box__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--primary-blue);
	text-decoration: none;
	transition: all 0.2s ease;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
}

.fac-card-box__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(56, 189, 248, 0.15);
	color: var(--primary-blue);
	transition: all 0.25s ease;
}

.fac-card-box:hover .fac-card-box__btn-icon {
	background: var(--teal);
	color: #ffffff;
	transform: translateX(3px);
}

.fac-card-box__tag {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--slate-muted);
}

/* --------------------------------------------------------------------------
   5. Interactive Details Modal
   -------------------------------------------------------------------------- */
.fac-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(7, 26, 45, 0.75);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.fac-modal.is-active {
	opacity: 1;
	visibility: visible;
}

.fac-modal__card {
	position: relative;
	width: 100%;
	max-width: 580px;
	max-height: 85vh;
	background: #ffffff;
	border-radius: 24px;
	border: 1.5px solid rgba(56, 189, 248, 0.35);
	box-shadow: 0 30px 80px rgba(7, 26, 45, 0.3);
	overflow-y: auto;
	padding: 32px 32px 28px;
	transform: scale(0.92) translateY(20px);
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fac-modal.is-active .fac-modal__card {
	transform: scale(1) translateY(0);
}

.fac-modal__close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #f1f5f9;
	border: 1px solid rgba(226, 232, 240, 0.9);
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: all 0.2s ease;
}

.fac-modal__close:hover {
	background: var(--navy);
	color: #ffffff;
	transform: scale(1.08);
}

.fac-modal__content {
	padding: 0;
}

/* Modal Header: Icon & Title Side-by-Side */
.fac-modal__header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
	padding-right: 36px;
}

/* Related Facility Icon Badge with Loop Animation */
.fac-modal__icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	flex-shrink: 0;
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(2, 196, 174, 0.16) 100%);
	border: 1.5px solid rgba(56, 189, 248, 0.4);
	color: var(--primary-blue);
	box-shadow: 0 8px 20px -4px rgba(56, 189, 248, 0.25);
	animation: facIconLoop 4s ease-in-out infinite;
	will-change: transform, box-shadow;
}

.fac-modal__icon-badge svg {
	width: 26px;
	height: 26px;
	color: var(--primary-blue);
	stroke-width: 2.2;
	animation: facSvgLoop 4s ease-in-out infinite;
}

.fac-modal__title {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: var(--primary-blue);
	line-height: 1.35;
}

/* Icon Badge Loop Animations */
@keyframes facIconLoop {
	0%, 100% {
		transform: translateY(0) scale(1) rotate(0deg);
		box-shadow: 0 8px 20px -4px rgba(56, 189, 248, 0.25);
		border-color: rgba(56, 189, 248, 0.4);
	}
	25% {
		transform: translateY(-4px) scale(1.04) rotate(3deg);
		box-shadow: 0 14px 28px -4px rgba(2, 196, 174, 0.35);
		border-color: var(--teal-light);
	}
	50% {
		transform: translateY(-1px) scale(1.02) rotate(-2deg);
		box-shadow: 0 10px 22px -4px rgba(59, 130, 246, 0.3);
		border-color: rgba(56, 189, 248, 0.55);
	}
	75% {
		transform: translateY(-5px) scale(1.05) rotate(2deg);
		box-shadow: 0 16px 30px -4px rgba(2, 196, 174, 0.4);
		border-color: var(--teal-light);
	}
}

@keyframes facSvgLoop {
	0%, 100% {
		transform: scale(1) rotate(0deg);
	}
	50% {
		transform: scale(1.12) rotate(6deg);
	}
}

.fac-modal__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--slate-body);
}

.fac-modal__body p {
	margin: 0;
}

/* --------------------------------------------------------------------------
   6. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
	.fac-uniform-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px;
	}
}

@media (max-width: 640px) {
	.fac-uniform-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.fac-modal__content {
		padding: 20px;
	}

	.fac-modal__title {
		font-size: 19px;
	}
}
