
/* =========================================
   FIRERISK - INSIGHTS
   Single articles and archive
========================================= */

/* =========================================
   BASE
========================================= */

body.single-insight #primary,
body.post-type-archive-insight #primary {
    width: 100%;
    float: none;
    margin: 0;
}

body.post-type-archive-insight #content > .ast-container,
body.post-type-archive-insight #main {
    width: 100%;
    max-width: none;
}

.insight-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 18px;
    box-sizing: border-box;
}

/* =========================================
   SINGLE INSIGHT - PAGE LAYOUT
========================================= */

/* Grey background surrounding the article */
body.single-insight {
    background-color: var(--ast-global-color-4);
}

body.single-insight #content.site-content {
    background-color: #f5f5f5 !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
}

/* Keep Astra's outer wrappers transparent */
body.single-insight #content > .ast-container,
body.single-insight #primary,
body.single-insight #main {
    background: transparent !important;
}

/* White article box */
body.single-insight .insight-article {
    background: #fff !important;
    margin: 5rem 0 0;
    padding: 30px 20px;
    box-sizing: border-box;
}

/*
 * SINGLE SOURCE OF WIDTH
 * All article elements share this container.
 */
body.single-insight .insight-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   SINGLE INSIGHT - CONTENT
========================================= */

/* Breadcrumbs */

body.single-insight .insight-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: none;
    margin-bottom: 24px;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    text-align: center;
}

body.single-insight .insight-breadcrumb a {
    color: #0d479f;
    text-decoration: none;
}

body.single-insight .insight-breadcrumb a:hover {
    text-decoration: underline;
}

/* Heading */

body.single-insight .insight-header {
    width: 100%;
    max-width: none;
    margin: 0 0 1rem;
    padding: 0;
    text-align: center;
}

.insight-category {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 13px;
    font-weight: 700;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.single-insight .insight-title {
    font-family: 'Inter', -apple-system,
        BlinkMacSystemFont, sans-serif !important;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800 !important;
    line-height: 1.15;
    color: #0d479f;
    margin: 0;
}

/* Featured image */

body.single-insight .insight-featured-image {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 32px;
    padding: 0;
}

body.single-insight .insight-featured-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
}

/* Article body */

body.single-insight .insight-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.85;
    color: #333;
}

.insight-content p,
.insight-content li,
.insight-content dt,
.insight-content dd,
.insight-content blockquote,
.insight-content address,
.insight-content td,
.insight-content th {
    font-size: 1rem;
}

.insight-content p,
.insight-content li {
    margin-bottom: 10px;
}

.insight-content h2,
.insight-content h3,
.insight-content h4 {
    font-family: 'Inter', -apple-system,
        BlinkMacSystemFont, sans-serif;
    color: #0d479f;
    font-weight: 800;
    line-height: 1.3;
}

.insight-content h2 {
    font-size: clamp(25px, 3vw, 32px);
    margin: 42px 0 18px;
}

.insight-content h3 {
    font-size: 23px;
    margin: 32px 0 16px;
}

.insight-content ul,
.insight-content ol {
    margin: 0 0 24px 24px;
    padding: 0;
}

.insight-content li {
    margin-bottom: 10px;
}

.insight-content a {
    color: #0d479f;
    text-decoration: underline;
}

.insight-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.insight-content blockquote {
    margin: 32px 0;
    padding: 20px 28px;
    border-left: 4px solid #f58220;
    background: #f7f9fc;
}

/* =========================================
   SINGLE INSIGHT - FOOTER
========================================= */

body.single-insight .insight-footer {
    width: 100%;
    max-width: none;
    margin: 36px 0 0;
    padding: 28px 0 0;
    border-top: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.insight-back-link {
    display: inline-block;
    color: #0d479f;
    font-weight: 700;
    text-decoration: none;
}

.insight-back-link:hover {
    text-decoration: underline;
}

/* =========================================
   INSIGHTS ARCHIVE
========================================= */

.insights-archive {
    background-color: #f5f5f5;
    padding: 32px 0 64px;
}

.insights-archive-header {
    max-width: 750px;
    margin: 0 auto 36px;
    text-align: center;
}

.insights-archive-header h1 {
    font-family: 'Inter', -apple-system,
        BlinkMacSystemFont, sans-serif;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    color: #0d479f;
    margin: 0 0 12px;
    line-height: 1.1;
}

.insights-archive-header p {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.insights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0;
    width: 100%;
}

.insight-card {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.insight-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.insight-card-link:focus-visible {
    outline: 3px solid #f58220;
    outline-offset: -3px;
}

.insight-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.insight-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.insight-card:hover .insight-card-image img {
    transform: scale(1.05);
}

.insight-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 220px;
    padding: 26px;
    box-sizing: border-box;
}

.insight-card-body h2 {
    font-size: 21px;
    line-height: 1.35;
    color: #0d479f;
    margin: 0 0 14px;
}

.insight-card-body p {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 20px;
}

.insight-card-read {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    font-size: 14px;
    font-weight: 700;
    color: #f58220;
}

.insights-pagination {
    margin-top: 55px;
    text-align: center;
}

/* =========================================
   RESPONSIVE
========================================= */

/* Tablet */
@media (min-width: 480px) {

    .insight-container {
        padding: 0 24px;
    }

    body.single-insight .insight-article {
        padding: 40px 24px;
    }

}

/* Desktop */
@media (min-width: 768px) {

    body.single-insight #content.site-content {
        padding-top: 62px !important;
        padding-bottom: 62px !important;
    }

    body.single-insight .insight-article {
        margin-top: 9rem;
        padding: 3em 5em;
    }

    body.single-insight .insight-breadcrumb {
        margin-bottom: 1rem;
    }

    body.single-insight .insight-featured-image {
        margin-bottom: 36px;
    }

    body.single-insight .insight-content {
        font-size: 17px;
    }

    body.single-insight .insight-footer {
        margin-top: 50px;
    }

    .insights-archive {
        padding: 48px 0 80px;
    }

    .insights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
