/* ==========================================================================
   site.css — Safe Climbing Initiative
   The ONLY stylesheet that should be hand-edited. Everything else in css/ is
   vendor theme code (main.css, style.css, theme.css, plugins.css, bootstrap,
   font-awesome, animations) and gets overwritten if the theme is ever updated.

   This file replaces the <style> blocks and inline style="" attributes that
   were previously copy-pasted into every page.
   ========================================================================== */

/* --- Lightbox ------------------------------------------------------------ */

/* keep tall climbing photos whole instead of cropping them */
.pswp__img {
	object-fit: contain;
}

.zoom:hover {
	-ms-transform: scale(1.5);
	-webkit-transform: scale(1.5);
	transform: scale(1.5);
}

/* Magnific Popup's own close/arrow buttons are unreliable to click across
   browsers (see site.js) - hide them and use the plain custom buttons
   site.js adds instead. */
button.mfp-close,
button.mfp-arrow {
	display: none !important;
}

.sci-lightbox-btn {
	position: fixed;
	z-index: 999999;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 22px;
	line-height: 46px;
	text-align: center;
	cursor: pointer;
}

.sci-lightbox-btn:hover {
	background: rgba(0, 0, 0, 0.8);
}

.sci-lightbox-close {
	top: 24px;
	right: 24px;
}

.sci-lightbox-prev,
.sci-lightbox-next {
	top: 50%;
	margin-top: -24px;
}

.sci-lightbox-prev {
	left: 16px;
}

.sci-lightbox-next {
	right: 16px;
}

@media (max-width: 600px) {
	.sci-lightbox-btn {
		width: 40px;
		height: 40px;
		font-size: 18px;
		line-height: 38px;
	}

	.sci-lightbox-prev,
	.sci-lightbox-next {
		margin-top: -20px;
	}
}

/* --- Body copy ----------------------------------------------------------- */

/* project & article prose: was style="font-size:14px; text-align:justify" on
   virtually every <p> in the old pages */
.home-intro p,
.project-intro p,
.post-excerpt {
	font-size: 14px;
	text-align: justify;
}

/* --- Header -------------------------------------------------------------- */

/* was style="height:75px" inline on both logo <img> tags in every page */
#logo .logo-default img,
#logo .logo-dark img {
	height: 75px;
	width: auto;
}

/* --- Home: SCI Projects grid -----------------------------------------------
   theme.css (the second theme, css2/style.css) has an unscoped rule
   ".portfolio-item, .grid-item { width: 100% }" meant as the unstyled
   fallback for ITS OWN JS grid system. It loads after bootstrap.min.css and
   plugins.css with equal specificity, so on any element that is both a
   Bootstrap column AND carries class "grid-item" (only these homepage tiles),
   it silently wins and collapses every tile to full width — Isotope then
   stacks them in one column instead of a 2x4 grid. Restore the real
   percentages at higher specificity, matching Bootstrap's own xl breakpoint. */
#gallery .grid-item.col-xl-6 {
	flex-basis: 50%;
	max-width: 50%;
	width: 50%;
}

#gallery .grid-item.col-xl-3 {
	flex-basis: 25%;
	max-width: 25%;
	width: 25%;
}

/* below xl, Bootstrap's own .col-md-6 rule already governs (no col-xl-*
   media query is active there), so it only needs the same specificity bump */
@media (max-width: 1199.98px) {
	#gallery .grid-item.col-md-6 {
		flex-basis: 50%;
		max-width: 50%;
		width: 50%;
	}
}

/* the source photos aren't a consistent shape — most are portrait (~2:3),
   one (Nanacha Angatha) is landscape. The original masked this with a
   hardcoded style="height:527px" on 3 of the 9 images, relying on
   overflow:hidden to crop the rest — fragile, and wrong at any width other
   than the one it was tuned for. Force a consistent shape instead, so any
   current or future thumbnail displays uniformly.

   Scoped to .gallery-title.text-center (the actual project tiles) and NOT
   the bare .grid-item .item-media selector: that also matches the big
   "SCI Projects" logo tile and the "view more" tile (both .stamp-wrap, no
   .text-center), which use a wide col-xl-6/col-xl-3 box for a small logo
   graphic, not a photo. Forcing those into a 2:3 portrait crop made the
   stamp tile far taller than the photo row beside it — and since Isotope's
   `stamp` option reserves that whole height as blocked space, the next row
   got pushed down, leaving a gap under the shorter tiles. */
#gallery .grid-item .gallery-title.text-center .item-media img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
	width: 100%;
}

/* --- Home ---------------------------------------------------------------- */

.home-intro {
	padding-top: 60px;
}

.home-intro .ratio img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}

.associates {
	align-items: center;
}

.associates img {
	max-height: 100px;
	width: auto;
}

/* --- Accomplished projects listing ---------------------------------------- */

/* same fix as the homepage grid (see above): force a consistent shape so the
   one landscape photo (Nanacha Angatha) doesn't sit shorter than its
   portrait-photo neighbors. .post-image has no overflow:hidden by default,
   so add it here to actually crop rather than distort. */
#blog .post-image {
	overflow: hidden;
	position: relative;
}

#blog .post-image img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
}

/* --- Counters ------------------------------------------------------------ */

#counter {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 0;
	text-align: center;
	width: 100%;
}

#counter .item {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 0 38px -8px rgba(0, 0, 0, 0.34);
	margin: 10px;
	padding: 35px 40px;
	text-align: center;
}

#counter .item .count {
	color: #e8b12d;
	font-size: 40px;
	margin-bottom: 5px;
}

#counter .item h3 {
	color: #4f4e28;
	font-size: 11px;
	text-transform: capitalize;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
	border: none;
	border-radius: 5px;
	color: #555;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.5px;
	overflow: hidden;
	padding: 9px 20px 8px;
	position: relative;
	text-transform: capitalize;
	transition: all 0.5s ease 0s;
}

.btn:focus {
	color: #555;
}

.btn::before {
	border-bottom: 4px solid #2871f8;
	border-radius: 50%;
	content: '';
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	transform: scale(0);
	transform-origin: top center;
	transition: all 0.5s ease 0s;
	width: 100%;
}

.btn:hover::before {
	border-radius: 0;
	transform: scale(1);
}

@media only screen and (max-width: 767px) {
	.btn {
		margin-bottom: 20px;
	}
}

/* --- Project detail ------------------------------------------------------ */

.project-intro {
	padding-top: 29px;
}

.project-intro .image-column .inner-column {
	padding-top: 40px;
}

@media only screen and (max-width: 768px) {
	.project-intro .image-column .inner-column {
		padding-top: 20px;
	}
}

.project-gallery {
	margin-top: 10px;
}

/* --- Events -------------------------------------------------------------- */

.event-title {
	font-family: 'Jost', sans-serif;
	font-size: 23px;
}

/* --- Footer -------------------------------------------------------------- */

.page_footer .footer-regno {
	padding-top: 10px;
}

.page_footer .footer-site {
	padding-top: 22px;
}

.page_footer a {
	color: #fff;
}

.page_footer .btn-outline-maincolor {
	border-color: #e6c599;
}

.page_copyright p {
	font-size: 15px;
}
