/*
Theme Name: Impact HE
Theme URI: https://impacthe.com
Author: Impact HE Ltd
Description: Block theme for the Impact HE website.
Version: 1.0.3
Requires at least: 6.4
Tested up to: 6.8
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: impacthe
*/

/* ---------- Sections ---------- */
.ih-section { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.ih-section.ih-tight { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); }
.ih-bg-white { background: #ffffff; }
.ih-bg-paper { background: #f5f7f4; }
.ih-bg-forest { background: #152a24; color: #ffffff; }
.ih-bg-forest :where(h1, h2, h3, h4) { color: #ffffff; }
.ih-bg-forest p { color: #d9e6e0; }
.ih-bg-forest a:where(:not(.wp-element-button)) { color: #7ac7a7; }
.ih-bg-forest a:where(:not(.wp-element-button)):hover { color: #ffffff; }

/* Hero: text and image side by side, full bleed */
.ih-hero { margin-top: 0 !important; margin-bottom: 0 !important; background: #152a24; gap: 0 !important; min-height: 520px; }
.ih-hero > .wp-block-column:first-child { padding: clamp(48px, 6vw, 80px) 5vw clamp(56px, 6vw, 88px) 8vw; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.ih-hero > .wp-block-column:first-child > * { margin: 0; }
.ih-hero > .wp-block-column:last-child { min-height: 320px; background: #1e3a32; }
.ih-hero .wp-block-image, .ih-hero .wp-block-image img { height: 100%; width: 100%; margin: 0; }
.ih-hero .wp-block-image img { object-fit: cover; min-height: 320px; height: 100% !important; width: 100% !important; display: block; }
.ih-hero h1 { color: #ffffff; max-width: 15ch; }
.ih-hero p { color: #d9e6e0; font-size: 20px; line-height: 1.55; max-width: 34em; }

/* Text helpers */
.ih-eyebrow, .ih-eyebrow a { font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: #24775a; text-decoration: none; }
.ih-bg-forest .ih-eyebrow, .ih-bg-forest .ih-eyebrow a, .ih-hero .ih-eyebrow, .ih-hero .ih-eyebrow a { color: #7ac7a7; }
.ih-lead { font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 17px; color: #24775a; line-height: 1.4; }
.ih-hero .ih-lead, .ih-bg-forest .ih-lead { color: #7ac7a7; font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; }
.ih-intro { font-size: 20px; line-height: 1.55; color: #4a5d57; }
.ih-small { font-size: 16px; line-height: 1.55; color: #4a5d57; }
.ih-youget { margin-top: auto !important; padding-top: 14px; border-top: 1px solid #dfe7e2; font-size: 16px; line-height: 1.55; color: #4a5d57; }
.ih-youget strong { font-family: var(--wp--preset--font-family--archivo); color: #152a24; }
.ih-more a { font-family: var(--wp--preset--font-family--archivo); font-weight: 700; text-decoration: none; }
.ih-more a:hover { text-decoration: underline; }
.ih-label { font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 15px; color: #4a5d57; }

/* Cards */
.ih-card { background: #ffffff; border-radius: 6px; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.ih-card-paper { background: #f5f7f4; }
.ih-card > * { margin: 0 !important; }
.ih-card h3 { font-size: 24px; }
.ih-card p { font-size: 18px; line-height: 1.6; color: #33463f; }
.ih-outline { border: 1px solid #d3ddd8; border-radius: 6px; padding: 28px 32px; }
.ih-bg-forest .ih-outline, .ih-quote-card { border: 1px solid #355047; border-radius: 6px; padding: 36px; }

/* Images */
.wp-block-image.ih-photo img { border-radius: 4px; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3 !important; object-fit: cover; }
.ih-photo figcaption { font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 16px; color: #152a24; text-align: left; margin-top: 12px; }
.ih-place { position: relative; }
.wp-block-image.ih-place img { border-radius: 4px; width: 100% !important; height: auto !important; aspect-ratio: 10 / 7 !important; object-fit: cover; display: block; }
.ih-place figcaption { position: absolute; left: 12px; bottom: 12px; margin: 0; background: #152a24; color: #ffffff; font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 15px; padding: 6px 12px; border-radius: 3px; }
.wp-block-image.ih-card-img img { width: 100% !important; height: 240px !important; aspect-ratio: auto !important; object-fit: cover; display: block; border-radius: 6px 6px 0 0; }
.wp-block-image.ih-avatar img { width: 180px !important; height: 180px !important; aspect-ratio: 1 !important; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.wp-block-image.ih-portrait img { border-radius: 6px; aspect-ratio: 4 / 5 !important; height: auto !important; object-fit: cover; max-width: 480px; width: 100% !important; }
.wp-block-image.ih-wide-img img { border-radius: 6px; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3 !important; object-fit: cover; }

/* Service cards with image on top */
.ih-card.ih-has-img { padding: 0; overflow: hidden; gap: 0; }
.ih-card.ih-has-img > .ih-card-body { padding: 32px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.ih-card.ih-has-img > .ih-card-body > * { margin: 0; }

/* Lists */
.ih-rule-list { list-style: none; padding: 0; margin: 0; }
.ih-rule-list li { padding: 14px 0; border-top: 1px solid #d3ddd8; }
.ih-rule-list li:last-child { border-bottom: 1px solid #d3ddd8; }
.ih-bg-forest .ih-rule-list li { border-color: #355047; color: #d9e6e0; }
.ih-bg-forest .ih-rule-list strong { color: #ffffff; }
.ih-rule-list .ih-year { display: inline-block; min-width: 110px; font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 15px; color: #4a5d57; }

/* Quotes */
.ih-quote-card { margin: 0; }
.ih-quote-card p { font-size: 22px; line-height: 1.5; color: #ffffff !important; }
.ih-quote-card cite { display: block; margin-top: 20px; font-style: normal; font-family: var(--wp--preset--font-family--archivo); font-size: 15px; line-height: 1.5; color: #b9cdc5; }
.ih-quote-card cite strong { color: #ffffff; }
.wp-block-quote.ih-pull { border-left: 3px solid #7ac7a7; padding-left: 24px; margin-left: 0; }
.wp-block-quote.ih-pull p { font-size: 21px; color: #152a24; }

/* Articles */
.ih-article-hero { background: #152a24; color: #ffffff; padding-top: 64px; padding-bottom: 56px; }
.ih-article-hero h1 { color: #ffffff; font-size: clamp(34px, 4vw, 50px); line-height: 1.08; }
.ih-article-hero .wp-block-post-date, .ih-article-hero .ih-byline { color: #b9cdc5; font-family: var(--wp--preset--font-family--archivo); font-size: 16px; }
.ih-article-hero .wp-block-post-terms a { color: #7ac7a7; }
.single .wp-block-post-content { font-size: 19px; line-height: 1.75; color: #33463f; }
.single .wp-block-post-content h2 { font-size: 26px; margin-top: 40px; }
.single .wp-block-post-content h3 { font-size: 21px; margin-top: 28px; }
.ih-source { font-size: 16px !important; color: #4a5d57; }
.ih-author { background: #ffffff; border-radius: 6px; padding: 28px; }
.ih-author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }

/* Post cards in query loops */
.ih-query .wp-block-post-featured-image img { border-radius: 4px; aspect-ratio: 3 / 2; object-fit: cover; }
.ih-query .wp-block-post-title { font-size: 21px; line-height: 1.25; font-weight: 700; margin-top: 8px; }
.ih-query .wp-block-post-title a { color: #152a24; text-decoration: none; }
.ih-query .wp-block-post-title a:hover { color: #24775a; text-decoration: underline; }
.ih-query .wp-block-post-excerpt { font-size: 17px; line-height: 1.55; color: #33463f; }
.ih-query .wp-block-post-excerpt__more-text { display: none; }
.ih-query .wp-block-post-terms { margin-top: 4px; }
.ih-query .wp-block-post-terms a { font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #24775a; text-decoration: none; }

/* Header and footer */
.ih-header { background: #152a24; padding-top: 20px; padding-bottom: 20px; }
.ih-header .wp-block-navigation { color: #ffffff; }
.ih-header .wp-block-navigation a { text-decoration: none; }
.ih-header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover { color: #7ac7a7; }
.ih-header .wp-block-navigation__responsive-container.is-menu-open { background: #152a24; }
.ih-header .wp-block-button__link { padding: 12px 20px; font-size: 16px; }
.ih-footer { background: #0f1f1a; color: #b9cdc5; padding-top: 40px; padding-bottom: 40px; font-family: var(--wp--preset--font-family--archivo); font-size: 15px; }
.ih-footer p { color: #b9cdc5; margin: 0; }
.ih-footer a { color: #7ac7a7; }
.ih-footer a:hover { color: #ffffff; }

/* Contact form (plugin output) */
.ih-bg-forest input[type="text"], .ih-bg-forest input[type="email"], .ih-bg-forest textarea { background: #1e3a32; border: 1px solid #4f6b62; color: #ffffff; border-radius: 4px; padding: 12px 14px; font: inherit; width: 100%; box-sizing: border-box; }
.ih-bg-forest label { color: #ffffff; font-family: var(--wp--preset--font-family--archivo); font-weight: 600; font-size: 15px; }
.ih-form { display: flex; flex-direction: column; gap: 4px; }
.ih-form p { margin: 0 0 12px; }
.ih-form label { display: block; margin-bottom: 6px; }
.ih-form input, .ih-form textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 4px; border: 1px solid #b9cdc5; font: inherit; }
.ih-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 16px; }
.ih-form button { cursor: pointer; border: 0; }
.ih-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ih-form-note { padding: 14px 18px; border-radius: 4px; background: #1e3a32; color: #ffffff !important; }
.ih-form-error { background: #5a2a24; }

/* Focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #7ac7a7; outline-offset: 2px; }

@media (max-width: 781px) {
  .ih-hero > .wp-block-column:first-child { padding: 48px 6vw; }
  .wp-block-image.ih-avatar img { width: 120px !important; height: 120px !important; }
}

/* Sections butt together; no strips of page background between them */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull, .wp-block-post-content > .alignfull + * { margin-block-start: 0; margin-block-end: 0; }
.ih-grow { flex: 999 1 420px; min-width: 0; }
.ih-article-hero + .wp-block-group { margin-block-start: 0; }
.ih-header .wp-block-navigation__responsive-container-open { color: #ffffff; }
@media (max-width: 600px) {
  .ih-header > .wp-block-group { flex-wrap: nowrap; }
  .ih-header .ih-logo img { width: 120px !important; }
  .ih-header .wp-block-group .wp-block-group { gap: 16px; flex-wrap: nowrap; }
  .ih-header .wp-block-button__link { padding: 10px 14px; font-size: 15px; }
  .ih-quote-card, .ih-card { padding: 26px; }
}

/* Cookie consent banner */
.ih-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999; display: flex; justify-content: center; pointer-events: none; }
.ih-consent[hidden] { display: none; }
.ih-consent-inner { pointer-events: auto; max-width: 1040px; width: 100%; background: #152a24; color: #ffffff; border: 1px solid #355047; border-radius: 6px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.ih-consent-text { flex: 999 1 420px; margin: 0; font-size: 16px; line-height: 1.55; color: #d9e6e0; }
.ih-consent-text a { color: #7ac7a7; }
.ih-consent-actions { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 12px; }
.ih-consent-btn { cursor: pointer; font-family: var(--wp--preset--font-family--archivo); font-weight: 700; font-size: 16px; padding: 12px 20px; border-radius: 4px; border: 2px solid #7ac7a7; }
.ih-consent-accept { background: #7ac7a7; color: #152a24; }
.ih-consent-reject { background: transparent; color: #ffffff; }
.ih-consent-btn:hover { background: #ffffff; border-color: #ffffff; color: #152a24; }
@media (max-width: 600px) { .ih-consent { left: 8px; right: 8px; bottom: 8px; } .ih-consent-inner { padding: 16px; } .ih-consent-btn { flex: 1 1 auto; } }
