/* assets/css/components.css */

/* ======================================================================================
   BREADCRUMBS COMPONENT STYLES -- app\components\breadcrumbs.php
   ====================================================================================== */

	.breadcrumb {
		font-size: 0.75rem;
		margin-bottom: 0;
	}

/* ======================================================================================
   DOCUMENT VIEWER COMPONENT STYLES (RESPONSIVE PDF EMBEDS & DOCUMENT VIEWPORTS) -- app\components\document-viewer.php
   ====================================================================================== */

	/* Desktop / Default */
	.kgs-document-embed-container {
		position: relative;
		width: 100%;
		height: 850px;
		margin-bottom: 2rem;
		overflow: hidden;
	}

	.kgs-document-embed-container iframe {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		border: 0;
		transition: height 0.2s ease-in-out;
	}

	/* Tablet */
	@media (max-width: 991.98px) {
		.kgs-document-embed-container {
			height: 520px;
			margin-bottom: 1.5rem;
		}

		.kgs-pdf-viewport {
			height: 520px !important;
			min-height: 520px !important;
		}
	}

	/* Mobile */
	@media (max-width: 575.98px) {
		.kgs-document-embed-container {
			height: 420px;
			margin-bottom: 1.25rem;
		}

		.kgs-pdf-viewport {
			height: 420px !important;
			min-height: 420px !important;
		}
	}

/* ======================================================================================
   FILE LIST COMPONENT STYLES -- app\components\file-list.php
   ====================================================================================== */

	.kgs-file-list {
		padding: 0;
		font-family: system-ui, -apple-system, sans-serif;
	}

	.kgs-file-list__toolbar {
		display: flex;
		flex-wrap: wrap;
		gap: .75rem;
		margin-bottom: 1.5rem;
		align-items: center;
	}

	.kgs-fl-folder__toggle {
		display: flex;
		align-items: center;
		gap: .6rem;
		width: 100%;
		background: 0 0;
		border: none;
		padding: .5rem;
		text-align: left;
		font-weight: 600;
		color: #4a5568;
		cursor: pointer;
		border-radius: 6px;
		transition: .2s;
	}

	.kgs-fl-folder__toggle:hover {
		background: #f7fafc;
		color: #2b6cb0;
	}

	/* RECONCILED: Scoped file-list elements inherit context colors [Section 1] */
	[class*="context-"] .kgs-fl-folder__toggle {
		color: inherit !important;
	}
	[class*="context-"] .kgs-fl-file__link {
		color: inherit !important;
	}

	.kgs-fl-caret {
		font-size: .75rem;
		color: #a0aec0;
		transition: transform .2s;
	}

	.kgs-fl-folder__toggle.collapsed .kgs-fl-folder-icon--open {
		display: none;
	}

	.kgs-fl-folder__toggle:not(.collapsed) .kgs-fl-caret {
		transform: rotate(90deg);
	}

	.kgs-fl-folder__toggle:not(.collapsed) .kgs-fl-folder-icon--closed {
		display: none;
	}

	.kgs-fl-folder-icon {
		color: #d69e2e;
		font-size: 1.1rem;
		margin-right: 6px;
	}

	.kgs-fl-folder__children {
		padding-left: 1.25rem;
		border-left: 1px solid #e2e8f0;
		margin-left: .9rem;
	}

	.kgs-fl-file {
		display: flex;
		align-items: center;
		padding: .25rem .5rem;
	}

	.kgs-fl-file:hover {
		background: #f7fafc;
	}

	.kgs-fl-file__link {
		display: flex;
		align-items: center;
		gap: .6rem;
		text-decoration: none;
		color: #4a5568;
		font-size: .925rem;
		width: 100%;
	}

	.kgs-fl-file__link:hover {
		color: #3182ce;
	}

	.kgs-fl-icon {
		font-size: 1.1rem;
		flex-shrink: 0;
	}

	.kgs-fl-icon--pdf {
		color: #e53e3e;
	}

	.kgs-fl-icon--doc {
		color: #3182ce;
	}

	.kgs-fl-icon--xls {
		color: #38a169;
	}

	.kgs-fl-hidden {
		display: none !important;
	}

	.kgs-search-box {
		border-radius: 20px;
		padding-left: 1rem;
		border: 1px solid #e2e8f0;
		max-width: 300px;
	}

/* ======================================================================================
	GOOGLE DOC CONTENT COMPONENT STYLES -- app\components\google-doc-content.php
   ====================================================================================== */

	/* 1. Responsive Media & Image Wrapper Scaling */
	.kgs-google-doc-content img {
		max-width: 100% !important;
		height: auto !important;
		display: block;
		margin: 0.5rem auto;
	}

	/* Prevent fixed-width parent wraps (Google's wrap spans) from breaking layouts on mobile */
	.kgs-google-doc-content span,
	.kgs-google-doc-content div,
	.kgs-google-doc-content p {
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.kgs-google-doc-content table {
		max-width: 100% !important;
		width: 100% !important;
		table-layout: fixed;
	}

	/* Anchor tag color and decoration standard */
	.kgs-google-doc-content a {
		color: var(--primary);
		text-decoration: underline;
		display: inline-block;
		max-width: 100%;
	}

	/* RECONCILED: Anchor links adapt dynamically inside dark contexts [Section 1] */
	.context-dark .kgs-google-doc-content a,
	.context-primary .kgs-google-doc-content a,
	.context-secondary .kgs-google-doc-content a,
	.context-black .kgs-google-doc-content a {
		color: var(--accent) !important; /* High contrast Sky Blue on dark blue [Section 1] */
	}

	/* FIX: Force anchors wrapping block images to display block, preventing height collapses */
	.kgs-google-doc-content a:has(img) {
		display: inline-block !important;
		max-width: 100% !important;
		width: auto !important;
	}

	.kgs-google-doc-content a img {
		display: block !important;
		max-width: 100% !important;
		height: auto !important;
		margin: 0 auto;
	}

	/* 2. Mobile Layout Alignment & Overflow Prevention */
	@media (max-width: 768px) {

		.kgs-google-doc-content p,
		.kgs-google-doc-content span,
		.kgs-google-doc-content li {
			margin-left: 0 !important;
			margin-right: 0 !important;
			padding-left: 0 !important;
			padding-right: 0 !important;
			text-indent: 0 !important;
			word-break: break-word;
		}

		.kgs-google-doc-content table {
			display: block;
			overflow-x: auto;
		}
	}

/* ======================================================================================
   LINK TILES COMPONENT STYLES -- app\components\link-tiles.php
   ====================================================================================== */

	.kgs-tile-wrapper {
		flex: 1 1 200px;
		max-width: 320px;
		margin: 12px;
	}

	.kgs-tile {
		background: #fff;
		border-bottom: 4px solid var(--accent) !important;
		min-height: 160px;
		transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	}

	.kgs-tile:hover {
		transform: translateY(-8px);
		background: #fafafa;
		box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
	}

	/* Touch devices: Strictly forces 2 tiles per row [5] */
	@media (max-width: 576px) {
		.kgs-tile-wrapper {
			flex: 0 0 calc(50% - 12px);
			max-width: calc(50% - 12px);
			margin: 6px;
			box-sizing: border-box;
		}
	}

/* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */

/* ======================================================================================
   HERO STYLES (Fluid Proportional Layout) -- app\components\hero.php 
   ====================================================================================== */

	.hero-component {
		margin-top: 0;
		position: relative;
		overflow: hidden;
		background-color: var(--secondary);
		width: 100%;
	}

	/* Base Image Behavior */
	.hero-component img {
		width: 100%;
		display: block;
		object-position: center 35%;
	}

	/* Fluid Aspect-Ratio scaling matches vertical scale to widescreen width */
	@media (min-width: 769px) {
		.hero-component img {
			height: auto;
			aspect-ratio: 21 / 9;
			min-height: 350px;
			max-height: 500px;
			object-fit: cover;
		}
	}

	@media (max-width: 768px) {

		/* Full View: Show 100% of the image aspect-ratio natively */
		.hero-mobile-full img {
			height: auto !important;
			min-height: 180px;
		}

		/* Crop View: Fluid proportional height clamping for mobile screens */
		.hero-mobile-crop img {
			height: clamp(200px, 35vh, 280px);
			object-fit: cover;
		}

		/* Fluid Micro-scale typography adjustments on mobile screens */
		.hero-component .hero-title {
			font-size: clamp(1.4rem, 6vw, 1.85rem) !important;
			letter-spacing: -0.02em;
		}

		.hero-component .hero-subtitle {
			font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
		}

		.hero-component .translate-middle {
			width: 100% !important;
			padding: 0 16px !important;
		}
	}

	/* AAA WCAG Contrast Typography Engine */
	.hero-title {
		font-size: clamp(2rem, 5vw, 3.5rem);
		font-weight: 800;
		line-height: 1.15;
		margin-bottom: 0.5rem;
		letter-spacing: -0.01em;
		text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.5);
	}

	.hero-subtitle {
		font-size: clamp(1rem, 2vw, 1.5rem);
		font-weight: 500;
		margin: 0;
		line-height: 1.35;
		text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 3px 8px rgba(0, 0, 0, 0.5);
	}

	.hero-vignette-overlay {
		background: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 85%);
		pointer-events: none;
	}


/* ======================================================================================
  WEATHER COMPONENT STYLES -- app\components\weather.php 
   ====================================================================================== */

	.card:has(.display-3) .display-3 {
		font-size: var(--kgs-size-display) !important;
		font-weight: 900 !important;
	}


/* ======================================================================================
   LIVE FEED COMPONENT STYLES -- app\components\live-feed.php 
   ====================================================================================== */

	.kgs-feed-media-col {
		width: 100%;
		max-width: 100%;
	}

	@media (min-width: 768px) {
		.kgs-feed-media-col {
			width: 325px !important;
			min-width: 325px !important;
			max-width: 325px !important;
			flex-shrink: 0;
		}
	}

	.kgs-feed-img-side-wrapper {
		width: 100%;
		height: auto;
	}

	.kgs-feed-img-side-wrapper img {
		width: 100% !important;
		height: auto !important;
		max-width: 100% !important;
		display: block;
		border-radius: 0.5rem;
	}

	.kgs-feed-doc-side-wrapper {
		width: 100%;
		height: 380px;
		background-color: #fff;
	}

	.kgs-feed-doc-side-wrapper iframe {
		width: 100% !important;
		height: 100% !important;
		border: none;
	}

	.kgs-feed-zoomable-img {
		cursor: zoom-in;
		transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
	}

	.kgs-feed-zoomable-img:hover {
		transform: scale(1.02);
		opacity: 0.95;
	}

	.kgs-feed-lightbox {
		position: fixed;
		z-index: 999999;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		overflow: hidden;
		background-color: rgba(0, 0, 0, 0.85);
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.kgs-feed-lightbox-content {
		max-width: 90%;
		max-height: 85vh;
		object-fit: contain;
		border-radius: 0.5rem;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
		transform: scale(0.95);
		transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	}

	.kgs-feed-lightbox.show .kgs-feed-lightbox-content {
		transform: scale(1);
	}

	.kgs-feed-lightbox-close {
		position: absolute;
		top: 20px;
		right: 30px;
		color: #f1f1f1;
		font-size: 40px;
		font-weight: bold;
		cursor: pointer;
		user-select: none;
		transition: transform 0.2s;
	}

	.kgs-feed-lightbox-close:hover {
		color: #ffffff;
		transform: scale(1.1);
	}


/* ======================================================================================
   FACEBOOK COMPONENT STYLES -- app\components\facebook-feed.php
   ====================================================================================== */
	   
	.fb-container {
		width: 100% !important;
		max-width: 500px !important;
		height: 800px;
		overflow: hidden;
		margin: 0 auto;
		box-sizing: border-box;
	}

	.fb-container iframe {
		width: 100% !important;
		max-width: 100% !important;
		height: 800px !important;
		border: none !important;
		box-sizing: border-box;
	}

	#.container:has(#facebook-module) {
		background-color: inherit;
		/background-color: var(--primary);
	}

	##facebook-module .rich-text-title span {
		color: inherit;
	}

	##facebook-module .rich-text-title span i {
		color: inherit;
	}

	##facebook-module .btn {
		/background-color: #FFFFFF !important;
		/color: var(--primary) !important;
		border: 1px solid #FFFFFF !important;
		transition: all 0.2s ease-in-out;
	}

	##facebook-module .btn:hover {
		background-color: var(--accent) !important;
		color: var(--secondary) !important;
		border-color: var(--accent) !important;
	}

	##facebook-module .btn:active {
		background-color: var(--primary) !important;
		color: #FFFFFF !important;
		border-color: #FFFFFF !important;
	}


/* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */


/* ======================================================================================
   PEOPLE DIRECTORY COMPONENT: FLUID ROW LOGIC -- app\components\people-list.php
   ====================================================================================== */

	.kgs-people-card {
		border-left: 4px solid var(--primary) !important;
		transition: transform 0.2s ease-in-out;
		background: #fff;
	}

	.kgs-people-card:hover {
		transform: translateX(5px);
	}

	/* RECONCILED: Standardizes People Cards to dark text on white to prevent context overlaps [Section 1] */
	.kgs-people-card,
	[class*="context-"] .kgs-people-card {
		background-color: #FFFFFF !important;
		color: #333333 !important;
	}
	.kgs-people-card .text-primary,
	.kgs-people-card .fw-bold,
	[class*="context-"] .kgs-people-card .text-primary,
	[class*="context-"] .kgs-people-card .fw-bold {
		color: var(--primary) !important;
	}
	.kgs-people-card .text-muted,
	[class*="context-"] .kgs-people-card .text-muted {
		color: #6c757d !important;
	}
	.kgs-people-card i,
	[class*="context-"] .kgs-people-card i {
		color: var(--primary) !important; /* Prevents global inherit override */
	}

	.people-card-thumb {
		flex: 0 0 60px;
	}

	.people-card-thumb img {
		width: 50px;
		height: 50px;
		object-fit: cover;
		border-radius: 50%;
	}

	.kgs-person-fluid-row {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		flex-grow: 1;
		min-width: 0;
	}

	@media (min-width: 768px) {
		.kgs-person-col--name {
			flex: 0 0 15%;
			padding-right: 5px;
		}

		.kgs-person-col--title {
			flex: 0 0 65%;
			padding-right: 5px;
		}

		.kgs-person-col--email {
			flex: 0 0 20%;
			text-align: left;
		}
	}

	@media (max-width: 767px) {
		.kgs-person-col {
			flex: 0 0 100% !important;
			margin-bottom: 0.25rem;
			text-align: left !important;
			white-space: normal !important;
			overflow: visible !important;
			text-overflow: clip !important;
			word-break: break-word;
		}

		.kgs-person-col--email {
			overflow-wrap: anywhere;
		}
	}

	.kgs-person-col {
		min-width: 0;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.kgs-person-col--email a {
		color: var(--primary);
		font-weight: 500;
	}


/* ======================================================================================
   PEOPLE PROFILE BOX COMPONENT STYLES -- app\components\people-profile.php
   ====================================================================================== */

	.kgs-people-profile-widget {
		width: 100%;
		margin-bottom: 4rem !important;
		padding-bottom: 1.5rem !important;
	}

	.kgs-profile-card-container {
		display: flex;
		flex-wrap: wrap;
		gap: 1rem;
		justify-content: center;
		width: 100%;
	}

	.kgs-profile-card {
		min-width: 180px;
		max-width: 100%;
		flex: 1;
	}

	/* RECONCILED: Standardizes Profile Cards to dark text on white to prevent context overlaps [Section 1] */
	.kgs-profile-card,
	[class*="context-"] .kgs-profile-card {
		background-color: #FFFFFF !important;
		color: #333333 !important;
	}
	.kgs-profile-card h6,
	.kgs-profile-card .fw-bold,
	[class*="context-"] .kgs-profile-card h6,
	[class*="context-"] .kgs-profile-card .fw-bold {
		color: #000000 !important;
	}
	.kgs-profile-card p,
	.kgs-profile-card .text-muted,
	[class*="context-"] .kgs-profile-card p,
	[class*="context-"] .kgs-profile-card .text-muted {
		color: #6c757d !important;
	}
	.kgs-profile-card i,
	[class*="context-"] .kgs-profile-card i {
		color: var(--primary) !important; /* Prevents global inherit override */
	}

	.kgs-people-profile-widget .card h6 {
		font-size: var(--kgs-size-h6) !important;
		font-weight: 700 !important;
	}

	.kgs-people-profile-widget .card p {
		font-size: var(--kgs-size-small) !important;
		line-height: 1.3;
	}
	

/* ======================================================================================
   CONTACT FORM COMPONENT STYLES -- app\components\contact-form.php
   ====================================================================================== */

	.kgs-contact-widget .btn-submit:hover {
		opacity: 0.9;
	}


/* ======================================================================================
   CONTACT INFO COMPONENT STYLES -- app\components\contact-info.php
   ====================================================================================== */

	.kgs-contact-widget {
		width: 100%;
		max-width: 80rem;
		margin: 0 auto;
		padding: 0;
		font-family: system-ui, -apple-system, sans-serif;
		font-size: 1.1rem;
	}

	.kgs-contact-widget .grid-layout {
		display: grid;
		grid-template-columns: 1fr;
		gap: 2rem;
		margin-top: 1.5rem;
	}

	@media (min-width: 1024px) {
		.kgs-contact-widget .grid-layout {
			grid-template-columns: 4fr 8fr;
		}
	}

	.kgs-contact-widget .card {
		border-radius: 0.75rem;
		border: 1px solid #f3f4f6;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
		padding: 1.5rem;
		display: flex;
		flex-direction: column;
	}

	/* RECONCILED: Standardizes Contact Cards to dark text on white to prevent context overlaps [Section 1] */
	.kgs-contact-widget .card,
	[class*="context-"] .kgs-contact-widget .card {
		background-color: #FFFFFF !important;
		color: #333333 !important;
	}

	.kgs-contact-widget .icon-wrapper {
		min-width: 2.5rem;
		height: 2.5rem;
		border-radius: 0.5rem;
		background-color: #f9fafb;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 1px solid #f3f4f6;
		color: #4b5563;
		font-size: 1.1rem;
	}

	.kgs-contact-widget .hover-underline:hover {
		text-decoration: underline !important;
		color: var(--primary) !important; /* FIXED: Resolved unparsed static PHP tags */
	}

	.kgs-contact-widget .badge-mono {
		font-size: 12px;
		font-weight: 700;
		color: #6b7280;
		text-transform: uppercase;
		display: block;
		margin-top: 0.25rem;
	}

	.kgs-contact-widget .form-input {
		width: 100%;
		padding: 0.625rem 0.75rem;
		font-size: 1rem;
		border: 1px solid #e5e7eb;
		border-radius: 0.5rem;
		box-sizing: border-box;
	}

	.kgs-contact-widget .form-input:focus {
		outline: none;
		border-color: var(--primary); /* FIXED: Resolved unparsed static PHP tags */
		box-shadow: 0 0 0 1px var(--primary); /* FIXED: Resolved unparsed static PHP tags */
	}

	.kgs-contact-widget .form-label {
		font-size: 12px;
		font-weight: 700;
		color: #6b7280;
		text-transform: uppercase;
		display: block;
		margin-bottom: 0.25rem;
	}

	.kgs-contact-widget .btn-submit {
		width: 100%;
		padding: 0.75rem;
		color: #ffffff;
		border: none;
		border-radius: 0.5rem;
		font-size: 1rem;
		font-weight: 700;
		cursor: pointer;
		transition: opacity 0.2s;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	}
	
/* ======================================================================================
   NESTED ACCORDION ALIGNMENTS (Visual Separations)
   ====================================================================================== */

.kgs-nested-accordion {
    border-radius: 8px;
    overflow: hidden;
}

.kgs-nested-accordion .accordion-item {
    border-color: rgba(var(--primary-rgb), 0.08) !important;
    margin-bottom: 0.5rem !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.kgs-nested-accordion .accordion-button {
    padding: 0.75rem 1rem !important;
    font-size: var(--kgs-size-small) !important;
    background-color: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 600 !important;
}

.kgs-nested-accordion .accordion-button:not(.collapsed) {
    background-color: rgba(var(--primary-rgb), 0.04) !important;
    color: var(--primary) !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.kgs-nested-accordion .accordion-body {
    padding: 1.25rem !important;
    background-color: #ffffff;
}