/*
Theme Name: Peace Insight
Template: kadence
Mother Theme URI: https://www.kadencewp.com/kadence-theme/
Author: Ne Lynn Aung
Author URI: https://nelynnaung.com/
Description: The “Peace Insight” theme is a custom child theme built upon the Kadence Theme, a lightweight and feature-rich WordPress framework developed by Kadence WP. The parent Kadence Theme is distributed under the GNU General Public License (GPL), providing a flexible and robust foundation for further customization. Developed by Ne Lynn Aung, the Peace Insight child theme extends and adapts Kadence’s core capabilities to meet the specific design, functionality, and content requirements of the Peace Insight platform. While retaining the performance, accessibility, and extensibility of the original Kadence framework, this child theme introduces tailored styling, structural adjustments, and context-specific enhancements aligned with Peace Insight’s mission and use cases. Full credit is due to Kadence WP for the underlying theme architecture and feature set that make this customization possible.
Version: 1.0.42
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: peaceinsight
Requires at least: 6.3
Tested up to: 6.9.1
Tags: translation-ready, accessibility-ready, two-columns, right-sidebar, left-sidebar, footer-widgets, blog, custom-logo, custom-background, custom-menu, rtl-language-support, editor-style, threaded-comments, custom-colors, featured-images, wide-blocks, full-width-template, theme-options, e-commerce
Requires PHP: 7.4
*/

@font-face {
    font-family: "elza-condensed";
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src: url("assets/fonts/elza/elza-condensed-regular.woff2") format("woff2");
}

@font-face {
    font-family: "elza-condensed";
    font-style: italic;
    font-weight: 400;
    font-display: optional;
    src: url("assets/fonts/elza/elza-condensed-italic.woff2") format("woff2");
}

@font-face {
    font-family: "elza-condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("assets/fonts/elza/elza-condensed-bold.woff2") format("woff2");
}

@font-face {
    font-family: "elza-condensed";
    font-style: italic;
    font-weight: 700;
    font-display: optional;
    src: url("assets/fonts/elza/elza-condensed-bold-italic.woff2") format("woff2");
}

@font-face {
    font-family: "elza-condensed";
    font-style: normal;
    font-weight: 900;
    font-display: optional;
    src: url("assets/fonts/elza/elza-condensed-black.woff2") format("woff2");
}

@font-face {
    font-family: "Merriweather";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("assets/fonts/merriweather/merriweather-latin-variable.woff2") format("woff2");
}

:root {
    --global-body-font-family: "Merriweather", Georgia, serif;
    --global-heading-font-family: "Merriweather", Georgia, serif;
}

.single-post .pi-meta-grid .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
}

.single-post .pi-meta-grid .posted-by,
.single-post .pi-meta-grid .posted-on {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25em;
}

.single-post .pi-meta-grid .entry-meta > .posted-by::after {
    content: "";
    display: block;
    flex: 0 0 4px;
    width: 4px;
    height: 4px;
    margin: 0 0 0 0.5rem;
    border-radius: 50%;
    background: currentColor;
    align-self: center;
}

@media (max-width: 420px) {
    .single-post .pi-meta-grid .entry-meta > .posted-by::after {
        content: none;
        display: none;
    }
}

.single-post .pi-meta-grid .pi-meta-field {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    /* font-family: "Merriweather", Georgia, serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5; */
}

.single-post .entry-meta .posted-by .author a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 160ms ease;
}

.single-post .entry-meta .posted-by .author a:hover,
.single-post .entry-meta .posted-by .author a:focus-visible {
    color: #e0684b;
}

.single-post .pi-meta-grid .pi-meta-text {
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

.pi-meta-grid {
    margin-bottom: 1.5rem;
}

/*
Article typography override disabled. Font assignments are managed in Kadence.
.type-post .entry-title,
.single-post .p-except-box,
.single-post .entry-meta .posted-by,
.single-post .pi-author-box {
    font-family: "Merriweather", serif;
}

.type-post .entry-taxonomies,
.single-post .tags-links,
.single-post .pi-themes {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
}
*/

/*
 * Keep card headlines subordinate to 32px page and archive titles.
 * Scope this to Kadence-style content cards so ordinary h2 headings,
 * compact Explore/map cards, and the theme's 20px related posts retain
 * their existing typography.
 */
.wp-site-blocks .kadence-posts-list:not(.splide__list) .loop-entry .entry-title,
.pi-landing-article-cards .loop-entry .entry-title,
.pi-carousel .loop-entry .entry-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
}

/* Brand interface typography: section titles and editorial labels use Elza. */
.pi-landing-explore__title,
.pi-section-title {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-weight: 900;
}

.pi-landing-label,
.pi-landing-chip,
.type-post .entry-taxonomies,
.search-results .pi-search-content-type,
.single-post .tags-links,
.single-post .pi-themes {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-weight: 700;
}

.pi-excerpt {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.pi-author-box {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.pi-author-image {
    margin-top: 20px;
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Article standfirst using Kadence's text-quote convention. */
.pi-standfirst {
    margin: 20px 0;
    padding: 15px 20px 15px 20px;
    border: 1px solid #dcdcde;
    background: #eeeeee;
}

.pi-standfirst p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Locations and themes sit below the article body as editorial tags. */
.pi-article-taxonomies {
    margin: 2rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--global-gray-400);
}

.pi-article-taxonomy {
    display: grid;
    grid-template-columns: minmax(6rem, 8rem) 1fr;
    gap: 0.75rem 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.pi-article-taxonomy__label {
    margin: 0.25rem 0 0;
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
}

.pi-taxonomy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pi-taxonomy-tags li {
    margin: 0;
}

.pi-taxonomy-tags a {
    display: inline-flex;
    padding: 0.3rem 0.65rem;
    background: #eeeeee;
    color: var(--global-palette4);
    font-family: "Merriweather", Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.pi-taxonomy-tags a:hover,
.pi-taxonomy-tags a:focus {
    background: var(--global-palette-btn-bg);
    color: var(--global-palette-btn);
}

.pi-org-profile-correction {
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
    background: #eeeeee;
    font-size: 0.9rem;
}

.pi-org-profile-correction p {
    margin: 0;
}

@media (max-width: 719px) {
    .pi-article-taxonomy {
        grid-template-columns: 1fr;
    }
}

/* Fix for entry meta, no space between language names */
.entry-meta .pi-sep {
    display: inline-block;
    margin: 0 8px;
}

.entry-meta a,
.entry-meta strong {
    margin: 0 2px;
}

.pi-space {
    display: inline-block;
    width: 6px;
}

.pi-language-switcher {
    display: block;
    white-space: normal;
}

.pi-language-switcher a,
.pi-language-switcher strong,
.pi-language-switcher span {
    display: inline;
}

.pi-language-switcher a {
    color: var(--global-palette1);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.pi-language-switcher a:hover,
.pi-language-switcher a:focus {
    color: var(--global-palette2);
}

.pi-author-disclaimer {
    font-size: 0.8em;
    color: #666;
    margin: 5px 0 10px;
}

.pi-author-profile-card {
    align-items: flex-start;
}

.pi-author-profile-card .pi-author-content {
    flex: 1;
}

.pi-author-profile-fields {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    /* margin-left: 10px; */
}

.pi-author-profile-field {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.pi-author-profile-link {
    font-weight: 600;
}

.pi-author-profile-field i {
    font-size: 1rem;
}

.pi-author-posts {
    margin-top: 40px;
}

.pi-author-posts-title {
    margin-bottom: 24px;
}

.pi-author-role {
    margin-top: 8px;
    margin-bottom: 0;
}

.pi-org-entry .entry-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.pi-org-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.pi-org-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pi-org-title-row .entry-title {
    margin-bottom: 0;
}

.pi-org-status {
    align-items: center;
    color: #50575e;
    display: inline-flex;
    gap: 8px;
    font-weight: 600;
    margin: 8px 0 0;
}

.pi-org-verification {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.3rem;
    line-height: 1;
}

.pi-org-verification.is-verified {
    color: #e0684b;
}

.pi-org-profile-card {
    align-items: flex-start;
    display: flex;
    gap: 28px;
}

.pi-org-image-wrap {
    flex: 0 0 240px;
}

.pi-org-image {
    height: auto;
    max-width: 100%;
}

.pi-org-overview {
    flex: 1;
}

.pi-org-section {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    padding-top: 28px;
}

.pi-org-section h2 {
    margin-bottom: 20px;
}

.pi-org-field-grid,
.pi-org-stat-grid,
.pi-org-text-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pi-org-field,
.pi-org-stat,
.pi-org-text-block h3 {
    align-items: flex-start;
    display: flex;
    gap: 10px;
}

.pi-org-field i,
.pi-org-stat i,
.pi-org-text-block h3 i {
    line-height: 1.5;
    min-width: 18px;
}

.pi-org-field-content,
.pi-org-stat {
    min-width: 0;
}

.pi-org-field-label,
.pi-org-stat-label {
    color: #50575e;
    display: block;
    font-size: 0.875rem;
    line-height: 1.35;
}

.pi-org-field-value,
.pi-org-stat-value {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.pi-org-link {
    text-decoration: none;
}

.pi-org-text-block {
    margin-top: 18px;
}

.pi-org-text-grid .pi-org-text-block {
    margin-top: 0;
}

.pi-org-text-block h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

@media (max-width: 1024px) {
    .pi-org-field-grid,
    .pi-org-stat-grid,
    .pi-org-text-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pi-author-profile-card {
        flex-direction: column;
    }

    .pi-author-profile-fields {
        gap: 10px;
    }

    .pi-org-header,
    .pi-org-profile-card {
        flex-direction: column;
    }

    .pi-org-image-wrap {
        flex-basis: auto;
    }
}

@media (max-width: 640px) {
    .pi-org-field-grid,
    .pi-org-stat-grid,
    .pi-org-text-grid {
        grid-template-columns: 1fr;
    }
}

/* ACF Admin Field Width  */
.acf-field.pi_acf_start_row {
    clear: both !important;
}

/* Published by Peace Direct HTML Snippet */

@media (min-width: 1025px) {
	.site-header-top-section-left
	[data-section="kadence_customizer_header_html"]
	.header-html {
		width: 220px;
		margin: 10px 0;
	}

	.pi-header-publisher {
		width: 100%;
		text-align: center;
		line-height: 1.2;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 20px 0;
	}
}

/* Peace Insight brand typography for the hero and site header. */
body.home h1.wp-block-kadence-advancedheading {
    line-height: 1.08;
}

#main-header .header-button {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

#masthead .search-toggle-open-container .search-toggle-open .search-toggle-icon {
    font-size: 1.5rem;
}

/* Present Kadence's accessible search drawer as a calm, centred dialog. */
#search-drawer .drawer-overlay {
    background-color: rgba(30, 30, 30, 0.35);
}

#search-drawer .drawer-inner {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(760px, calc(100% - 40px));
    min-height: 220px;
    max-width: 760px;
    max-height: calc(100vh - 40px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(30, 30, 30, 0.24);
    transform: translate(-50%, calc(-50% + 20px));
    transition: transform 0.25s ease, opacity 0.2s ease;
}

#search-drawer.active .drawer-inner {
    transform: translate(-50%, -50%);
}

#search-drawer .drawer-inner .drawer-header {
    position: static;
    min-height: 0;
    padding: 0;
}

#search-drawer .drawer-header .search-toggle-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 12px;
    border-radius: 50%;
    box-sizing: border-box;
    background: rgba(30, 30, 30, 0.06);
    font-size: 20px;
}

#search-drawer .drawer-header .search-toggle-close:hover,
#search-drawer .drawer-header .search-toggle-close:focus-visible {
    background: rgba(30, 30, 30, 0.12);
}

#search-drawer .drawer-header .search-toggle-close:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

#search-drawer .drawer-inner .drawer-content {
    position: static;
    min-height: 220px;
    padding: 68px 40px 40px;
}

@media (max-width: 600px) {
    #search-drawer .drawer-inner {
        width: calc(100% - 24px);
        min-height: 190px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 8px;
    }

    #search-drawer .drawer-inner .drawer-content {
        min-height: 190px;
        padding: 60px 20px 28px;
    }

    #search-drawer .drawer-header .search-toggle-close {
        top: 8px;
        right: 8px;
    }

    #search-drawer .drawer-inner input.search-field {
        font-size: 16px;
    }
}

#site-navigation .primary-menu-container > ul > li.menu-item > a,
#mobile-site-navigation .drawer-menu-container > ul > li.menu-item > a,
#mobile-site-navigation .drawer-menu-container > ul > li.menu-item > .drawer-nav-drop-wrap > a {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-weight: 900;
    font-size: 1.6rem;
    text-transform: uppercase;
}

#site-navigation .kadence-arrow-down-svg path {
    stroke: currentColor;
    stroke-width: 0.8px;
    stroke-linejoin: round;
}

#site-navigation .kadence-arrow-down-svg {
    transform: translateY(-4px);
}

#site-navigation .sub-menu a,
#mobile-site-navigation .sub-menu a {
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: none;
}

/* Contact form submit button uses the Peace Insight global green. */
.pi-contact-form-page .gform_wrapper .gform_button.button {
    background-color: var(--global-palette1) !important;
}

/* Inline sharing component for articles, resources and organisations. */
.pi_share {
    display: grid;
    grid-template-columns: minmax(6rem, 8rem) 1fr;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 2rem 0 1.5rem;
    padding: 0;
}

.pi_share__title {
    margin: 0;
    color: var(--global-palette3);
    font-family: "elza-condensed", "Arial Narrow", "Aptos Narrow", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
    text-transform: none;
}

.pi_share__services {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.pi_share__service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0.25rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1e1e1e;
    cursor: pointer;
}

.pi_share__service:hover,
.pi_share__service:focus-visible {
    background-color: var(--global-palette8);
    color: #1e1e1e;
}

.pi_share__service:focus-visible {
    outline: 2px solid var(--global-palette1);
    outline-offset: 2px;
}

.pi_share__service svg {
    display: block;
    width: 32px;
    height: 32px;
    fill: currentColor;
}

@media (max-width: 719px) {
    .pi_share {
        align-items: flex-start;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Left-align image captions; Kadence centers these by default. */
.wp-block-image figcaption.wp-element-caption {
    text-align: left;
}

/* Search-result ordering and non-article content-type labels. */
.pi-search-order {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    margin: 0 0 1.5rem;
}

.pi-search-order__label {
    font-weight: 700;
}

.pi-search-order__buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pi-search-order__option {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border-radius: 3px;
    background: #00ad83;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.pi-search-order__button {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    color: inherit;
    text-decoration: none;
}

.pi-search-order__option.is-active {
    background: #e0684b;
}

.pi-search-order__option:hover,
.pi-search-order__option:focus-within {
    background: #1e1e1e;
    color: #fff;
}

.pi-search-order__button:focus-visible,
.pi-search-order__clear:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.pi-search-order__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pi-search-order__option:first-child .pi-search-order__icon {
    fill: currentColor;
    stroke-width: 1.2;
}

.pi-search-order__clear {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    width: 38px;
    border-left: 1px solid rgba(255, 255, 255, 0.45);
    color: inherit;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
}

.search-results .pi-search-content-type .category-links {
    color: var(--global-palette1);
}

@media (max-width: 540px) {
    .pi-search-order {
        align-items: stretch;
        flex-direction: column;
    }

    .pi-search-order__buttons {
        align-items: stretch;
    }

    .pi-search-order__option {
        flex: 1 1 auto;
    }

    .pi-search-order__button {
        justify-content: center;
        flex: 1 1 auto;
    }
}
