/*
Theme Name: Patliputra Sahodaya Blocks
Theme URI: https://patliputrasahodaya.com/
Author: Patliputra Sahodaya School Complex
Description: Full site editing (block) theme for the Patliputra Sahodaya CBSE Schools Association. Every section is a core-block pattern, editable in the Site Editor. Design tokens live in theme.json.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pssc-blocks
Tags: full-site-editing, block-patterns, education, blue, one-column, block-styles
*/

/* =========================================================
   Tokens that mirror theme.json (kept for component CSS)
   ========================================================= */
:root {
	--pssc-primary: var(--wp--preset--color--primary, #0b3d78);
	--pssc-primary-deep: var(--wp--preset--color--primary-deep, #08284f);
	--pssc-primary-soft: var(--wp--preset--color--primary-soft, #eaf1ff);
	--pssc-gold: var(--wp--preset--color--gold, #c99a2e);
	--pssc-gold-light: var(--wp--preset--color--gold-light, #f1d58d);
	--pssc-gold-soft: var(--wp--preset--color--gold-soft, #fff6dd);
	--pssc-ink: var(--wp--preset--color--ink, #122033);
	--pssc-muted: var(--wp--preset--color--muted, #5d6b7d);
	--pssc-border: var(--wp--preset--color--border, #dfe7f2);
	--pssc-surface: var(--wp--preset--color--surface, #f7f9fd);
	--pssc-white: var(--wp--preset--color--white, #ffffff);
	--pssc-shadow-soft: 0 14px 36px rgba(8, 40, 79, 0.1);
	--pssc-shadow-hover: 0 20px 44px rgba(8, 40, 79, 0.16);
	--pssc-radius: 8px;
	--pssc-radius-sm: 6px;
	--pssc-transition: 220ms ease;
}

html {
	scroll-behavior: smooth;
}

:focus-visible {
	outline: 3px solid var(--pssc-gold);
	outline-offset: 4px;
}

/* =========================================================
   Dark sections — invert heading + text colour
   ========================================================= */
.pssc-on-dark,
.pssc-on-dark p,
.pssc-on-dark li,
.pssc-on-dark figcaption {
	color: rgba(255, 255, 255, 0.84);
}

.pssc-on-dark :is(h1, h2, h3, h4, h5, h6),
.pssc-on-dark strong {
	color: var(--pssc-white);
}

.pssc-on-dark .pssc-eyebrow {
	color: var(--pssc-gold-light);
}

/* =========================================================
   Eyebrow label (rule + uppercase micro-heading)
   ========================================================= */
.pssc-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.55rem;
	color: var(--pssc-gold);
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pssc-eyebrow::before {
	content: "";
	width: 34px;
	height: 2px;
	background: currentColor;
	border-radius: 999px;
}

.has-text-align-center .pssc-eyebrow,
.pssc-eyebrow.has-text-align-center {
	justify-content: center;
}

/* =========================================================
   Cards — one base, several skins
   ========================================================= */
.pssc-card {
	background: var(--pssc-white);
	border: 1px solid var(--pssc-border);
	border-radius: var(--pssc-radius);
	box-shadow: var(--pssc-shadow-soft);
	transition:
		transform var(--pssc-transition),
		box-shadow var(--pssc-transition),
		border-color var(--pssc-transition);
}

.pssc-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--pssc-shadow-hover);
}

.pssc-card--flat {
	box-shadow: none;
	background: var(--pssc-surface);
}

.pssc-card--flat:hover {
	transform: none;
	box-shadow: none;
}

.pssc-card--glass {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.16);
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.pssc-quick-icon {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	color: var(--pssc-primary-deep);
	background: var(--pssc-gold-soft);
	border-radius: var(--pssc-radius);
	font-weight: 900;
}

.pssc-stat-number {
	display: block;
	color: var(--pssc-gold-light);
	font-size: 2.4rem;
	font-weight: 900;
	line-height: 1;
}

/* =========================================================
   Hero
   ========================================================= */
.pssc-hero {
	position: relative;
	overflow: hidden;
}

.pssc-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
	background-size: 42px 42px;
	opacity: 0.24;
	pointer-events: none;
}

.pssc-hero > * {
	position: relative;
	z-index: 1;
}

.pssc-hero-media {
	position: relative;
	padding: 0.8rem;
	background: rgba(255, 255, 255, 0.11);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--pssc-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.pssc-hero-media::before {
	content: "";
	position: absolute;
	top: -1.4rem;
	left: 2rem;
	width: 46%;
	height: 0.5rem;
	background: var(--pssc-gold);
	border-radius: 999px;
}

.pssc-hero-media img {
	width: 100%;
	height: 27.5rem;
	object-fit: cover;
	border-radius: var(--pssc-radius);
}

@media (max-width: 781px) {
	.pssc-hero-media img {
		height: 20rem;
	}
}

/* =========================================================
   Inner page hero + breadcrumb
   ========================================================= */
.pssc-inner-hero {
	text-align: center;
}

.pssc-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.55rem;
	margin: 0.8rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--pssc-gold-light);
}

.pssc-breadcrumb a {
	color: var(--pssc-white);
	opacity: 0.85;
}

.pssc-breadcrumb a:hover {
	opacity: 1;
}

.pssc-breadcrumb li:not(:last-child)::after {
	content: "/";
	margin-left: 0.55rem;
	color: rgba(255, 255, 255, 0.4);
}

/* =========================================================
   Decorated image (gold offset block behind)
   ========================================================= */
.pssc-image-offset {
	position: relative;
}

.pssc-image-offset::before {
	content: "";
	position: absolute;
	right: -1.2rem;
	bottom: -1.2rem;
	width: 86%;
	height: 86%;
	background: var(--pssc-gold-soft);
	border-radius: var(--pssc-radius);
}

.pssc-image-offset img {
	position: relative;
	border-radius: var(--pssc-radius);
	box-shadow: var(--pssc-shadow-soft);
}

@media (max-width: 781px) {
	.pssc-image-offset::before {
		right: 0.5rem;
		bottom: -0.75rem;
		width: 80%;
		height: 80%;
	}
}

/* =========================================================
   Event timeline (ordered list of date + content)
   ========================================================= */
.pssc-timeline {
	position: relative;
	display: grid;
	gap: 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pssc-timeline::before {
	content: "";
	position: absolute;
	top: 1rem;
	bottom: 1rem;
	left: 3.1rem;
	width: 2px;
	background: rgba(241, 213, 141, 0.42);
}

.pssc-timeline-item {
	position: relative;
	display: grid;
	grid-template-columns: 6.2rem minmax(0, 1fr);
	gap: 1.6rem;
	align-items: start;
}

.pssc-timeline-date {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 6.2rem;
	min-height: 6.2rem;
	color: var(--pssc-primary-deep);
	background: var(--pssc-gold-light);
	border: 6px solid var(--pssc-primary-deep);
	border-radius: var(--pssc-radius);
	font-weight: 900;
}

.pssc-timeline-date span,
.pssc-timeline-date .pssc-timeline-month {
	margin: 0;
	color: var(--pssc-primary-deep);
	font-size: 0.82rem;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
}

.pssc-timeline-date strong,
.pssc-timeline-date .pssc-timeline-day {
	margin: 0;
	color: var(--pssc-primary-deep);
	font-size: 2rem;
	font-weight: 900;
	line-height: 1;
}

.pssc-timeline-date .pssc-timeline-day a,
.pssc-timeline-date .pssc-timeline-month a {
	color: inherit;
	pointer-events: none;
}

.pssc-timeline-content {
	padding: 1.6rem;
	background: rgba(255, 255, 255, 0.09);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--pssc-radius);
}

@media (max-width: 781px) {
	.pssc-timeline::before {
		left: 2.35rem;
	}

	.pssc-timeline-item {
		grid-template-columns: 4.7rem minmax(0, 1fr);
		gap: 1.1rem;
	}

	.pssc-timeline-date {
		width: 4.7rem;
		min-height: 4.7rem;
		border-width: 4px;
	}

	.pssc-timeline-date strong {
		font-size: 1.55rem;
	}
}

/* =========================================================
   School + committee member cards
   ========================================================= */
.pssc-school-logo img,
.pssc-member-avatar img {
	width: 6.6rem;
	height: 6.6rem;
	object-fit: cover;
	padding: 0.35rem;
	background: var(--pssc-white);
	border: 1px solid var(--pssc-border);
	border-radius: 50%;
}

.pssc-member-avatar img {
	width: 7.5rem;
	height: 7.5rem;
	padding: 0;
	border: 4px solid var(--wp--preset--color--surface-alt, #eef4fb);
	box-shadow: 0 4px 12px rgba(8, 40, 79, 0.1);
}

.pssc-role {
	color: var(--pssc-gold);
	font-weight: 800;
	font-size: 0.85rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* =========================================================
   Gallery
   ========================================================= */
.pssc-gallery-card {
	position: relative;
	overflow: hidden;
	border-radius: var(--pssc-radius);
	box-shadow: var(--pssc-shadow-soft);
	background: var(--pssc-ink);
	aspect-ratio: 4 / 3;
}

.pssc-gallery-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms ease, opacity var(--pssc-transition);
}

.pssc-gallery-card:hover img {
	transform: scale(1.06);
	opacity: 0.3;
}

.pssc-gallery-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.6rem;
	background: linear-gradient(to top, rgba(8, 40, 79, 0.95) 0%, rgba(11, 61, 120, 0.4) 100%);
	opacity: 0;
	transition: opacity var(--pssc-transition);
}

.pssc-gallery-card:hover .pssc-gallery-overlay,
.pssc-gallery-card:focus-within .pssc-gallery-overlay {
	opacity: 1;
}

.pssc-gallery-overlay :is(h3, h4) {
	color: var(--pssc-white);
	font-size: 1.15rem;
	margin: 0;
}

.pssc-gallery-overlay p {
	color: var(--pssc-gold-light);
	font-size: 0.85rem;
	font-weight: 700;
	margin: 0;
}

/* =========================================================
   Testimonials
   ========================================================= */
.pssc-testimonial {
	position: relative;
}

.pssc-testimonial::before {
	content: "\201C";
	position: absolute;
	top: 0.35rem;
	right: 1.6rem;
	color: var(--pssc-gold-light);
	font-size: 5rem;
	font-weight: 900;
	line-height: 1;
	pointer-events: none;
}

.pssc-testimonial > * {
	position: relative;
	z-index: 1;
}

.pssc-rule-top {
	margin-top: 1.6rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--pssc-border);
}

/* =========================================================
   Partner logos
   ========================================================= */
.pssc-partner-logo img {
	max-height: 4.8rem;
	width: auto;
	object-fit: contain;
	filter: saturate(0.85);
	transition: filter var(--pssc-transition), transform var(--pssc-transition);
}

.pssc-partner-logo:hover img {
	filter: saturate(1);
	transform: scale(1.03);
}

/* =========================================================
   Forms (WPForms + core search + comment form)
   ========================================================= */
.pssc-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], input[type="number"], select, textarea),
.wpforms-container :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea) {
	width: 100%;
	padding: 0.86rem 1rem;
	color: var(--pssc-ink);
	background: var(--pssc-surface);
	border: 1px solid var(--pssc-border);
	border-radius: var(--pssc-radius-sm);
	transition:
		border-color var(--pssc-transition),
		box-shadow var(--pssc-transition),
		background-color var(--pssc-transition);
}

.pssc-form :is(input, select, textarea):focus,
.wpforms-container :is(input, select, textarea):focus {
	background: var(--pssc-white);
	border-color: var(--pssc-primary);
	box-shadow: 0 0 0 4px rgba(11, 61, 120, 0.1);
	outline: 0;
}

.pssc-form label,
.wpforms-container .wpforms-field-label {
	color: var(--pssc-primary-deep);
	font-weight: 800;
}

.wpforms-container .wpforms-submit {
	border-radius: 999px !important;
	background: var(--pssc-primary) !important;
	color: var(--pssc-white) !important;
	font-weight: 800 !important;
	padding: 0.82rem 1.35rem !important;
	border: 0 !important;
}

.wpforms-container .wpforms-submit:hover {
	background: var(--pssc-primary-deep) !important;
}

/* =========================================================
   Header + footer
   ========================================================= */
.pssc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid rgba(223, 231, 242, 0.9);
	box-shadow: 0 8px 22px rgba(8, 40, 79, 0.05);
	backdrop-filter: blur(14px);
}

.pssc-brand-mark {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 4.2rem;
	height: 4.2rem;
	color: var(--pssc-primary-deep);
	background: linear-gradient(135deg, var(--pssc-gold-light), var(--pssc-gold));
	border: 4px solid var(--pssc-white);
	border-radius: 50%;
	box-shadow: 0 8px 18px rgba(8, 40, 79, 0.16);
	font-weight: 900;
}

.pssc-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item > a {
	padding: 0.55rem 0.82rem;
	border-radius: 999px;
	transition: color var(--pssc-transition), background-color var(--pssc-transition);
}

.pssc-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item > a:hover {
	color: var(--pssc-primary);
	background: var(--pssc-primary-soft);
}

.pssc-footer a:hover {
	color: var(--pssc-gold-light);
}

.pssc-footer .wp-block-heading {
	color: var(--pssc-white);
}

@media (max-width: 460px) {
	.pssc-brand-mark {
		width: 2.9rem;
		height: 2.9rem;
	}
}

/* =========================================================
   Misc utilities used by patterns
   ========================================================= */
.pssc-map iframe {
	display: block;
	width: 100%;
	height: 450px;
	border: 0;
	border-radius: var(--pssc-radius);
}

@media (max-width: 781px) {
	.pssc-map iframe {
		height: 300px;
	}
}

.pssc-meta-date {
	color: var(--pssc-gold);
	font-size: 0.88rem;
	font-weight: 900;
	text-transform: uppercase;
}

.pssc-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
