/* Local Font Definitions */
@font-face {
    font-family: 'Red Hat Display';
    src: url('../assets/fonts/RedHatDisplay-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../assets/fonts/RedHatDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../assets/fonts/RedHatDisplay-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../assets/fonts/RedHatDisplay-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../assets/fonts/RedHatDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../assets/fonts/RedHatDisplay-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
	--primary-color: #7B2429; /* red, match global */
	--secondary-color: #718b5e; /* green accent */
	--accent-color: #A1BBAC;
	--bg-color: #DDE5DB;
	--surface-color: #7FAE6E1a;
	--border-color: #7FAE6E33;
	--text-color: #7B2429; /* red text */
	--border-radius: 1vh;
}

/* Loading Screen */
.loading-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: var(--bg-color);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 99999;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-screen.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3vh;
}

.loader {
	width: 5vw;
	height: 5vw;
	border: 1vh solid rgba(127, 174, 110, 0.2);
	border-top: 1vh solid var(--primary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.loading-text {
	font-family: 'Red Hat Display', sans-serif;
	font-size: 2vw;
	font-weight: 500;
	color: var(--primary-color);
	text-align: center;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Enable native scrolling */
html, body { 
	overflow-y: auto;
	background-color: var(--bg-color);
}

.sections-grid {
	display: block; /* single column instead of flex two columns */
}

.sections-grid .col {
	width: 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1vh; /* vertical spacing between sections */
	margin-bottom: 2vh; /* gap between columns when stacked */
}

.sections-grid .col:last-child {
	margin-bottom: 0;
}

.sections-grid p {
    font-size: 2.5vh;
}

section {
	display: flex;
	flex-direction: column;
	border-radius: var(--border-radius);
	border: 1.5px solid #4a556840;
	/* spacing is handled by grid gap on the container */
}

body {
	font-family: 'Red Hat Display', 'Segoe UI', Arial, sans-serif;
	background: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
	min-height: 100vh;
	margin: 0;
}

/* Consistent scrollbar styling (same as index page) */
/* Firefox */
html { scrollbar-width: auto; /* wider than thin */ scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.05); }
/* WebKit */
html::-webkit-scrollbar { width: 14px; height: 14px; }
html::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); border-radius: 50%; }
html::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35); border-radius: 50%; }
html::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.5); }
/* Override scrollbar-thin class to match index page fat scrollbar */
.scrollbar-thin { scrollbar-width: auto !important; /* Firefox - make it fat like index */ scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.05) !important; }
.scrollbar-thin::-webkit-scrollbar { width: 14px !important; /* WebKit - make it fat like index */ height: 14px !important; }
.scrollbar-thin::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05) !important; border-radius: 50% !important; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35) !important; border-radius: 50% !important; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.5) !important; }

.h1 {
	font-family: 'Red Hat Display', sans-serif;
	font-size: clamp(22px, 2.1vw, 30px);
	font-weight: 800;
	color: var(--text-color); /* match nav-logo color */
	text-decoration: none;
	transition: color 0.3s ease;
	margin: 0;
}

.h1:hover {
    color: var(--primary-color);
}

/* Single column per region for cards inside each section */
.logos {
	gap: 0; /* no gaps between items */
}

/* Optional: extra internal spacing for two-item sections if desired */
.two-items .logos {
	row-gap: 6.5rem;
}

select {
	font-size: 1rem;
	padding: 0.5rem 1.2rem 0.5rem 0.7rem;
	border-radius: var(--border-radius);
	border: 1.5px solid var(--border-color);
	background: var(--surface-color);
	color: var(--primary-color);
	outline: none;
	transition: border 0.2s;
}
select:focus {
	border: 1.5px solid var(--primary-color);
}

.logo-card {
	display: grid; /* two columns: logo + content */
	grid-template-columns: auto 1fr;
	background: #7fae6e2d;
	border-radius: var(--border-radius);
	box-shadow: 0 0.1vh 5vh 0 var(--border-color);
	padding: 1.5vh;
	margin: 2vh;
	text-align: left;
	align-items: center;
	gap: 2vh;
	border: 0.2vh solid var(--border-color);
	box-sizing: border-box;
}

h2 {
	font-size: 2.5vh;
	font-weight: 750;
	margin: 0;
	padding: 2vh;
	border-bottom: 1.5px solid #4a556840;
}

.logo-frame {
	width: 10vh;
	aspect-ratio: 1 / 1;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0; /* no auto margins in grid row */
	overflow: hidden;
	flex-shrink: 0;
}
.logo-card img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

.logo-card .org-info {
	display: grid;
	/* Make name auto-width (content) and let second track flex; actions align to right inside it */
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 0.6rem;
}
.logo-card .org-name {
	font-size: 2.2vh;
	font-weight: 600;
	word-break: normal;
	white-space: nowrap; /* keep on one line */
	/* Ensure it doesn't accidentally stretch */
	width: auto;
}

.logo-card .org-actions {
	display: flex;
	gap: 1vh;
	justify-content: flex-end;
	justify-self: end; /* push actions to the right edge of the card */
	flex-wrap: wrap; /* wrap if tight */
}

.org-btn {
	padding: 0.8vh;
	background: var(--primary-color); /* default red */
	/* progress-fill setup: green gradient grows on hover */
	background-image: linear-gradient(to right, var(--secondary-color), var(--secondary-color));
	background-size: 0% 100%;
	background-repeat: no-repeat;
	color: white;
	font-size: 2vh;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 1px 4px 0 var(--border-color);
	letter-spacing: 0.01em;
	transition: background-size 0.25s ease, color 0.18s, border 0.18s, box-shadow 0.18s;
	outline: none;
	display: inline-block;
	border-radius: var(--border-radius);
}
.org-btn:hover, .org-btn:focus {
	/* animate the green fill to 100% width */
	background-size: 100% 100%;
	color: #fff;
	box-shadow: 0 3px 12px 0 var(--border-color);
}
/* Optional: subtle press effect */
.org-btn:active { box-shadow: 0 2px 8px 0 var(--border-color); }

.search-input {
	display: inline-flex;           /* removes inline text gaps between children */
	align-items: center;            /* vertically center icon and input */
	background: var(--surface-color);
	border: 0.2vh solid var(--border-color);
	border-radius: var(--border-radius);
	width: 50vh;
	height: 6vh;
	padding: 1vh;
	position: relative;
	overflow: hidden;
	transition: width 0.35s ease, padding 0.35s ease, background-color 0.3s ease, margin-left 0.35s ease;
	justify-content: center; /* center the input inside */
	margin-left: auto; /* anchor to right */
}

/* Collapsed (icon only) state restored */
.search-input.is-collapsed {
	width: 6vh;
	height: 6vh;
	padding: 0; /* no inner padding so icon centers */
	cursor: pointer;
	justify-content: center;
	align-items: center;
	margin-left: auto; /* stay anchored to right */
}
.search-input.is-collapsed #orgSearch {
	opacity: 0;
	width: 0;
	padding: 0;
	border: none;
	pointer-events: none;
	color: transparent; /* hide text color entirely */
	transition: opacity 0.25s ease, width 0.35s ease;
}
.search-input.is-collapsed .search-toggle {
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	transition: opacity 0.25s ease;
}

/* Expanded state */
.search-input:not(.is-collapsed) {
	padding: 1vh; /* restore side padding when expanded */
}
.search-input:not(.is-collapsed) #orgSearch {
	width: 100%;
	opacity: 1;
	padding: 0; /* no extra padding */
	text-align: left; /* caret at start when expanded */
	transition: opacity 0.25s ease 0.05s, width 0.35s ease;
}
.search-toggle { /* hidden after expansion */
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 6vh;
	height: 6vh;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.search-input:not(.is-collapsed) .search-toggle {
	pointer-events: none;
}
.search-input .search-icon {
	width: 3.6vh;
	height: 3.6vh;
	min-width: 3.6vh;
	min-height: 3.6vh;
	transform: none;
	display: block;
	margin: 0;
	padding: 0;
}

/* Search input always visible: centered; padding defined in main block above */

.search-toggle { display: none; }


#orgSearch {
	width: 100%;
	max-width: none;
	font-size: 2vh;
	border: none; /* border on wrapper */
	background: transparent; /* background on wrapper */
	/* Neutralize away from theme red on blur */
	color: #444;
	outline: none;
	padding: 0;
	border-left: none; /* remove divider since icon removed */
	text-align: center; /* default (collapsed hidden state shows centered placeholder) */
	transition: color 0.2s ease, text-align 0.25s ease;
}
/* When wrapper expanded switch alignment (duplicate selector for specificity without !important) */
.search-input:not(.is-collapsed) #orgSearch {
	text-align: left; 
	padding: 0 2vh !important;
}
/* Make placeholder text use the same color (browsers fade it by default) */
/* Neutral placeholder tone */
#orgSearch::placeholder { color: #5d5d5d; opacity: 0.7; }
/* Optional vendor prefixes for broader support */
#orgSearch::-webkit-input-placeholder { color: #5d5d5d; opacity: 0.7; }
#orgSearch::-moz-placeholder { color: #5d5d5d; opacity: 0.7; }
#orgSearch:-ms-input-placeholder { color: #5d5d5d; opacity: 0.7; }
#orgSearch::-ms-input-placeholder { color: #5d5d5d; opacity: 0.7; }

/* Keep same neutral tone on focus (no red flash) */
#orgSearch:focus { color: #444; }
#orgSearch:focus::placeholder { color: #666; opacity: 1; }
#orgSearch:focus::-webkit-input-placeholder { color: #666; opacity: 1; }
#orgSearch:focus::-moz-placeholder { color: #666; opacity: 1; }
#orgSearch:focus:-ms-input-placeholder { color: #666; opacity: 1; }
#orgSearch:focus::-ms-input-placeholder { color: #666; opacity: 1; }

/* Collapsed: hide placeholder and remove transition side-effects */
.search-input.is-collapsed #orgSearch::placeholder,
.search-input.is-collapsed #orgSearch::-webkit-input-placeholder,
.search-input.is-collapsed #orgSearch::-moz-placeholder,
.search-input.is-collapsed #orgSearch:-ms-input-placeholder,
.search-input.is-collapsed #orgSearch::-ms-input-placeholder { opacity: 0; }
.search-input.is-collapsed #orgSearch { transition: none; }

/* Two-column merged layout styles */
.merged-content {
    display: flex;
    gap: 3vh;
    max-width: 100%;
}

.left-column,
.right-column {
    flex: 1;
}

.left-column {
    max-width: 50%;
}

.right-column {
    max-width: 50%;
}

.section-title {
    font-size: 3.5vh;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2.5vh;
    text-align: left;
	padding: 0 0 1vh 0;
}

/* Right column header with title and search side by side */
.right-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2vh;
    flex-wrap: nowrap;
}

.right-column-header .section-title {
    flex: 1 1 auto;
}

.right-column-header .search-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
	margin-bottom: 3vh;
	justify-content: flex-end;
}

.right-column-header .search-input {
    margin: 1vh 0 !important;
    align-self: center;
    max-width: none;
    width: 100%;
    min-width: 5vh;
    font-size: 2vh;
    font-weight: 600;
    height: 5vh !important;
    padding: 0 !important;
    box-sizing: border-box;
    line-height: 1.2;
}

.right-column-header .search-input.is-collapsed {
    width: 5vh;
    height: 5vh !important;
    margin: 1vh 1vh;
    padding: 0;
}

.right-column-header .search-input:not(.is-collapsed) {
    height: 5vh !important;
    margin: 1vh 1vh;
    padding: 0 !important;
}

.right-column-header .search-icon {
    width: 3vh !important;
    height: 3vh !important;
    min-width: 3vh;
    min-height: 3vh;
}

/* Content cards for left column */
.content-card {
    border: 0.2vh solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 2vh;
    box-shadow: 0 0.2vh 0.8vh rgba(107, 59, 41, 0.1);
    overflow: hidden;
    background: transparent;
}

.content-card .card-title {
    font-size: 2.5vh;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    padding: 2vh;
    background: #7fae6e2d;
    border-bottom: 0.2vh solid var(--border-color);
}

.content-card .card-content {
    padding: 2vh;
    background: #DDE5DB;
}

.content-card .card-content p {
    margin: 0;
    line-height: 1.6;
	font-size: 2.3vh;

}

.content-card .card-content p:last-child {
    margin-bottom: 0;
}

.content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-list li {
    padding-bottom: 1vh;
    padding-left: 3.5vh;
	font-size: 2.3vh;
    position: relative;
    border-bottom: 0.1vh solid rgba(var(--primary-rgb), 0.1);
	margin-bottom: 1vh;
}

.content-list li:last-child {
    border-bottom: none;
}

.content-list li::before {
    content: '→';
    color: var(--primary-color);
    font-weight: 600;
    font-size: 3vh;
    position: absolute;
    left: 0;
    top: 0.5em;
    line-height: 0;
    margin-right: 0.5vh;
}

/* ---- Styles from pages.css ---- */

/* Main content */
.main-content {
    padding: 10vh 8vh 3vh 8vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
}

/* Bottom page credit (inline footer, not floating) */
.site-credit {
	position: static;
	left: auto;
	bottom: auto;
	display: block;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
	text-align: left;
	color: rgba(0, 0, 0, 0.55);
	background: transparent;
	border: none;
	padding: 0 2rem 2rem 2rem;
	z-index: auto;
	pointer-events: auto;
	font-size: 1.5vh;
}

/* Cookie popup */
.cookie-popup {
    position: fixed;
    right: 0.5vw;
    bottom: 0.5vw;
    display: flex;
    align-items: center;
    gap: 0.3vw;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.3vw;
    box-shadow: 0 8px 32px rgba(107, 59, 41, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cookie-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-text {
    font-size: 0.8vw;
    color: var(--text-color);
}

.cookie-link {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-link:hover { 
    color: var(--primary-color); 
}

.cookie-accept {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.3vw;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(127, 174, 110, 0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 0.8vw;
    outline: none;
}

.cookie-accept:focus {
    background: var(--primary-color);
    box-shadow: 0 4px 16px rgba(127, 174, 110, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 0 4px rgba(127, 174, 110, 0.4);
}

.cookie-accept:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(107, 59, 41, 0.25);
}

.cookie-accept:active { 
    transform: translateY(0); 
}