/**
 * Programs Widget styles.
 *
 * Equal-height cards with button pinned bottom-right, plus detail modal.
 * Dark Rhino Boxing design system.
 */

.rhino-programs {
	background-color: #000000;
	padding: 80px 0;
}

.rhino-programs .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* === Section head ==================================================== */

.rhino-programs__head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 56px;
}

.rhino-programs__head .overline {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.08em;
	color: #E59744;
	display: inline-block;
	margin-bottom: 14px;
}

.rhino-programs__head h2 {
	color: #FFFFFF;
	font-family: 'Anton', system-ui, sans-serif;
	text-transform: uppercase;
	font-size: 40px;
	line-height: 1.1;
	margin: 0;
}

/* === Grid (equal heights via stretch) ================================ */

.rhino-programs__grid {
	display: grid;
	gap: 24px;
	align-items: stretch;
}

.rhino-programs__grid.grid-1 { grid-template-columns: 1fr; }
.rhino-programs__grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.rhino-programs__grid.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* === Card (flex column for equal heights) ============================ */

.rhino-programs__card {
	background-color: #141414;
	border: 1px solid #2A2A2A;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.rhino-programs__card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
	border-color: #E59744;
}

/* --- Card image ------------------------------------------------------ */

.rhino-programs__img {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	flex-shrink: 0;
}

.rhino-programs__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.rhino-programs__card:hover .rhino-programs__img img {
	transform: scale(1.05);
}

/* --- Card body (flex-grow fills remaining space) --------------------- */

.rhino-programs__card .card-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.rhino-programs__title {
	color: #FFFFFF;
	font-family: 'Anton', system-ui, sans-serif;
	text-transform: uppercase;
	font-size: 22px;
	margin: 0 0 10px;
}

.rhino-programs__desc {
	color: #B8B8B8;
	font-size: 14px;
	line-height: 1.7;
	margin: 0 0 14px;
	/* Clamp to 4 lines for consistency across cards */
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* --- Benefits -------------------------------------------------------- */

.rhino-programs__benefits {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.rhino-programs__benefits li {
	font-size: 13px;
	color: #E59744;
	padding: 3px 0 3px 20px;
	position: relative;
}

.rhino-programs__benefits li::before {
	content: '\f00c';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	position: absolute;
	left: 0;
	top: 4px;
	font-size: 11px;
}

/* --- Card footer (pushes button to bottom-right) --------------------- */

.rhino-programs__card-footer {
	margin-top: auto;
	display: flex;
	justify-content: flex-end;
	padding-top: 12px;
}

/* --- See Details button (opens the program detail modal) ------------- */

.rhino-programs__details {
	display: inline-block;
	padding: 10px 24px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border: 2px solid #E59744;
	border-radius: 9999px;
	cursor: pointer;
	background: transparent;
	color: #E59744;
	transition: background 0.2s, color 0.2s, transform 0.2s;
}

.rhino-programs__details:hover {
	background: #E59744;
	color: #000000;
	transform: translateY(-2px);
}

/* === Empty state ===================================================== */

.rhino-programs__empty {
	text-align: center;
	color: #B8B8B8;
	font-size: 16px;
	line-height: 1.7;
	padding: 48px 0;
}

/* === Program Detail Modal ============================================ */

.rhino-program-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rhino-program-modal.is-open {
	opacity: 1;
	visibility: visible;
}

/* Lock body scroll when program modal is open */
body.rhino-modal-open {
	overflow: hidden !important;
}

.rhino-program-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

.rhino-program-modal__dialog {
	position: relative;
	z-index: 1;
	width: 78vw;
	max-width: 1100px;
	max-height: 88vh;
	overflow-y: auto;
	background: #141414;
	border: 1px solid #2A2A2A;
	border-radius: 20px;
	overflow-x: hidden;
	transform: translateY(20px) scale(0.97);
	transition: transform 0.3s ease;
	/* Custom scrollbar (dark + orange) */
	scrollbar-width: thin;
	scrollbar-color: #E59744 #1A1A1A;
}

.rhino-program-modal__dialog::-webkit-scrollbar {
	width: 8px;
}

.rhino-program-modal__dialog::-webkit-scrollbar-track {
	background: #1A1A1A;
	border-radius: 4px;
}

.rhino-program-modal__dialog::-webkit-scrollbar-thumb {
	background: #E59744;
	border-radius: 4px;
}

.rhino-program-modal__dialog::-webkit-scrollbar-thumb:hover {
	background: #F36E36;
}

.rhino-program-modal.is-open .rhino-program-modal__dialog {
	transform: translateY(0) scale(1);
}

.rhino-program-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: #E59744;
	color: #000;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.2s;
}

.rhino-program-modal__close:hover {
	background: #F36E36;
	transform: scale(1.1);
}

/* --- Hero image (top) ------------------------------------------------ */

.rhino-program-modal__hero {
	width: 100%;
	max-height: 200px;
	overflow: hidden;
}

.rhino-program-modal__hero-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

/* --- Content --------------------------------------------------------- */

.rhino-program-modal__content {
	padding: 32px;
}

.rhino-program-modal__title {
	font-family: 'Anton', system-ui, sans-serif;
	text-transform: uppercase;
	font-size: 32px;
	color: #FFFFFF;
	margin: 0 0 24px;
}

.rhino-program-modal__section {
	margin-bottom: 20px;
}

.rhino-program-modal__section[hidden] {
	display: none;
}

.rhino-program-modal__section h4,
.rhino-program-modal__label {
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #E59744;
	margin: 0 0 8px;
}

.rhino-program-modal__section p {
	font-size: 15px;
	line-height: 1.7;
	color: #D8D8D8;
	margin: 0;
}

/* --- Gallery slider (3 per row, arrows) ------------------------------ */

.rhino-program-modal__gallery-section {
	position: relative;
	padding: 0 32px 24px;
	overflow: hidden;
}

.rhino-program-modal__gallery-track {
	display: flex;
	gap: 8px;
	transition: transform 0.3s ease;
}

.rhino-program-modal__gallery-item {
	width: calc((100% - 16px) / 3);
	flex-shrink: 0;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.2s, opacity 0.2s;
	background: #0A0A0A;
}

.rhino-program-modal__gallery-item:hover {
	transform: scale(1.03);
	opacity: 0.85;
}

.rhino-program-modal__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(229, 151, 68, 0.9);
	color: #000;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rhino-program-modal__arrow--prev { left: 8px; }
.rhino-program-modal__arrow--next { right: 8px; }

.rhino-program-modal__arrow:hover {
	background: #F36E36;
}

/* --- Video embed ----------------------------------------------------- */

.rhino-program-modal__video {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	margin: 0 32px 24px;
	border-radius: 10px;
	overflow: hidden;
}

.rhino-program-modal__video:empty {
	display: none;
	padding-bottom: 0;
	margin: 0;
}

.rhino-program-modal__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* --- Modal footer (Book button) -------------------------------------- */

.rhino-program-modal__footer {
	padding: 20px 32px 28px;
	text-align: center;
}

.rhino-program-modal__book {
	width: 100%;
	max-width: 400px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 32px;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border: none;
	border-radius: 9999px;
	background: #AE090A;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.rhino-program-modal__book:hover {
	background: #E01A1A;
	transform: translateY(-2px);
}

/* === Fullscreen Lightbox ============================================= */

.rhino-program-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
}

.rhino-program-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.rhino-program-lightbox__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	cursor: pointer;
}

.rhino-program-lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: #E59744;
	color: #000;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rhino-program-lightbox__content {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rhino-program-lightbox__content img,
.rhino-program-lightbox__content video {
	border-radius: 8px;
}

/* Lightbox prev/next navigation */
.rhino-program-lightbox__prev,
.rhino-program-lightbox__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: rgba(229, 151, 68, 0.9);
	color: #000;
	font-size: 28px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.2s;
}

.rhino-program-lightbox__prev { left: 20px; }
.rhino-program-lightbox__next { right: 20px; }

.rhino-program-lightbox__prev:hover,
.rhino-program-lightbox__next:hover {
	background: #F36E36;
	transform: translateY(-50%) scale(1.1);
}

/* === Responsive ====================================================== */

@media (max-width: 1023px) {
	.rhino-programs__grid.grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.rhino-programs__grid.grid-2,
	.rhino-programs__grid.grid-3 {
		grid-template-columns: 1fr;
	}

	.rhino-programs__head h2 {
		font-size: 32px;
	}

	.rhino-program-modal {
		padding: 16px;
	}

	.rhino-program-modal__content {
		padding: 24px 20px;
	}

	.rhino-program-modal__title {
		font-size: 26px;
	}
}
