/*
Theme Name: NMBT Redesign
Theme URI: https://nmbtmumbai.org
Author: NMBT
Description: Fresh redesign concept for the Naraindas Morbai Budhrani Trust website. A modern WordPress block theme (theme.json + block templates), editable in the Site Editor.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: nmbt-redesign
*/

/* Small supplementary rules the Site Editor UI doesn't cover directly. */

a {
	transition: opacity 0.15s ease;
}
a:hover {
	opacity: 0.75;
}

.wp-block-button__link {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.85rem;
	font-weight: 600;
	padding-top: 0.9em;
	padding-bottom: 0.9em;
	padding-left: 1.6em;
	padding-right: 1.6em;
}

.is-style-outline .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
}

.nmbt-pillar-card {
	border-radius: 4px;
	padding: 2rem 1.75rem;
	height: 100%;
}

/*
 * WordPress core ships a generic ".has-text-color { color: var(--wp--preset--color--text) !important; }"
 * rule that, on this install, is emitted AFTER the specific ".has-X-color" utility classes in
 * global-styles-inline-css. Since both rules carry !important and equal (single-class) specificity,
 * the generic one wins on source order alone -- silently overriding every intentional text color,
 * including on dynamic blocks (site-title, post-title, navigation) whose markup we don't author directly.
 * A two-class compound selector has higher specificity than the generic single-class rule, so it wins
 * regardless of source order. This neutralizes the bug everywhere, for every page we build.
 */
.has-white-color.has-text-color { color: var(--wp--preset--color--white) !important; }
.has-ink-color.has-text-color { color: var(--wp--preset--color--ink) !important; }
.has-coral-color.has-text-color { color: var(--wp--preset--color--coral) !important; }
.has-teal-color.has-text-color { color: var(--wp--preset--color--teal) !important; }
.has-cream-color.has-text-color { color: var(--wp--preset--color--cream) !important; }

/* Partners page: responsive logo grid */
.nmbt-partner-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
}
.nmbt-partner-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 1.25rem 1rem;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.nmbt-partner-card:hover {
	box-shadow: 0 4px 14px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}
.nmbt-partner-card img {
	max-width: 130px;
	max-height: 75px;
	object-fit: contain;
	margin-bottom: 0.75rem;
}
.nmbt-partner-card p {
	font-size: 0.8rem;
	line-height: 1.3;
	color: var(--wp--preset--color--text);
	margin: 0;
}

/* Gallery page: tabbed category gallery */
.nmbt-gallery-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.5rem 0 2rem;
}
.nmbt-gallery-tab {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.6em 1.3em;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--ink);
	background: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}
.nmbt-gallery-tab.is-active {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}
.nmbt-gallery-panel {
	display: none;
}
.nmbt-gallery-panel.is-active {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}
.nmbt-gallery-item {
	overflow: hidden;
	border-radius: 6px;
	cursor: zoom-in;
	box-shadow: 0 0 0 rgba(22,35,58,0);
	transition: box-shadow 0.3s ease;
}
.nmbt-gallery-item:hover {
	box-shadow: 0 8px 22px rgba(22,35,58,0.18);
}
.nmbt-gallery-panel img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	cursor: zoom-in;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.35s ease;
}
.nmbt-gallery-item:hover img {
	transform: scale(1.08);
	filter: brightness(1.04);
}
.nmbt-lightbox {
	position: fixed;
	inset: 0;
	max-width: none;
	margin: 0;
	background: rgba(22,35,58,0.92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999;
	padding: 2rem;
	box-sizing: border-box;
}
.nmbt-lightbox.is-active {
	display: flex;
}
.nmbt-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	cursor: default;
}
.nmbt-lightbox-close,
.nmbt-lightbox-prev,
.nmbt-lightbox-next {
	position: absolute;
	background: rgba(255,255,255,0.12);
	border: none;
	color: var(--wp--preset--color--white);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s ease;
}
.nmbt-lightbox-close:hover,
.nmbt-lightbox-prev:hover,
.nmbt-lightbox-next:hover {
	background: rgba(255,255,255,0.28);
}
.nmbt-lightbox-close {
	top: 1.5rem;
	right: 1.5rem;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.4rem;
	line-height: 1;
}
.nmbt-lightbox-prev,
.nmbt-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	font-size: 1.6rem;
}
.nmbt-lightbox-prev {
	left: 1.5rem;
}
.nmbt-lightbox-next {
	right: 1.5rem;
}
.nmbt-lightbox-counter {
	position: absolute;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	color: var(--wp--preset--color--white);
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	opacity: 0.85;
}

/* Trustees page: uniform headshot framing regardless of source image size */
.nmbt-trustee-photo {
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 8px;
}
.nmbt-trustee-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
	display: block;
	border-radius: 0;
}

/* Get in touch page: Contact Form 7 field grid */
.nmbt-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin-top: 1.5rem;
}
.nmbt-form-field-full {
	grid-column: 1 / -1;
}
.nmbt-form-field label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	color: var(--wp--preset--color--ink);
}
.nmbt-form-field .wpcf7-form-control {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #dcdcdc;
	border-radius: 6px;
	padding: 0.7em 0.9em;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.95rem;
	background: #ffffff;
	transition: border-color 0.15s ease;
}
.nmbt-form-field textarea.wpcf7-form-control {
	min-height: 140px;
	resize: vertical;
}
.nmbt-form-field .wpcf7-form-control:focus {
	outline: none;
	border-color: var(--wp--preset--color--coral);
}
.wpcf7-form .wpcf7-submit {
	margin-top: 0.5rem;
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--white);
	border: none;
	border-radius: 999px;
	padding: 0.9em 2.2em;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.wpcf7-form .wpcf7-submit:hover {
	opacity: 0.8;
}
.wpcf7-spinner {
	margin-left: 0.75rem;
}
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.unaccepted .wpcf7-response-output,
.wpcf7-form.payment-required .wpcf7-response-output {
	border-color: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--coral);
}
.wpcf7-form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--teal);
}
.wpcf7-response-output {
	margin: 1.5rem 0 0 !important;
	border-radius: 6px !important;
	font-size: 0.9rem;
}
.wpcf7-not-valid-tip {
	color: var(--wp--preset--color--coral);
	font-size: 0.8rem;
	margin-top: 0.3rem;
}

/* Get in touch page: Google Maps embed */
.nmbt-map-embed {
	margin-top: 1.5rem;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}
.nmbt-map-embed iframe {
	width: 100%;
	height: 320px;
	border: 0;
	display: block;
}

@media (max-width: 781px) {
	.nmbt-form-grid {
		grid-template-columns: 1fr;
	}
}

/* Annual Reports page: report list rows */
.nmbt-report-list {
	margin-top: 1rem;
	border-top: 1px solid #e8e8e8;
}
.nmbt-report-row {
	padding: 1.4rem 0;
	border-bottom: 1px solid #e8e8e8;
}
.nmbt-report-row .wp-block-button__link {
	font-size: 0.75rem;
	padding-top: 0.6em;
	padding-bottom: 0.6em;
	padding-left: 1.3em;
	padding-right: 1.3em;
}
@media (max-width: 600px) {
	.nmbt-report-row {
		flex-direction: column;
		align-items: flex-start !important;
	}
}

/* Homepage: responsive YouTube embed */
.nmbt-video-embed {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	border-radius: 6px;
	overflow: hidden;
}
.nmbt-video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Homepage: horizontally scrollable picture gallery */
.nmbt-scroll-gallery {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 0.75rem;
	scrollbar-width: thin;
}
.nmbt-scroll-gallery img {
	flex: 0 0 auto;
	width: min(78vw, 420px);
	height: 260px;
	object-fit: cover;
	border-radius: 6px;
	scroll-snap-align: start;
}
.nmbt-scroll-gallery-wrap {
	position: relative;
}
.nmbt-scroll-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	border: none;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-size: 1.1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.85;
}
.nmbt-scroll-arrow:hover {
	opacity: 1;
}
.nmbt-scroll-arrow.prev {
	left: -0.75rem;
}
.nmbt-scroll-arrow.next {
	right: -0.75rem;
}
@media (max-width: 700px) {
	.nmbt-scroll-arrow {
		display: none;
	}
}

/* Get in touch page: hero photo shown in full, no cropping */
.nmbt-hero-contain .wp-block-cover__image-background {
	object-fit: contain;
	background-color: var(--wp--preset--color--ink);
}

/* Project sub-pages: photo service grid (image + label + caption) */
.nmbt-service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2.25rem 1.75rem;
	margin: 2rem 0 2.5rem;
}
.nmbt-service-card img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}
.nmbt-service-card h3 {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	margin: 1rem 0 0.4rem;
}
.nmbt-service-card p {
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--wp--preset--color--text);
	margin: 0;
}

/* Project sub-pages: smaller photo rows for event / infrastructure galleries */
.nmbt-photo-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	margin: 1.5rem 0 2.5rem;
}
.nmbt-photo-row img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}
.nmbt-photo-row figcaption {
	font-size: 0.85rem;
	color: var(--wp--preset--color--text);
	opacity: 0.8;
	margin-top: 0.6rem;
	line-height: 1.45;
}

/* Disaster Response page: snappy hover zoom on photo-row images (page-scoped, same treatment as the Gallery page) */
body.page-id-24 .nmbt-photo-row figure {
	margin: 0;
	overflow: hidden;
	border-radius: 6px;
	cursor: zoom-in;
	transition: box-shadow 0.3s ease;
}
body.page-id-24 .nmbt-photo-row figure:hover {
	box-shadow: 0 8px 22px rgba(22,35,58,0.18);
}
body.page-id-24 .nmbt-photo-row img {
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.35s ease;
}
body.page-id-24 .nmbt-photo-row figure:hover img {
	transform: scale(1.08);
	filter: brightness(1.04);
}

/* Project sub-pages: pill tag list (e.g. counselling activities) */
.nmbt-tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1.25rem 0 2.5rem;
	padding: 0;
	list-style: none;
}
.nmbt-tag-list li {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.5em 1.1em;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--teal);
	color: var(--wp--preset--color--teal);
}

/* Project sub-pages: counselling case studies, photo alongside story */
.nmbt-case-study {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 2rem;
	align-items: start;
	background: #fbfaf8;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 2rem;
	margin-bottom: 1.75rem;
}
.nmbt-case-study img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}
.nmbt-case-study h3 {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--wp--preset--color--coral);
	margin: 0 0 0.75rem;
}
.nmbt-case-study p {
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--wp--preset--color--text);
	margin: 0 0 0.9rem;
}
.nmbt-case-study p:last-child {
	margin-bottom: 0;
}
@media (max-width: 680px) {
	.nmbt-case-study {
		grid-template-columns: 1fr;
	}
	.nmbt-case-study img {
		aspect-ratio: 16 / 9;
		max-width: 280px;
	}
}

/* Project sub-pages: native HTML5 video embeds (e.g. Summer Camp year highlight clips) */
.nmbt-native-video {
	margin: 1.5rem 0 2.5rem;
	line-height: 0;
}
.nmbt-native-video video {
	width: 100%;
	max-height: 480px;
	border-radius: 6px;
	display: block;
	background: #000;
}
