/*
Theme Name: IHBI WP Theme
Template: twentytwentyfive
Version: 1.0.0
*/

html {
    scroll-behavior: smooth;
}

.is-style-card {
    background-color: var(--wp--preset--color--accent-5);
    border-radius: 8px;
    padding: 24px !important;
    box-shadow: var(--wp--preset--shadow--shadow-1);
}

.page-eyebrow {
    color: var(--wp--preset--color--accent-3);
    text-decoration: underline;
    margin-bottom: 10vh;
}

@media (max-width: 1100px) {
    .news-grid.wp-block-post-template {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 600px) {
    .news-grid.wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
}

header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--wp--preset--color--base);
}

/* Apply border-radius directly on the media element so it clips regardless
   of what the parent wrapper does. */
.wp-block-post-featured-image img,
.wp-block-image img,
.wp-block-video video {
    border-radius: 8px;
}

/* Set border-radius + overflow:hidden together on image figures so captions
   (which can be block-level or absolutely positioned over the image in
   galleries) get clipped to the same rounded corners as the image. */
.wp-block-image {
    border-radius: 8px;
    overflow: hidden;
}

/* Media-text can render the image as a CSS background-image instead of an
   <img> tag, so target the figure container rather than the element inside. */
.wp-block-media-text__media {
    border-radius: 8px;
    overflow: hidden;
}

/* Cover uses a pseudo-element/div background, needs overflow:hidden on the
   block itself to clip to the rounded corners from theme.json. */
.wp-block-cover {
    overflow: hidden;
}

/* Embeds: clip the iframe/content to rounded corners via the inner wrapper. */
.wp-block-embed__wrapper {
    border-radius: 8px;
    overflow: hidden;
}

/* Pin the footer row (tags/date) to the bottom of each archive card. */
.wp-block-post-template li .is-style-card > .wp-block-group:last-child {
    margin-top: auto;
}

.placeholder-thumbnail {
    width: 100%;
    aspect-ratio: 3 / 2;
    background-color: color-mix(in srgb, var(--wp--preset--color--accent-6) 8%, var(--wp--preset--color--accent-5));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Optional: add a subtle image icon in the center */
.placeholder-thumbnail::after {
    content: '';
    width: 48px;
    height: 48px;
    background-color: var(--wp--preset--color--accent-6);
    opacity: 0.2;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

.wp-block-post-excerpt__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    max-height: calc(1.6em * 2);
}

.uagb-forms-main-submit-button {
    background-color: transparent !important;
    color: var(--wp--preset--color--base) !important;
    border: 1px solid var(--wp--preset--color--base) !important;
    border-radius: 8px !important;
    padding: 1rem 2.25rem !important;
    font-family: var(--wp--preset--font-family--roboto) !important;
    font-weight: 700 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.uagb-forms-main-submit-button:hover {
    background-color: var(--wp--preset--color--base) !important;
    color: var(--wp--preset--color--accent-3) !important;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
    background-color: transparent !important;
    color: var(--wp--preset--color--accent-3) !important;
    border: 1px solid var(--wp--preset--color--accent-3) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--accent-3) !important;
    color: var(--wp--preset--color--base) !important;
}

.project-metadata-bar {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.meta-item {
    margin: 0;
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-body);
    margin-bottom: 1em;
    padding: 0;
}

.meta-label {
    display: block;
    font-size: var(--wp--preset--font-size--ihbi-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wp--preset--color--accent-4);
    margin: 0px;
    padding: 0px;
}

.meta-value {
    margin: 0px;
    padding: 0px;
}

.meta-directions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--20);
    margin: 0;
    padding: 0;
}

.meta-tag, .publication-direction-tag {
    display: inline-block;
    align-self: flex-start;
    border-radius: 20px;
    border-color: var(--wp--preset--color--accent-6);
    border-width: 0.8px;
    border-style: solid;
    font-weight: 400;
    padding: 4px 8px;
    margin-top: 10px;
    text-decoration: none;
    font-size: var(--wp--preset--font-size--ihbi-caption);
    color: var(--wp--preset--color--accent-6);
}

.meta-tag:hover {
    text-decoration: underline;
}

.meta-inline-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.meta-tag--publication {
    font-weight: 400;
    min-width: 0.5rem;
    text-align: center;
    text-decoration: none;
}

.meta-tag--publication:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.meta-tag--funding {
    gap: var(--wp--preset--spacing--20);
}

.meta-item p:empty {
    display: none;
}

/* Or if WordPress inserted a non-breaking space &nbsp; */
.meta-item p:only-child {
    margin-bottom: 0;
}

.funding-list {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--40);
}

.funding-item {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20);
}

.funding-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.funding-name {
    font-family: var(--wp--preset--font-family--roboto);
    font-size: var(--wp--preset--font-size--heading-3);
    font-weight: 500;
    color: var(--wp--preset--color--contrast);
}

.funding-toggle {
    padding: var(--wp--preset--spacing--20);
}

.funding-toggle summary, .publications-toggle summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.publications-toggle summary {
    font-size: var(--wp--preset--font-size--ihbi-caption);
}

.publications-toggle {
    margin: var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--20) 0;
}

.funding-toggle summary {
    font-size: var(--wp--preset--font-size--heading-4);
}

.funding-toggle summary::-webkit-details-marker {
    display: none;
}

.funding-toggle summary::after, .publications-toggle summary::after {
    content: '';
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    margin-left: 0.5rem;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: transform 0.2s ease-in-out;
    vertical-align: middle;
}

.funding-toggle[open] summary::after, .publications-toggle[open] summary::after {
    transform: rotate(180deg);
}

.funding-description,
.funding-links,
.funding-projects {
    margin-top: var(--wp--preset--spacing--30);
}

.funding-links,
.funding-project-list {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
    align-items: flex-start;
}

.funding-link,
.funding-project-link {
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-body);
    color: var(--wp--preset--color--accent-3);
    text-decoration: none;
}

.funding-link br, .publication-project-link br {
    display: none;
}

.funding-link:hover,
.funding-project-link:hover {
    text-decoration: underline;
}

.funding-divider {
    border: none;
    border-top: 1px solid var(--wp--preset--color--accent-6);
    margin: 0;
    opacity: 0.4;
}

.publication-item p {
    margin: 10px 0 0 0;
    padding: 0;
}

.publication-year-heading {
    font-family: var(--wp--preset--font-family--roboto);
    font-size: var(--wp--preset--font-size--heading-4);
    font-weight: 300;
    color: var(--wp--preset--color--accent-4);
    margin-bottom: var(--wp--preset--spacing--30);
}

.publication-type-tag {
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wp--preset--color--accent-3);
}

.publication-title {
    font-family: var(--wp--preset--font-family--roboto);
    font-size: var(--wp--preset--font-size--ihbi-body);
    font-weight: 500;
    margin: 0;
    color: var(--wp--preset--color--contrast);
}

.publication-title a {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

.publication-title a:hover {
    text-decoration: underline;
}

.publication-authors {
    font-size: var(--wp--preset--font-size--ihbi-caption);
    color: var(--wp--preset--color--accent-4);
    margin: 0;
}

.publication-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--40);
    flex-wrap: wrap;
    font-size: var(--wp--preset--font-size--ihbi-caption);
    margin: var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--20) 0;
}

.publication-doi {
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-caption);
    color: var(--wp--preset--color--accent-3);
    text-decoration: none;
}

.publication-doi:hover {
    text-decoration: underline;
}

.publication-projects {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--30);
    margin-top: var(--wp--preset--spacing--30);
}

.publication-projects br {
    display: none;
}

.publication-project-link {
    font-size: var(--wp--preset--font-size--ihbi-body);
    color: var(--wp--preset--color--accent-3);
    text-decoration: none;
}

.publication-project-link:hover {
    text-decoration: underline;
}

.publication-divider {
    border: none;
    border-top: 1px solid var(--wp--preset--color--accent-6);
    margin: 0;
    padding: 0;
    opacity: 0.4;
}

.publication-item p:empty {
  display: none;
}

.publication-meta-top {
    margin-bottom: var(--wp--preset--spacing--30);
}

.publication-direction-tag {
    margin: 0;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--60);
}

.team-group-heading {
    font-family: var(--wp--preset--font-family--roboto);
    font-size: var(--wp--preset--font-size--heading-2);
    font-weight: 500;
    color: var(--wp--preset--color--contrast);
    margin-bottom: var(--wp--preset--spacing--40);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--40);
}

@media (max-width: 900px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.team-member-card {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20);
}

.team-member-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
}

.team-member-photo img,
.team-member-photo .placeholder-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    aspect-ratio: auto;
}

.team-member-name {
    font-family: var(--wp--preset--font-family--roboto);
    font-size: var(--wp--preset--font-size--heading-5);
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
    margin: var(--wp--preset--spacing--20) 0 0 0;
}

.team-member-role {
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-body);
    color: var(--wp--preset--color--accent-4);
    margin: 0;
}

.team-member-contact {
    list-style: none;
    padding: 0;
    margin: var(--wp--preset--spacing--20) 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-caption);
}

.team-member-contact-item {
    margin: 0;
    padding: 0;
}

.team-member-contact-item a {
    color: var(--wp--preset--color--accent-3);
    text-decoration: none;
    word-break: break-word;
}

.team-member-contact-item a:hover {
    text-decoration: underline;
}

.team-member-excerpt {
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-body);
    color: var(--wp--preset--color--accent-6);
    margin: var(--wp--preset--spacing--20) 0 0 0;
}

.team-member-details {
    margin-top: var(--wp--preset--spacing--20);
    display: flex;
    flex-direction: column;
}

.team-member-details[open] .team-member-toggle {
    order: 2;
    margin-top: var(--wp--preset--spacing--20);
}

.team-member-card:has(.team-member-details[open]) .team-member-excerpt {
    display: none;
}

.team-member-toggle {
    list-style: none;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-body);
    color: var(--wp--preset--color--accent-3);
    font-weight: 500;
}

.team-member-toggle::-webkit-details-marker {
    display: none;
}

.team-member-toggle::before {
    content: "Read more";
}

.team-member-details[open] .team-member-toggle::before {
    content: "Show less";
}

.team-member-toggle:hover::before {
    text-decoration: underline;
}

.team-member-background {
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--ihbi-body);
    color: var(--wp--preset--color--accent-6);
}