/*
Theme Name: IAEG Field School
Theme URI: https://fieldschool.nseg.org.np
Author: Nepal Society of Engineering Geology (NSEG)
Author URI: https://nseg.org.np
Description: Block theme for the IAEG Field School in the Himalaya, organised by the Nepali, Austrian and Italian National Groups of IAEG. On activation it creates the Home, Programme, Apply & fees and People & partners pages.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iaeg-field-school
Tags: block-theme, full-site-editing, education
*/

/* ---------- Base ---------- */
:root {
	--hfs-ink: #161C4A;
	--hfs-blue: #2C3691;
	--hfs-red: #EC1F28;
	--hfs-btn-red: #C8161E;
	--hfs-green: #2C6440;
	--hfs-italy: #0C458B;
	--hfs-sky: #B2D4EC;
	--hfs-brown: #5F3C1B;
	--hfs-tint: #EEF3FA;
	--hfs-line: #D6DCEB;
	--hfs-muted: #4B5270;
	--hfs-body: #2E3450;
}
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.hfs-main > .wp-block-post-content { margin-block-start: 0; margin-block-end: 0; }
p { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { margin-top: 0; }

/* ---------- Header ---------- */
.hfs-stripe { display: flex; height: 6px; }
.hfs-stripe span { flex: 1 1 0; }
.hfs-stripe span:nth-child(1) { background: var(--hfs-red); }
.hfs-stripe span:nth-child(2) { background: var(--hfs-blue); }
.hfs-stripe span:nth-child(3) { background: var(--hfs-green); }
.hfs-stripe span:nth-child(4) { background: var(--hfs-italy); }
.hfs-stripe span:nth-child(5) { background: var(--hfs-sky); }

.hfs-util { background: var(--hfs-ink); color: #DDE2F3; font-size: 13px; line-height: 1.4; padding-top: 8px; padding-bottom: 8px; }
.hfs-util p { margin: 0; }
.hfs-util a { color: #DDE2F3; }
.hfs-util > .wp-block-group { gap: 6px 24px; }

.hfs-header { background: #fff; border-bottom: 1px solid var(--hfs-line); padding-top: 12px; padding-bottom: 12px; }
.hfs-header > .wp-block-group { gap: 12px 32px; align-items: center; }
.hfs-brand { gap: 14px; align-items: center; }
.hfs-brand-mark { display: block; line-height: 0; }
.hfs-emblem { display: block; width: 60px; height: 60px; }
.hfs-brand-title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 21px; line-height: 1.1; letter-spacing: -0.01em; }
.hfs-brand-title a { color: var(--hfs-ink); text-decoration: none; }
.hfs-brand-tag { margin: 0; font-size: 14px; line-height: 1.3; color: var(--hfs-muted); }
.hfs-brand .wp-block-group > * + * { margin-block-start: 2px; }

.hfs-navwrap { gap: 4px 12px; align-items: center; }
.hfs-nav { font-size: 15px; gap: 2px; }
.hfs-nav .wp-block-navigation-item__content { display: block; padding: 12px 12px; color: var(--hfs-ink); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; }
.hfs-nav .wp-block-navigation-item__content:hover { color: var(--hfs-blue); }
.hfs-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--hfs-blue); font-weight: 600; border-bottom-color: var(--hfs-red); }
.hfs-btn-apply .wp-block-button__link { padding: 12px 20px; font-size: 15px; }

/* ---------- Sections ---------- */
.hfs-sec { padding-top: 104px; padding-bottom: 104px; }
.hfs-sec-sm { padding-top: 64px; padding-bottom: 64px; }
.hfs-sec-bottom { padding-bottom: 104px; }
.hfs-tint { background: var(--hfs-tint); }
.hfs-dark { background: var(--hfs-ink); color: #fff; }
.hfs-blue { background: var(--hfs-blue); color: #fff; }
.hfs-dark h1, .hfs-dark h2, .hfs-dark h3,
.hfs-blue h1, .hfs-blue h2, .hfs-blue h3,
.hfs-hero h1 { color: #fff; }
.hfs-dark p, .hfs-dark li { color: #C9D0EA; }
.hfs-blue p { color: #DDE2F3; }
.hfs-dark a, .hfs-blue a:not(.wp-element-button) { color: var(--hfs-sky); }
.hfs-sec > h2, .hfs-sec-bottom > h2 { margin-bottom: 40px; }

.hfs-lead { font-size: 20px; line-height: 1.55; max-width: 40em; color: var(--hfs-body); }
.hfs-measure { max-width: 46em; }
.hfs-small { font-size: 14px; }
.hfs-muted { color: var(--hfs-muted); }
.hfs-label { margin: 0; font-size: 15px; font-weight: 600; color: var(--hfs-brown); }
.hfs-dark .hfs-label, .hfs-hero .hfs-label { color: var(--hfs-sky); }
.hfs-crumb { font-size: 14px; color: var(--hfs-muted); margin: 0; }
.hfs-h-lg { font-size: 28px; }
.hfs-h-md { font-size: 28px !important; }

.hfs-gap-xl.wp-block-columns { gap: 48px 80px; }
.hfs-gap-l.wp-block-columns { gap: 32px 48px; }
.hfs-gap-m.wp-block-columns { gap: 20px; margin-top: 20px; }

.hfs-grid.hfs-grid { gap: 24px; }
.hfs-grid-sm.hfs-grid-sm { gap: 16px; }
.hfs-grid-items.hfs-grid-items { gap: 0 56px; }

/* ---------- Hero ---------- */
.hfs-hero { background: var(--hfs-ink); color: #fff; }
.hfs-hero-cols.wp-block-columns { gap: 0; margin: 0; }
.hfs-hero-text { padding: 88px 56px 80px max(24px, calc((100vw - 1240px) / 2 + 24px)); box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hfs-hero-text > * { margin: 0 !important; }
.hfs-hero h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.02em; }
.hfs-hero .hfs-lead { color: #DDE2F3; max-width: 34em; }
.hfs-hero .hfs-small { color: #B3BCDD; }
.hfs-hero-media { position: relative; min-height: 560px; }
.hfs-hero-media .wp-block-image { position: absolute; inset: 0; margin: 0; }
.hfs-hero-media .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hfs-hero-media figcaption { position: absolute; left: 16px; bottom: 16px; margin: 0; padding: 6px 10px; background: var(--hfs-ink); color: #DDE2F3; font-size: 12px; border-radius: 4px; }
.hfs-hero-org { padding-top: 24px; border-top: 1px solid #333B72; }
.hfs-hero-org > * + * { margin-block-start: 14px; }
@media (max-width: 781px) {
	.hfs-hero-text { padding: 56px 24px; }
	.hfs-hero-media { min-height: 320px; }
}

/* Logo chips (organisers) */
.hfs-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hfs-chip { display: inline-flex; align-items: center; gap: 10px; height: 64px; padding: 6px; box-sizing: border-box; background: #fff; border-radius: 6px; color: var(--hfs-ink); font-size: 13px; font-weight: 600; line-height: 1.25; }
.hfs-chip img { width: 52px; height: 52px; display: block; }
.hfs-chip-text { padding-right: 14px; }
.hfs-chip-at, .hfs-badge-at { background: var(--hfs-sky); color: var(--hfs-ink); font-family: Arial, Helvetica, sans-serif; font-weight: 700; text-align: center; }
.hfs-chip-at { padding: 0 16px; }
.hfs-badge-at { display: inline-flex; align-items: center; justify-content: center; padding: 18px 22px; font-size: 15px; line-height: 1.35; }

/* ---------- Cards ---------- */
.hfs-card { background: #fff; padding: 32px; border-radius: 8px; border-top: 4px solid var(--hfs-green); }
.hfs-card h3 { font-size: 23px; margin-bottom: 12px; }
.hfs-card p { margin: 0; font-size: 16px; color: var(--hfs-body); }
.hfs-box { background: #fff; border-radius: 8px; padding: 40px !important; }
.hfs-outline { border: 1px solid var(--hfs-line); border-radius: 8px; padding: 24px; }
.hfs-dark .hfs-outline { border-color: #333B72; }
.hfs-outline h3 { margin: 8px 0; }
.hfs-outline p { margin: 0; font-size: 15px; line-height: 1.55; }
.hfs-pad-l { padding: 32px; }
.hfs-outline-strong { border: 2px solid var(--hfs-green); }
.hfs-item { border-top: 1px solid var(--hfs-line); padding: 24px 0; }
.hfs-item h3 { font-family: var(--wp--preset--font-family--body); font-size: 18px; font-weight: 600; letter-spacing: 0; margin: 0 0 6px; }
.hfs-item p { margin: 0; font-size: 16px; color: var(--hfs-muted); }
.hfs-panel { background: var(--hfs-tint); border-radius: 8px; padding: 28px 32px !important; }
.hfs-panel-rose { background: #FDECEC; }
.hfs-two-col { columns: 2 220px; column-gap: 32px; }

/* Facts and fees */
.hfs-fact { background: #fff; border-radius: 8px; padding: 20px; }
.hfs-fact > * + * { margin-block-start: 4px; }
.hfs-fact-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--hfs-muted); }
.hfs-fact-value { margin: 0; font-weight: 600; }
.hfs-fee { margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 34px; line-height: 1.1; color: var(--hfs-green); }
.hfs-fee-ink { color: var(--hfs-ink); font-size: 40px; }
.hfs-dates table { border-collapse: collapse; width: 100%; }
.hfs-dates td { border: 0; border-bottom: 1px solid var(--hfs-line); padding: 14px 0; }
.hfs-dates tr:last-child td { border-bottom: 0; }
.hfs-dates td:last-child { text-align: right; color: var(--hfs-brown); font-weight: 600; }
.hfs-dates tr:last-child td:last-child { color: var(--hfs-green); }

/* People */
.hfs-person { gap: 14px; padding: 16px; border: 1px solid var(--hfs-line); border-radius: 8px; }
.hfs-person .wp-block-group > * + * { margin-block-start: 2px; }
.hfs-initials { flex-shrink: 0; width: 48px; height: 48px; margin: 0; border-radius: 50%; background: #E3E7F7; color: var(--hfs-blue); display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--heading); font-weight: 700; }
.hfs-person-name { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.3; }
.hfs-person-aff { margin: 0; font-size: 14px; line-height: 1.3; color: var(--hfs-muted); }
.hfs-person-lg { padding: 20px; gap: 16px; }
.hfs-person-lg .hfs-initials { width: 72px; height: 72px; font-size: 20px; }
.hfs-person-h { font-family: var(--wp--preset--font-family--body); font-size: 18px; font-weight: 600; letter-spacing: 0; margin: 0; }
.hfs-person-lg .hfs-person-aff { color: var(--hfs-blue); font-weight: 600; }

/* Organisers */
.hfs-org { border: 1px solid var(--hfs-line); border-top-width: 6px; border-radius: 8px; padding: 28px; }
.hfs-org-red { border-top-color: var(--hfs-red); }
.hfs-org-sky { border-top-color: var(--hfs-sky); }
.hfs-org-blue { border-top-color: var(--hfs-italy); }
.hfs-org-logo { height: 96px; display: flex; align-items: center; }
.hfs-org-logo img { width: 96px; height: 96px; }
.hfs-org h3 { font-size: 21px; margin: 16px 0 0; }
.hfs-org-sub { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--hfs-blue); }
.hfs-org .hfs-muted { margin-top: 8px; }
.hfs-iaeg-logo { margin: 0; }
.hfs-iaeg-logo img { height: 72px; width: auto; }
.hfs-supported-h { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--hfs-line); font-size: 24px; }
.hfs-supp { border: 1px solid var(--hfs-line); border-radius: 8px; padding: 20px 14px; text-align: center; }
.hfs-supp .wp-block-image { margin: 0 0 12px; }
.hfs-supp img { height: 72px; width: 100%; object-fit: contain; }
.hfs-supp p { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 500; }
.hfs-supp-ph { height: 72px; display: flex; align-items: center; justify-content: center; background: var(--hfs-tint); border-radius: 6px; margin-bottom: 12px !important; color: var(--hfs-muted); }

.hfs-leadcard { border: 1px solid var(--hfs-line); border-radius: 8px; overflow: hidden; }
.hfs-leadband { display: flex; height: 180px; border-top: 6px solid var(--hfs-line); }
.hfs-org-red .hfs-leadband { border-top-color: var(--hfs-red); }
.hfs-org-sky .hfs-leadband { border-top-color: var(--hfs-sky); }
.hfs-org-blue .hfs-leadband { border-top-color: var(--hfs-italy); }
.hfs-leadcard.hfs-org-red, .hfs-leadcard.hfs-org-sky, .hfs-leadcard.hfs-org-blue { border-top-width: 1px; border-top-color: var(--hfs-line); }
.hfs-leadband-logo, .hfs-leadband-photo { flex: 1 1 0; display: flex; align-items: center; justify-content: center; }
.hfs-leadband-logo { background: #fff; border-right: 1px solid var(--hfs-line); }
.hfs-leadband-logo img { width: 120px; height: 120px; }
.hfs-leadband-photo { background: var(--hfs-tint); color: var(--hfs-blue); font-size: 13px; }
.hfs-leadcard-body { padding: 24px; }
.hfs-leadcard-body > * + * { margin-block-start: 6px; }
.hfs-leadcard-body h3 { font-size: 22px; }

/* Programme */
.hfs-pagehead { background: var(--hfs-tint); padding-top: 64px; padding-bottom: 56px; }
.hfs-pagehead h1 { margin: 16px 0; }
.hfs-pagehead .hfs-grid { margin-top: 36px; }
.hfs-step-light { border-top: 3px solid var(--hfs-green); padding-top: 24px; }
.hfs-step-light h3, .hfs-step h3 { font-family: var(--wp--preset--font-family--body); font-size: 19px; font-weight: 600; letter-spacing: 0; margin: 6px 0 8px; }
.hfs-step-light p:not(.hfs-label) { margin: 0; font-size: 16px; }
.hfs-step { border-top: 2px solid var(--hfs-sky); padding-top: 18px; }
.hfs-step p { margin: 0; font-size: 15px; }
.hfs-map img { border-radius: 8px; background: #fff; }
.hfs-map figcaption { color: #8E98C2; font-size: 13px; }
.hfs-stop.wp-block-columns { padding: 40px 0; border-top: 2px solid var(--hfs-ink); margin: 0; }
.hfs-stop:last-of-type { border-bottom: 2px solid var(--hfs-ink); }
.hfs-stop h3 { margin: 6px 0 12px; }
.hfs-stop p { margin: 0 0 12px; font-size: 16px; }
.hfs-sched { margin: 0; }
.hfs-sched table { border-collapse: collapse; width: 100%; }
.hfs-sched td { border: 0; border-bottom: 1px solid var(--hfs-line); padding: 16px 12px 16px 0; vertical-align: top; font-size: 16px; color: var(--hfs-muted); }
.hfs-sched tr:last-child td { border-bottom: 0; }
.hfs-sched td:first-child { width: 88px; white-space: nowrap; }
.hfs-sched td:first-child { font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--hfs-green); }
.hfs-sched strong { color: var(--hfs-ink); font-weight: 600; }

/* Apply */
.hfs-deadline { background: var(--hfs-ink); color: #fff; border-radius: 8px; padding: 24px 28px !important; }
.hfs-deadline > * { margin: 0 !important; }
.hfs-deadline .hfs-label { color: var(--hfs-sky); }
.hfs-deadline-date { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 28px; margin-top: 6px !important; }
.hfs-deadline .hfs-small { color: #B3BCDD; }
.hfs-form { border: 1px solid var(--hfs-line); border-radius: 8px; padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 24px; }
.hfs-form-note { grid-column: 1 / -1; margin: 0; padding: 12px 16px; background: #FDECEC; border-radius: 6px; font-size: 14px; }
.hfs-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.hfs-field label, .hfs-field legend { font-size: 15px; font-weight: 600; }
.hfs-field input:not([type=radio]):not([type=checkbox]), .hfs-field select, .hfs-field textarea { padding: 12px 14px; border: 1px solid #7D87AE; border-radius: 6px; font: inherit; font-size: 16px; background: #fff; }
.hfs-full { grid-column: 1 / -1; }
.hfs-choice { display: flex; gap: 10px; align-items: center; font-size: 16px; min-height: 32px; font-weight: 400 !important; }
.hfs-choice input { width: 20px; height: 20px; accent-color: var(--hfs-green); flex-shrink: 0; }
.hfs-inline { display: flex; gap: 24px; }
.hfs-hint { font-size: 14px; color: var(--hfs-muted); }
.hfs-form button { cursor: pointer; border: 0; }
.wp-block-details { background: #fff; border-radius: 8px; padding: 18px 24px; margin-block-start: 10px !important; }
.wp-block-details summary { font-weight: 600; font-size: 17px; cursor: pointer; }
.wp-block-details p { margin: 12px 0 0; font-size: 16px; color: var(--hfs-body); }

/* People page sponsor box */
.hfs-sponsor.wp-block-columns { background: var(--hfs-blue); color: #fff; border-radius: 8px; padding: 56px; }
.hfs-sponsor h2 { color: #fff; }
.hfs-sponsor p { color: #DDE2F3; }
.hfs-sponsor .wp-block-button, .hfs-sponsor .wp-block-button__link { width: 100%; text-align: center; }

/* Buttons */
.hfs-btn-ghost .wp-block-button__link { background: transparent; border: 1px solid #7E88B8; color: #fff; }
.hfs-btn-ghost .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.hfs-btn-outline .wp-block-button__link { background: transparent; border: 1px solid var(--hfs-blue); color: var(--hfs-blue); font-size: 15px; padding: 11px 18px; }
.hfs-btn-blue .wp-block-button__link { background: var(--hfs-blue); font-size: 15px; }
.hfs-btn-blue .wp-block-button__link:hover { background: var(--hfs-ink); }

/* Elevation profile */
.hfs-profile { width: 100%; height: auto; display: block; margin: 8px 0 40px; }

/* ---------- Footer ---------- */
.hfs-footer { background: var(--hfs-ink); color: #C9D0EA; font-size: 15px; line-height: 1.6; padding-top: 72px; }
.hfs-footer p { color: #C9D0EA; }
.hfs-footer a { color: #C9D0EA; }
.hfs-footer a[href^="mailto"] { color: var(--hfs-sky); }
.hfs-footer-h { font-size: 17px !important; color: #fff !important; margin: 0 0 12px; letter-spacing: 0; }
.hfs-footer-cols.wp-block-columns { gap: 40px; margin-bottom: 40px; }
.hfs-footer .hfs-chips { margin-bottom: 16px; gap: 8px; }
.hfs-plain-list { list-style: none; padding: 0; margin: 0; }
.hfs-plain-list li { margin: 0 0 6px; }
.hfs-footer-bottom { border-top: 1px solid #333B72; padding: 20px 0 32px; font-size: 13px; }
.hfs-footer-bottom p { margin: 0; color: #8E98C2; }

/* News */
.hfs-news-title { font-size: 26px; margin: 4px 0 8px; }
.hfs-news-title a { text-decoration: none; color: var(--hfs-ink); }

/* ---------- Adjustments ---------- */
.is-layout-constrained > .hfs-lead,
.is-layout-constrained > .hfs-measure { margin-left: max(0px, calc((100% - 1240px) / 2)) !important; margin-right: auto !important; }
.wp-block-group p.hfs-fee { margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; color: var(--hfs-green); white-space: nowrap; }
.wp-block-group p.hfs-fee-ink { color: var(--hfs-ink); font-size: clamp(30px, 3vw, 40px); }
.hfs-outline p.hfs-fact-label { font-size: 14px; font-weight: 600; color: var(--hfs-muted); }
.hfs-outline.hfs-pad-l > * + * { margin-block-start: 10px; }
.hfs-sec > .wp-block-group + .hfs-stop { margin-top: 32px !important; }
.hfs-stop + .hfs-stop { margin-top: 0 !important; }
.hfs-pagehead .hfs-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; }
.hfs-footer .hfs-chip { height: 52px; padding: 5px; }
.hfs-footer .hfs-chip img { width: 42px; height: 42px; }
.hfs-footer .hfs-chip-at { padding: 0 10px; font-size: 11px; }
