/*
Theme Name: Splendour
Theme URI: https://www.splendourschool.com/
Description: A modern block theme for Splendour School, Salua, Kharagpur. Navy and gold.
Version: 1.11.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: splendour
*/

/* Small eyebrow label above headings */
.is-style-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Single gold line */
.wp-block-separator.is-style-house-stripe {
	border: 0 !important;
	height: 4px !important;
	width: 100% !important;
	max-width: none !important;
	margin-top: 0;
	margin-bottom: 0;
	opacity: 1;
	background: var(--wp--preset--color--gold) !important;
}

/* Cards: white panel with rounded corners and clipped images */
.is-style-card {
	background: var(--wp--preset--color--white);
	border-radius: 14px;
	overflow: hidden;
	height: 100%;
	box-shadow: 0 1px 2px rgba(15,31,58,0.06), 0 8px 24px rgba(15,31,58,0.07);
}
.is-style-card > .wp-block-image { margin: 0; }
.is-style-card > .wp-block-image img { width: 100%; height: 200px; object-fit: cover; display: block; }

/* Rounded photos */
.wp-block-image.is-style-rounded-soft img { border-radius: 14px; }

/* Keep embedded maps responsive */
.splendour-map iframe { width: 100%; height: 400px; border: 0; border-radius: 14px; display: block; }

/* Header: wrap nicely on small screens */
.splendour-header .wp-block-navigation { font-weight: 600; }
@media (max-width: 781px) {
	.splendour-topbar:not(:has(.splendour-lang)) { display: none; }
	.splendour-topbar .splendour-contact, .splendour-topbar .splendour-text, .splendour-topbar .splendour-social { display: none; }
	.splendour-topbar > .wp-block-group { justify-content: flex-end !important; }
}

/* No white gaps between full-width sections */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* Quieter links in the top bar, site title and footer */
.splendour-topbar a,
.wp-block-site-title a,
footer.wp-block-template-part a { text-decoration: none; }
footer.wp-block-template-part a:hover,
.splendour-topbar a:hover { text-decoration: underline; }

/* Drop-down menu */
.splendour-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 10px; padding: 8px 0; box-shadow: 0 12px 30px rgba(15,31,58,0.12); min-width: 260px !important; }
.splendour-header .wp-block-navigation__submenu-container a { padding: 8px 18px !important; }

/* Logo: full size on desktop, smaller on phones */
.splendour-header .wp-block-site-logo img { height: auto; }
@media (max-width: 600px) {
	.splendour-header .wp-block-site-logo img { width: 140px !important; }
}

/* ------------------------------------------------------------------
   Existing page content (text with floated images) - responsive layout.
   Only applies to pages that do NOT use the full-width Splendour patterns.
   ------------------------------------------------------------------ */
.wp-block-post-content.entry-content:not(:has(> .alignfull)) {
	box-sizing: content-box;
	max-width: 1240px;
	padding: clamp(32px, 5vw, 64px) 24px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	display: flow-root;
}
.wp-block-post-content.entry-content:not(:has(> .alignfull)) > :where(p, ul, ol, h2, h3, h4, blockquote, .wp-block-columns, .wp-block-group, .cff-wrapper, .splendour-map, .splendour-fb-wrap, .splendour-contact, .splendour-social) {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.wp-block-post-content.entry-content:not(:has(> .alignfull)) > p:empty { display: none; }
.wp-block-post-content.entry-content:not(:has(> .alignfull)) > figure.wp-block-image {
	width: 44%;
	max-width: 44% !important;
	margin-top: 0.4rem;
	margin-bottom: 1.5rem;
}
.wp-block-post-content.entry-content:not(:has(> .alignfull)) > figure.alignright {
	float: right;
	clear: right;
	margin-left: 2.5rem !important;
	margin-right: 0 !important;
}
.wp-block-post-content.entry-content:not(:has(> .alignfull)) > figure.alignleft {
	float: left;
	clear: left;
	margin-right: 2.5rem !important;
	margin-left: 0 !important;
}
.wp-block-post-content.entry-content:not(:has(> .alignfull)) figure.wp-block-image img {
	width: 100% !important;
	height: auto !important;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(15,31,58,0.06), 0 8px 24px rgba(15,31,58,0.10);
}
/* Text-only pages keep a comfortable reading width */
.wp-block-post-content.entry-content:not(:has(> .alignfull, > figure.wp-block-image, > .wp-block-columns, > .cff-wrapper)) {
	max-width: 900px;
}
/* Tablet and phone: images go full width above the text, no side-by-side squeeze */
@media (max-width: 781px) {
	.wp-block-post-content.entry-content:not(:has(> .alignfull)) > figure.wp-block-image,
	.wp-block-post-content.entry-content:not(:has(> .alignfull)) > figure.alignright,
	.wp-block-post-content.entry-content:not(:has(> .alignfull)) > figure.alignleft {
		float: none;
		width: 100%;
		max-width: 100% !important;
		margin: 0 0 1.5rem 0 !important;
	}
}
/* Images and embeds never overflow on any screen */
.wp-site-blocks img, .wp-site-blocks iframe, .wp-site-blocks video { max-width: 100%; }
.wp-site-blocks { overflow-x: clip; }

/* School details blocks */
.splendour-contact--inline { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.splendour-contact--stacked { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.splendour-contact__address { font-weight: 400; }
.splendour-text { margin: 0; }
.splendour-social { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.splendour-social--icons .splendour-social__link { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(15,31,58,0.08); color: inherit; transition: background .15s; }
.splendour-social--icons .splendour-social__link:hover { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); }
footer.wp-block-template-part .splendour-social--icons .splendour-social__link { background: rgba(255,255,255,0.12); color: #fff; }
footer.wp-block-template-part .splendour-social--icons .splendour-social__link:hover { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); }
.splendour-social--text { gap: 6px 18px; }
footer.wp-block-template-part .splendour-contact a, .splendour-topbar .splendour-contact a { color: inherit; }
footer.wp-block-template-part .splendour-contact--stacked { font-weight: 400; }
@media (max-width: 600px) { .splendour-topbar .splendour-text { display: none; } }

.splendour-name { display: flex; flex-direction: column; line-height: 1.2; }
.splendour-name__title { font-size: 1.375rem; font-weight: 800; color: var(--wp--preset--color--navy); text-decoration: none; }
.splendour-name__sub { font-size: 0.75rem; font-weight: 600; color: var(--wp--preset--color--muted); }

/* Facebook posts and albums */
.splendour-fb__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 24px; }
.splendour-fb__grid--photos { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 12px; }
.splendour-fb__card { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,31,58,0.06), 0 8px 24px rgba(15,31,58,0.07); color: var(--wp--preset--color--navy); text-decoration: none; }
.splendour-fb__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--wp--preset--color--mist); }
.splendour-fb__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.splendour-fb__card:hover .splendour-fb__img img { transform: scale(1.04); }
.splendour-fb__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.splendour-fb__body p { margin: 0; color: var(--wp--preset--color--ink); font-size: 0.95rem; }
.splendour-fb__meta { font-size: 0.8rem; font-weight: 600; color: var(--wp--preset--color--muted); }
.splendour-fb__link { font-weight: 700; font-size: 0.9rem; color: var(--wp--preset--color--gold-text); text-decoration: none; }
.splendour-fb__photo { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.splendour-fb__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.splendour-fb__title { margin: 0 0 18px; }
.splendour-fb__back a { font-weight: 700; text-decoration: none; }
.splendour-fb__more { margin-top: 28px; }
.splendour-fb__note { font-size: 0.9rem; color: var(--wp--preset--color--muted); }
.splendour-fb--embed { display: flex; justify-content: center; }
.splendour-lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.splendour-lightbox::backdrop { background: rgba(15,31,58,0.88); }
.splendour-lightbox img { display: block; max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.splendour-lightbox button { position: absolute; background: rgba(15,31,58,0.6); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.splendour-lightbox__close { top: -16px; right: -16px; }
.splendour-lightbox__prev { left: 8px; top: 50%; }
.splendour-lightbox__next { right: 8px; top: 50%; }

/* Contact page: columns and map line up, with proper spacing */
.wp-block-post-content.entry-content > .wp-block-columns { gap: clamp(24px, 4vw, 56px); margin-bottom: clamp(28px, 4vw, 48px); align-items: flex-start; }
.wp-block-post-content.entry-content > .wp-block-columns > .wp-block-column p { margin-top: 0; line-height: 1.75; }
.wp-block-post-content.entry-content strong + a { margin-left: 0.4em; }
.wp-block-post-content.entry-content a { overflow-wrap: anywhere; }
.splendour-map { width: 100%; margin-top: 0; }
.splendour-map iframe { height: clamp(300px, 45vw, 460px); }

/* Page (featured) image under the title band */
.splendour-page-image { padding: clamp(24px, 4vw, 48px) 24px 0; }
.splendour-page-image:not(:has(img)) { display: none; }
.splendour-page-image .wp-block-post-featured-image { margin: 0; }
.splendour-page-image img { width: 100%; height: auto; object-fit: cover; border-radius: 14px; display: block; }
@media (max-width: 781px) { .splendour-page-image .wp-block-post-featured-image img { aspect-ratio: 16 / 9 !important; } }

/* Facebook cards: set the number of columns per block (default 3) */
@media (min-width: 1000px) { .splendour-fb__grid:not(.splendour-fb__grid--photos) { grid-template-columns: repeat(var(--sd-cols, 3), minmax(0, 1fr)); } }
@media (min-width: 600px) and (max-width: 999px) { .splendour-fb__grid:not(.splendour-fb__grid--photos) { grid-template-columns: repeat(min(var(--sd-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 599px) { .splendour-fb__grid:not(.splendour-fb__grid--photos) { grid-template-columns: 1fr; } }

/* Contact cards */
.splendour-card { border-radius: 14px; padding: clamp(24px, 3vw, 36px) !important; box-shadow: 0 1px 2px rgba(15,31,58,0.06), 0 8px 24px rgba(15,31,58,0.07); height: 100%; box-sizing: border-box; }
.splendour-card > h2 { margin-top: 0; margin-bottom: 14px; }
.splendour-card .splendour-contact--stacked { font-size: 1.0625rem; }
.splendour-card .splendour-contact--stacked a { font-weight: 700; overflow-wrap: anywhere; }
.splendour-card .splendour-social--text { flex-direction: column; align-items: flex-start; gap: 8px; }
.splendour-card .splendour-social--text a { font-weight: 700; }
.wp-block-post-content.entry-content > .wp-block-columns { margin-bottom: clamp(24px, 3vw, 40px); }
.wp-block-post-content.entry-content > .wp-block-columns > .wp-block-column > .splendour-card { height: 100%; }

/* Rotating quotes */
.splendour-quotes { background: var(--wp--preset--color--pale-gold); color: var(--wp--preset--color--navy); border-radius: 14px; padding: clamp(24px, 4vw, 40px); }
.splendour-quotes__stage { display: grid; }
.splendour-quotes__slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.splendour-quotes__slide.is-active { opacity: 1; visibility: visible; }
.splendour-quotes blockquote { margin: 0; padding: 0; border: 0; }
.splendour-quotes blockquote p { margin: 0; font-size: var(--wp--preset--font-size--x-large); font-weight: 700; line-height: 1.35; }
.splendour-quotes figcaption { margin-top: 16px; font-weight: 700; }
.splendour-quotes__dots { display: flex; gap: 10px; margin-top: 22px; }
.splendour-quotes__dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid var(--wp--preset--color--navy); background: transparent; cursor: pointer; }
.splendour-quotes__dot.is-active { background: var(--wp--preset--color--navy); }
@media (prefers-reduced-motion: reduce) { .splendour-quotes__slide { transition: none; } }
.wp-block-cover.alignfull { padding-left: 24px; padding-right: 24px; }

/* Hindi and Bengali fonts: downloaded only when a page contains those letters */
@font-face { font-family: "Noto Sans Devanagari"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/noto-sans-devanagari-devanagari-wght-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/noto-sans-bengali-bengali-wght-normal.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CF7, U+200C-200D, U+20B9, U+25CC; }

/* Language menu */
.splendour-lang { position: relative; display: inline-block; }
.splendour-lang__btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: inherit; border: 0; padding: 4px 6px; font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; }
.splendour-lang__btn:hover, .splendour-lang__btn:focus-visible { background: rgba(255,255,255,0.12); }
.splendour-lang__list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; margin: 0; padding: 6px; list-style: none; background: #fff; color: var(--wp--preset--color--navy); border-radius: 10px; box-shadow: 0 10px 30px rgba(15,31,58,0.25); min-width: 170px; }
.splendour-lang__list[hidden] { display: none; }
.splendour-lang__list button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 9px 12px; border-radius: 6px; font: inherit; color: inherit; cursor: pointer; }
.splendour-lang__list button:hover, .splendour-lang__list button:focus-visible, .splendour-lang__list button[aria-current="true"] { background: var(--wp--preset--color--mist); font-weight: 700; }
/* Hide Google's own translate bar and tooltips */
body { top: 0 !important; }
.skiptranslate iframe, .goog-te-banner-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
#google_translate_element { display: none; }

/* Mobile menu (1.9.1): left-aligned, tidy, submenu opens inline instead of floating as a card */
.wp-block-navigation__responsive-container.is-menu-open { padding: 24px 28px 32px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list { align-items: flex-start !important; justify-content: flex-start !important; text-align: left; gap: 0 !important; width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; align-items: flex-start !important; border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: 14px 0; font-size: 1.15rem; text-align: left; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	position: static !important; width: 100% !important; min-width: 0 !important; height: auto !important; visibility: visible !important; opacity: 1 !important;
	border: 0 !important; border-left: 3px solid var(--wp--preset--color--gold) !important; border-radius: 0 !important; box-shadow: none !important;
	margin: 0 0 10px 4px; padding: 0 0 0 14px !important; background: transparent !important; align-items: flex-start !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { border-bottom: 0; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { padding: 9px 0 !important; font-size: 1rem; font-weight: 500; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon { display: none; }

/* Header logo (1.10.0) */
.splendour-logo { margin: 0; }
.splendour-logo a { display: block; line-height: 0; }
.splendour-logo img { display: block; height: auto; max-width: 100%; }
@media (max-width: 781px) { .splendour-header .splendour-logo img { width: 220px !important; } }

/* Image hover (1.11.0): gentle zoom like the Facebook cards, and no dragging photos off the page */
.wp-block-post-content figure.wp-block-image,
.is-style-card > .wp-block-image { overflow: hidden; }
.wp-block-post-content .wp-block-image img,
.is-style-card > .wp-block-image img { transition: transform .25s; }
.wp-block-post-content .wp-block-image:hover img,
.is-style-card:hover > .wp-block-image img { transform: scale(1.04); }
.wp-block-post-content .wp-block-image.is-style-rounded-soft { border-radius: 14px; }
.wp-block-image img, .splendour-fb__img img, .wp-block-cover__image-background { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
@media (prefers-reduced-motion: reduce) { .wp-block-post-content .wp-block-image img, .is-style-card > .wp-block-image img { transition: none; } .wp-block-post-content .wp-block-image:hover img, .is-style-card:hover > .wp-block-image img { transform: none; } }
