/**
 * AWDS Resource Library — front-end styles (matches reference layout).
 */

.awds-resource-library {
	--awds-navy: #1a3a5c;
	--awds-blue: #2c5f8a;
	--awds-icon-bg: #e8f0f6;
	--awds-icon-fg: #3d7aab;
	--awds-muted: #6b7c8c;
	--awds-border: #e2e8ef;
	--awds-text: #2a3540;
	--awds-section-bg: #1e4a6e;
	font-family: inherit;
	color: var(--awds-text);
	max-width: 1100px;
	margin: 0 auto;
}

/* Jump to nav */
.awds-jump-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	padding: 0.85rem 0 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--awds-border);
}

.awds-jump-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--awds-muted);
}

.awds-jump-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.awds-jump-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--awds-blue);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
}

.awds-jump-link:hover {
	color: var(--awds-navy);
	text-decoration: underline;
}

.awds-jump-link .awds-icon {
	width: 18px;
	height: 18px;
	color: var(--awds-icon-fg);
}

/* Sections */
.awds-section {
	margin-bottom: 2.75rem;
	scroll-margin-top: 100px;
}

.awds-section-header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.85rem;
	border-bottom: 2px solid var(--awds-border);
}

.awds-section-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--awds-section-bg);
	color: #fff;
	border-radius: 6px;
	overflow: hidden;
}

.awds-section-icon svg,
.awds-jump-icon svg {
	width: 24px;
	height: 24px;
	display: block;
}

.awds-section-icon .awds-section-icon-img,
.awds-jump-icon .awds-section-icon-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.awds-jump-icon {
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--awds-icon-fg);
	overflow: hidden;
}

.awds-jump-icon svg {
	width: 18px;
	height: 18px;
}

.awds-section-heading {
	flex: 1;
	min-width: 0;
}

.awds-section-title {
	margin: 0 0 0.2rem;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--awds-navy);
	line-height: 1.25;
}

.awds-section-desc {
	margin: 0;
	font-size: 0.95rem;
	color: var(--awds-muted);
	line-height: 1.4;
}

.awds-section-count {
	flex-shrink: 0;
	font-size: 0.9rem;
	color: var(--awds-muted);
	padding-top: 0.35rem;
	white-space: nowrap;
}

.awds-item-count-wrap {
	max-width: none;
}

.awds-item-count-wrap .awds-item-count {
	padding-top: 0;
	display: inline-block;
}

/* Item grid */
.awds-resource-items {
	max-width: none;
}

.awds-items-grid {
	display: grid;
	gap: 1rem 1.25rem;
}

.awds-cols-1 {
	grid-template-columns: 1fr;
}

.awds-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.awds-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.awds-item {
	min-width: 0;
	background: #fff;
	border: 1px solid var(--awds-border);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(26, 58, 92, 0.06);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.awds-item:hover {
	border-color: #c5d4e3;
	box-shadow: 0 4px 12px rgba(26, 58, 92, 0.1);
}

.awds-item-inner {
	display: flex;
	align-items: flex-start;
	gap: 0.95rem;
	padding: 1.15rem 1.2rem;
	text-decoration: none;
	color: inherit;
	border-radius: 10px;
	box-sizing: border-box;
	width: 100%;
	background: transparent;
	border: 0;
	font: inherit;
	text-align: left;
	cursor: default;
}

button.awds-item-inner.awds-video-trigger {
	cursor: pointer;
}

button.awds-item-inner.awds-video-trigger:hover .awds-item-title,
a.awds-item-inner:hover .awds-item-title {
	color: var(--e-global-color-primary);;
}

.awds-item-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #E4E4F1;
	color: var( --e-global-color-primary );
	border-radius: 8px;
	overflow: hidden;
	padding: 10px;
}

.awds-item-icon svg {
	width: 20px;
	height: 20px;
	display: block;
	fill: var(--e-global-color-primary);
}

.awds-item-icon .awds-section-icon-img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain; 
	box-sizing: border-box;
	border-radius: 0;
	color:var( --e-global-color-primary );
}

.awds-item-body {
	min-width: 0;
}

.awds-item-title {
	margin: 0;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--e-global-color-primary);
    line-height: 24px !important;
}

.awds-item-meta {
	margin: 0 0 0.25rem;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--awds-muted);
}

.awds-item-desc {
	margin: 0;
	font-size: 0.9rem;
	color: var(--awds-muted);
	line-height: 1.4;
}

.awds-item-embed {
	margin: 0 1.2rem 1.15rem;
	position: relative;
	width: calc(100% - 2.4rem);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 6px;
	background: #000;
	flex-shrink: 0;
}

.awds-item-embed iframe,
.awds-item-embed video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: 100%;
	border: 0;
	display: block;
	object-fit: contain;
	background: #000;
}

/* Fallback for older browsers without aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
	.awds-item-embed {
		height: 0;
		padding-bottom: 56.25%;
	}
}

.awds-item-text {
	margin: 0 1.2rem 1.15rem;
	padding-left: calc(44px + 0.95rem);
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--awds-text);
}

.awds-empty {
	color: var(--awds-muted);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Video popup / lightbox */
body.awds-modal-open {
	overflow: hidden;
}

.awds-video-modal[hidden] {
	display: none !important;
}

.awds-video-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-sizing: border-box;
}

.awds-video-modal__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(10, 20, 30, 0.72);
}

.awds-video-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(920px, 100%);
	background: #111827;
	border-radius: 12px;
	padding: 1rem 1rem 1.15rem;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
	isolation: isolate;
}

.awds-video-modal__close {
	position: absolute;
	top: 0.35rem;
	right: 0.55rem;
	z-index: 3;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
}

.awds-video-modal__close:hover {
	opacity: 1;
}

.awds-video-modal__title {
	position: relative;
	z-index: 2;
	margin: 0 2rem 0.75rem 0.25rem;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
}

.awds-video-modal__player {
	position: relative;
	z-index: 2;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	border-radius: 8px;
	overflow: hidden;
	background: transparent;
}

.awds-video-modal__player iframe,
.awds-video-modal__player video {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: transparent;
}

.awds-video-modal__player iframe[hidden],
.awds-video-modal__player video[hidden] {
	display: none !important;
}

@media (max-width: 768px) {
	.awds-cols-2,
	.awds-cols-3 {
		grid-template-columns: 1fr;
	}

	.awds-section-header {
		flex-wrap: wrap;
	}

	.awds-section-count {
		width: 100%;
		padding-top: 0;
		padding-left: calc(48px + 1rem);
	}

	.awds-item-text {
		padding-left: 0;
	}
}

/* Icon positions + Elementor editor layout fixes (appended — do not replace site styles above) */
.awds-item-heading {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
	width: 100%;
}

.awds-item--icon-before .awds-item-heading {
	display: block;
}

/* Immediate after heading — icon sits next to the title text */
.awds-item--icon-after .awds-item-heading .awds-item-title {
	flex: 0 1 auto;
	min-width: 0;
}

.awds-item--icon-after .awds-item-heading .awds-item-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	padding: 8px;
}

/* Right corner — icon is a sibling of the body, pinned to the card's right edge */
.awds-item--icon-right .awds-item-inner {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	width: 100%;
}

.awds-item--icon-right .awds-item-body {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	padding-right: 0.75rem;
	order: 1;
}

.awds-item--icon-right .awds-item-heading {
	display: block;
	width: 100%;
}

.awds-item--icon-right .awds-item-inner > .awds-item-icon {
	flex: 0 0 36px;
	margin-left: auto !important;
	align-self: flex-start;
	width: 36px;
	height: 36px;
	padding: 8px;
	order: 2;
}

.elementor-editor-active .awds-item-inner,
.elementor-editor-preview .awds-item-inner {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start !important;
	flex-wrap: nowrap !important;
	width: 100%;
	box-sizing: border-box;
}

.elementor-editor-active .awds-item-body,
.elementor-editor-preview .awds-item-body {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

.elementor-editor-active .awds-item-icon,
.elementor-editor-preview .awds-item-icon {
	flex-shrink: 0;
}
