/* SGD TTC website (tenant layout "sgd", Phase 5B).
   Ported verbatim from the former PHP site's style.css; every change from
   the original is marked "Maglev:" (page structure) or "Fix:" (allowed
   responsive/accessibility fixes). Loaded only by theme/layouts/sgd. */

:root {
	--navy-deep: #001830;
	--navy: #033976;
	--navy-mid: #04509c;
	--navy-dark: #000033;
	--cream: #f4f1e6;
	--orange: #ff7200;
	--green: #14b503;
	--white: #ffffff;
	--muted: #cccccc;
	--sidebar-link: #7aa7de;
	--footer-link: #3185eb;
	--max-width: 1350px;
	--radius: 14px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background: var(--navy) linear-gradient(180deg, var(--cream) 0, var(--cream) 90px, var(--navy) 260px);
	background-attachment: fixed;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	color: var(--white);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	margin: 0;
	padding: 0;
	font-weight: normal;
	color: #000000;
}

h1 {
	font-size: 2em;
}

h2 {
	font-size: 2.4em;
}

h3 {
	font-size: 1.6em;
}

p, ul, ol {
	margin-top: 0;
	line-height: 180%;
}

a {
	text-decoration: none;
	color: var(--orange);
	transition: color 0.2s ease;
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------- Layout shell ---------- */

#wrapper {
	max-width: var(--max-width);
	width: 100%;
	margin: 0 auto;
	padding: 0;
}

.headlogo {
	display: block;
	margin: 0 auto;
	padding: 0px 20px 8px;
	max-height: 130px;
	width: auto;
	animation: fadeInDown 0.6s ease both;
}

/* ---------- Menu ---------- */

#menu {
	position: relative;
	width: 100%;
	min-height: 80px;
	margin: 0 auto;
	padding: 0 20px;
	overflow: hidden;
	background-color: #003a80;
	border-radius: var(--radius) var(--radius) 0 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.menu-wave {
	/* Scales the original 980x86 artwork uniformly to fill the bar at any width (rather than
	   cropping it or patching a separate gradient past 980px) so it's always one continuous,
	   seam-free image, exactly like the original design, just scaled up for the wider layout. */
	position: absolute;
	top: -7px;
	left: 0;
	z-index: 1;
	width: 100%;
	height: auto;
	display: block;
	pointer-events: none;
}

.nav-toggle {
	position: relative;
	z-index: 2;
	display: none;
	background: none;
	border: 2px solid var(--white);
	border-radius: 6px;
	color: var(--white);
	font-size: 20px;
	line-height: 1;
	padding: 8px 12px;
	cursor: pointer;
}

#menu ul {
	position: relative;
	z-index: 2;
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	line-height: normal;
	width: 100%;
	justify-content: flex-end;
}

#menu li {
	margin: 0;
}

#menu a {
	display: block;
	margin: 4px 2px;
	padding: 12px 16px;
	text-decoration: none;
	text-align: center;
	text-transform: uppercase;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--white);
	border-radius: 8px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

#menu a:hover,
#menu .current_page_item a {
	color: var(--green);
	background-color: rgba(0, 0, 51, 0.55);
}

/* ---------- Banner slider ---------- */

.slideshow {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #00101f;
}

.slide-viewport {
	position: relative;
	width: 100%;
	padding-top: 35.7%; /* preserves the original 980x350 ratio, fluidly */
	min-height: 200px;
}

.slide-item {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s ease;
}

.slide-item.is-active {
	opacity: 1;
	visibility: visible;
}

.slide-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.slide-prev,
.slide-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	background: rgba(0, 24, 48, 0.45);
	color: var(--white);
	border: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	font-size: 22px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.slide-prev { left: 14px; }
.slide-next { right: 14px; }
.slide-prev:hover,
.slide-next:hover { background: rgba(0, 24, 48, 0.8); }

.slide-dots {
	position: absolute;
	bottom: 14px;
	left: 0;
	right: 0;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.slide-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--white);
	background: transparent;
	padding: 0;
	cursor: pointer;
	opacity: 0.7;
}

.slide-dot.is-active {
	background: var(--white);
	opacity: 1;
}

/* ---------- Page card ---------- */

#page {
	width: 100%;
	margin: 0 auto;
	padding: 0;
	background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
}

#page-bgbtm {
	padding: 30px 24px 40px;
	border-radius: 0 0 var(--radius) var(--radius);
}

/* Fix: the page title is the page's <h1> (the PHP site had no h1); same look. */
.content .url {
	color: var(--white);
	text-transform: uppercase;
	font-size: 18px;
	letter-spacing: 0.04em;
	text-align: left;
	margin-bottom: 10px;
	opacity: 0;
	animation: fadeInUp 0.5s ease 0.05s both;
}

#content-area {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	align-items: flex-start;
}

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

#content {
	flex: 1 1 560px;
	min-width: 0;
	padding: 10px 0 0;
}

.post {
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.post .title {
	margin-bottom: 10px;
	letter-spacing: -0.5px;
	color: var(--white);
}

.post .title a {
	color: var(--white);
}

.post .entry {
	padding-bottom: 10px;
	text-align: justify;
}

.links {
	padding-top: 10px;
	font-size: 12px;
	font-weight: bold;
	color: var(--muted);
}

/* ---------- Sidebar ---------- */

#sidebar {
	flex: 1 1 260px;
	max-width: 320px;
	margin: 0;
	padding: 0;
}

#sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#sidebar li {
	margin: 0 0 16px;
	padding: 0;
}

#sidebar li li {
	line-height: 2.2;
	margin: 0;
	padding-left: 4px;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

#sidebar li li a {
	padding-left: 16px;
	position: relative;
	color: var(--white);
}

#sidebar li li a::before {
	content: "\2192";
	position: absolute;
	left: 0;
	color: var(--orange);
}

#sidebar h2 {
	padding-left: 8px;
	letter-spacing: -0.5px;
	font-size: 1.7em;
	color: var(--white);
}

#sidebar p {
	margin: 0;
	padding: 0 8px 16px;
	text-align: justify;
	color: var(--muted);
}

#sidebar a {
	color: var(--sidebar-link);
}

#sidebar a:hover {
	text-decoration: underline;
}

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

#footer {
	width: 100%;
	margin: 0 auto; /* Maglev: the 24px gap above is .sgd-footer-wrap's padding */
	padding: 20px 20px;
	font-family: Arial, Helvetica, sans-serif;
	background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy-deep) 100%);
	border-radius: var(--radius);
}

#footer p {
	margin: 0;
	line-height: normal;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: center;
	color: var(--footer-link);
}

#footer a {
	color: var(--footer-link);
}

#footer a:hover {
	color: #00ffff;
}

/* ---------- Course / academics pages ---------- */

.coursemain {
	flex: 1 1 560px;
	min-width: 0;
	text-align: justify;
}

.courseobj span,
.coursepro span,
.coursemain table th span {
	color: #cc99cc;
	line-height: 1.6;
	border-bottom: 3px solid rgba(255, 255, 255, 0.35);
	font-size: 18px;
	display: inline-block;
	padding-bottom: 6px;
	margin-bottom: 10px;
}

.coursemain table {
	width: 100%;
	border-collapse: collapse;
}

.coursemain table th {
	padding: 10px 0 4px;
	color: #cc99cc;
	text-align: left;
}

.coursemain table td {
	vertical-align: top;
	padding: 4px 20px 4px 0;
}

.coursemain ul li {
	list-style: square;
}

/* Fix: <ul> inside <label> was invalid HTML; this inline <div> renders the same. */
.courseobj-text {
	display: inline;
}

.acadmicmain {
	flex: 1 1 560px;
	min-width: 0;
	color: var(--muted);
}

.acadmicmain ul {
	margin: 10px 0;
	padding-left: 22px;
	list-style-type: square; /* Fix: was the obsolete <ul type="square"> attribute */
}

/* ---------- Gallery / documents grid ---------- */

.thumb,
.testmonial {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	flex: 1 1 560px;
	min-width: 0;
	color: var(--white);
	padding-top: 10px;
}

.thumb a,
.testmonial a {
	display: block;
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.06);
}

.thumb img,
.testmonial img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
	border: 4px solid var(--white);
	border-radius: 10px;
	transition: transform 0.35s ease;
}

.thumb a:hover img,
.testmonial a:hover img {
	transform: scale(1.06);
}

.testmonial span.title {
	display: block;
	background: rgba(0, 0, 0, 0.6);
	color: var(--white);
	font-size: 11px;
	padding: 6px 8px;
}

/* ---------- Contact page ---------- */

.contactpage {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	width: 100%;
}

.map-embed {
	flex: 1 1 420px;
	min-width: 280px;
}

.map-embed iframe {
	width: 100%;
	height: 420px;
	border: 0;
	border-radius: 10px;
}

.bottminfoadd {
	flex: 1 1 260px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 10px;
	padding: 18px 20px;
	align-self: flex-start;
}

.bottminfoadd span {
	color: var(--orange);
	font-weight: bold;
	display: block;
	margin-bottom: 4px;
}

.bottminfoadd label {
	display: block;
	margin-bottom: 14px;
	color: var(--white);
}

.contactform {
	width: 100%;
	max-width: 680px;
	margin-top: 20px;
}

.contactform-card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	padding: 32px 36px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contactform-title {
	color: var(--white);
	font-size: 1.6em;
	margin-bottom: 8px;
}

.contactform-sub {
	color: var(--muted);
	margin-bottom: 22px;
	line-height: 1.5;
}

.contactform-alert {
	background: rgba(255, 90, 90, 0.15);
	border: 1px solid rgba(255, 120, 120, 0.4);
	color: #ffd6d6;
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 13px;
}

.contactform-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 18px;
}

.contactform-field {
	flex: 1 1 220px;
	display: flex;
	flex-direction: column;
	margin-bottom: 18px;
}

.contactform-row .contactform-field {
	margin-bottom: 0;
}

.contactform-field label {
	color: var(--white);
	font-weight: bold;
	font-size: 13px;
	margin-bottom: 6px;
}

.contactform input[type="text"],
.contactform input[type="email"],
.contactform textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	background-color: rgba(0, 20, 45, 0.75);
	color: var(--cream);
	font-family: inherit;
	font-size: 14px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contactform input[type="text"]:focus,
.contactform input[type="email"]:focus,
.contactform textarea:focus {
	outline: none;
	border-color: var(--orange);
	background-color: rgba(0, 20, 45, 0.95);
}

.contactform textarea {
	height: 120px;
	resize: vertical;
}

/* Maglev: the numeric captcha is gone (platform spam protection); the phone
   field keeps the half-row width it had next to it. */
.contactform-field--half {
	flex: 0 1 calc(50% - 10px);
}

.contactform-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contactform-captcha {
	display: flex;
	align-items: center;
	gap: 10px;
}

.contactform-captcha-code {
	flex: 0 0 auto;
	padding: 10px 16px;
	border-radius: 8px;
	background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 6px, rgba(255, 255, 255, 0.05) 6px 12px);
	border: 1px dashed rgba(255, 255, 255, 0.4);
	color: var(--white);
	font-weight: bold;
	letter-spacing: 0.15em;
	font-size: 15px;
}

.contactform .btn {
	margin-top: 6px;
}

.contactform-success {
	text-align: center;
	font-size: 16px;
	font-weight: bold;
	color: var(--white);
	padding: 40px 30px;
}

.btn {
	padding: 10px 22px;
	border: none;
	border-radius: 6px;
	background-color: var(--orange);
	color: var(--white);
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
	background-color: var(--green);
	transform: translateY(-1px);
}

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

.lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 8, 20, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	padding: 20px;
}

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

body.lightbox-locked {
	overflow: hidden;
}

.lightbox-frame {
	max-width: 90vw;
	max-height: 86vh;
	text-align: center;
}

.lightbox-img {
	max-width: 90vw;
	max-height: 78vh;
	border: 6px solid var(--white);
	border-radius: 6px;
	background: var(--white);
}

.lightbox-caption {
	color: var(--white);
	margin-top: 10px;
	font-size: 13px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: var(--white);
	cursor: pointer;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.lightbox-close {
	top: 20px;
	right: 20px;
	width: 42px;
	height: 42px;
	font-size: 26px;
	line-height: 1;
}

.lightbox-prev,
.lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	font-size: 28px;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* ---------- Scroll reveal animation ---------- */

.reveal {
	animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInDown {
	from { opacity: 0; transform: translateY(-14px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}

/* ---------- Responsive breakpoints ---------- */

@media (max-width: 1024px) {
	#content-area {
		flex-direction: column;
	}
	#sidebar {
		max-width: 100%;
	}
}

@media (max-width: 768px) {
	.headlogo {
		max-width: 400px;
		width: auto;
		height: auto;
		max-height: none;
		padding: 0px 16px 6px;
	}

	.nav-toggle {
		display: inline-block;
	}

	/* On mobile the toggle sits in the normal flex row (centered by #menu's own
	   align-items), over the wave image's navy tail; the link list becomes a dropdown
	   panel overlaid below instead of a second permanent bar. */
	#menu {
		min-height: 30px;
		padding: 5px 16px;
		overflow: visible;
		justify-content: flex-end;
	}

	.menu-wave {
		top: 0;
	}

	#menu ul {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		width: auto;
		justify-content: flex-start;
		background: var(--navy-deep);
		border-radius: 0 0 var(--radius) var(--radius);
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
	}

	#menu.is-open ul {
		display: flex;
	}

	#menu a {
		text-align: left;
		padding: 12px 14px;
	}

	#page-bgbtm {
		padding: 20px 14px 28px;
	}

	.slide-viewport {
		padding-top: 60%;
	}

	.coursemain table,
	.coursemain table tbody,
	.coursemain table tr,
	.coursemain table td {
		display: block;
		width: 100%;
	}

	.coursemain table td {
		padding: 10px 0;
	}
}

@media (max-width: 480px) {
	body {
		font-size: 14px;
	}

	/* Fix: the card's 36px side padding squeezed the form on 320px screens. */
	.contactform-card {
		padding: 24px 18px;
	}

	.contactform-field--half {
		flex-basis: 100%;
	}

	.slide-viewport {
		padding-top: 75%;
	}

	.thumb,
	.testmonial {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}

	.thumb img,
	.testmonial img {
		height: 120px;
	}

	.contactform input[type="text"],
	.contactform textarea {
		max-width: 100%;
	}
}


@media (max-width: 400px) {
	.headlogo {
		max-width: 232px;
		width: auto;
		height: auto;
		max-height: none;
		padding: 0px 16px 6px;
	}
}


/* ---------- Maglev: page structure ----------
   The PHP page nested header, slider, page card (#page: title + content +
   sidebar) and footer. Maglev sections are siblings in one dropzone, so the
   dropzone is the flex container #content-area used to be, and the #page
   gradient is painted on it behind the page-card sections only (sgd.js sizes
   it to exactly their area; before/without JS it spans the dropzone, while
   header and footer gap repaint the body background over it). */

.sgd-dropzone {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	background-image: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
	background-repeat: no-repeat;
	background-size: 100% var(--sgd-page-height, 100%);
	background-position: 0 var(--sgd-page-top, 0);
}

.sgd-full {
	flex: 0 0 100%;
	max-width: 100%;
	min-width: 0;
}

/* Same paint as body (fixed attachment => pixel-identical), hiding the
   dropzone gradient where the PHP page showed the body background. */
.sgd-header-wrap,
.sgd-footer-wrap {
	background: var(--navy) linear-gradient(180deg, var(--cream) 0, var(--cream) 90px, var(--navy) 260px);
	background-attachment: fixed;
}

.sgd-footer-wrap {
	padding-top: 24px;
}

/* #page-bgbtm padding (30px 24px 40px) and #content-area gap (30px). */
.sgd-page-heading {
	padding: 30px 24px 0;
}

.sgd-main {
	flex: 1 1 560px;
	min-width: 0;
	margin: 0 24px 40px;
}

.sgd-sidebar-wrap {
	flex: 1 1 260px;
	max-width: 320px;
	min-width: 0;
	margin: 0 24px 40px 6px;
}

.sgd-sidebar-wrap #sidebar {
	max-width: none;
}

.sgd-main > #content,
.sgd-main > .coursemain,
.sgd-main > .acadmicmain,
.sgd-main > .thumb,
.sgd-main > .testmonial {
	width: 100%;
}


@media (max-width: 1024px) {
	.sgd-main,
	.sgd-sidebar-wrap {
		flex: 0 1 calc(100% - 48px);
		max-width: none;
		margin: 0 24px 40px;
	}

	.sgd-main + .sgd-sidebar-wrap {
		margin-top: -10px; /* 30px gap, as in the stacked #content-area */
	}
}

@media (max-width: 768px) {
	.sgd-page-heading {
		padding: 20px 14px 0;
	}

	.sgd-main,
	.sgd-sidebar-wrap {
		flex-basis: calc(100% - 28px);
		margin: 0 14px 28px;
	}

	.sgd-main + .sgd-sidebar-wrap {
		margin-top: 2px;
	}
}
