/* ==========================================================================
   POST STYLES
   Post Types, Category Meta, Post Content
   ========================================================================== */

/* ==========================================================================
   POST CATEGORY META
   ========================================================================== */

.posts-category-meta a {
    background: white;
    padding: 5px 10px;
    border-radius: 10px;
}

/* ==========================================================================
   POST CONTENT - Default Styles
   ========================================================================== */

.post-content-default {
    line-height: 24px;
    margin-bottom: 30px;
    p, li {
        color: var(--color-primary-navy);
        font-family: "Atten Round New", sans-serif;
        font-weight: 400;
        font-size: 18px;
    }
    a {
        font-weight: 600;
        color: var(--color-primary-navy);
    }
    h2, h3, h4, h5, h6 {
        font-family: "Atten Round New", sans-serif;
        color: var(--color-primary-navy);
        font-weight: 600;
    }
}

.post-content-posts {
    a {
        text-decoration: underline;
    }
}


/* ==========================================================================
   POST FILE DOWNLOAD
   ========================================================================== */

.post-file-downloads {
    margin-top: 1.5em;
    margin-bottom: 0;
}

.post-file-download {
    display: inline-block;
    margin-right: 1em;
}

.post-file-download .fl-button-icon {
    position: relative;
    top: 2px;
    right: -2px;
}

/* ==========================================================================
   STANDARD BB POSTS MODULE - Button Alignment
   ========================================================================== */

.fl-post-grid-post {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fl-post-grid-post .fl-post-grid-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.fl-post-grid-post .fl-post-grid-content .fl-post-grid-button {
    align-self: flex-start;
}

/* ==========================================================================
   RESOURCES POSTS MODULE - Match Post Slider Style
   ========================================================================== */

.resources .fl-post-grid-post {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease-in-out;
}

.resources .fl-post-grid-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resources .fl-post-grid-image {
    margin: -20px -20px 15px -20px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.resources .fl-post-grid-image img {
    border-radius: 10px;
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.resources .fl-post-grid-title {
    margin: 0 0 15px 0;
    font-family: "Atten Round New", sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    color: #333333;
}

.resources .fl-post-grid-title a {
    color: inherit;
    text-decoration: none;
}

.resources .fl-post-grid-title a:hover {
    opacity: 0.8;
}

.resources .fl-post-grid-meta,
.resources .fl-post-grid-meta-terms {
    margin-bottom: 15px;
}

.resources .fl-post-grid-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.resources .fl-post-grid-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.resources .fl-post-grid-content p {
    font-family: "Atten Round New", sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: #666666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.resources .fl-post-grid-more {
    padding: 10px 20px;
    font-family: "Atten Round New", sans-serif;
    font-weight: 500;
    font-size: 14px;
    background-color: var(--color-primary-teal);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    align-self: flex-start;
}

.resources .fl-post-grid-more:hover {
    background-color: #1e6b62;
}

/* Resource Type Badge - hide by default, show on .resources modules */
.iriss-resource-type {
    display: none;
}

.resources .iriss-resource-type,
.fl-module-post-slider .iriss-resource-type {
    display: block;
    order: -1;
    margin-bottom: 15px;
}

.resources .iriss-resource-type-tag,
.fl-module-post-slider .iriss-resource-type-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #e8f4f2;
    color: var(--color-primary-teal);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

/* Resource card publish date - hide by default, show on the same surfaces as
   the resource type chips (.resources modules + post slider) */
.iriss-resource-card-date {
    display: none;
}

.resources .iriss-resource-card-date,
.fl-module-post-slider .iriss-resource-card-date {
    display: block;
    font-size: 13px;
    color: #595959;
    margin-bottom: 10px;
}

/* ==========================================================================
   PAST EVENT NOTICE
   Hidden by default, shown when body has .past-event class
   ========================================================================== */

.fl-module.past-event-notice {
    display: none;
}

body.past-event .fl-module.past-event-notice {
    display: block;
}

body.past-event .fl-module-event-button,
body.past-event .fl-module-button {
    display: none;
}

/* Annual Accounts - title and download button side by side */
.iriss-annual-accounts-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.iriss-annual-accounts-row .fl-post-title {
    margin: 0;
    flex: 1;
}

.iriss-annual-accounts-row .fl-post-more-link {
    flex-shrink: 0;
}

a.fl-button.iriss-download-btn,
a.fl-button.iriss-download-btn:visited {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    background-color: #19285F !important;
    color: #ffffff !important;
}

a.fl-button.iriss-download-btn:hover {
    background-color: #0f1a3d !important;
    color: #ffffff !important;
}

/* Annual Accounts - reduce spacing between items */
.iriss-annual-accounts-row {
    padding-top: 10px;
    padding-bottom: 10px;
}

@media (max-width: 768px) {
    .iriss-annual-accounts-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ASPire Hub type chips on post-grid / slider cards (blue variant) */
.resources .iriss-aspire-hub-type .iriss-resource-type-tag,
.fl-module-post-slider .iriss-aspire-hub-type .iriss-resource-type-tag {
	background-color: #e6edf7;
	color: var(--color-primary-navy, #19285f);
}

.resources .iriss-aspire-hub-type a.iriss-resource-type-tag:hover,
.resources .iriss-aspire-hub-type a.iriss-resource-type-tag:focus,
.fl-module-post-slider .iriss-aspire-hub-type a.iriss-resource-type-tag:hover,
.fl-module-post-slider .iriss-aspire-hub-type a.iriss-resource-type-tag:focus {
	background-color: var(--color-primary-navy, #19285f);
	color: #ffffff;
}

/* "Recently added" badge.
   Rendered on resource cards in card-style listings (core BB Posts module,
   custom Posts Grid / Post Slider, and the ASPire Featured Resource). Sits as a
   solid navy corner tab overlaying the top-right of the card image. The card
   wrappers are made positioning contexts so the badge anchors to the card even
   though it is injected lower in the markup (e.g. via the BB before_meta hook). */
.fl-post-grid-post,
.iriss-post-item,
.iriss-post-slider-item,
.iriss-aspire-featured {
	position: relative;
}

.iriss-recently-added-badge {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	margin: 0;
	padding: 5px 10px;
	background-color: var(--color-primary-navy, #19285f);
	color: #ffffff;
	border-radius: 0 0 0 4px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.2;
	pointer-events: none;
}

/* ASPire Hub logo on ASPire Hub taxonomy archives (below breadcrumbs, above title). */
.iriss-aspire-archive-logo {
	margin: 10px 0 6px;
}
.iriss-aspire-archive-logo a {
	display: inline-block;
	line-height: 0;
}
.iriss-aspire-archive-logo img {
	display: block;
	height: 48px;
	width: auto;
	max-width: 100%;
}
