/* ===== CLEARPOINT BLOG ARTICLE STYLES ===== */
/* This style block can be reused across different blog articles */
/* Requires: Font Awesome Sharp Solid font and Chart.js library */
/* Optional: ClearPoint Charts Module for simplified chart creation */

/* Blog Rich Text Base */
.blog-rich-text img {
    max-width: 792px;
}
.w-richtext figure.w-richtext-align-fullwidth {
    position: relative;
    width: 100%;
    max-width: 100%;
}
.w-richtext figure.w-richtext-align-floatleft {
    width: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    clear: both;
}
.w-richtext figure.w-richtext-align-floatleft img {
    max-width: 128px !important;
    max-height: 128px !important;
    object-fit: cover !important;
    margin-left: 100px;
}
.blog-rich-text blockquote:before {
    content: "\201C";
    position: absolute;
    top: 0;
    left: 85px;
    transform: translate(-60%, 15%);
    width: 4rem;
    height: 4rem;
    font: 8em/1.08em "PT Sans", sans-serif;
    color: #1d84c7;
}
.blog-rich-text a strong {
    color: #1d84c7 !important;
}
.blog-rich-text h3 a {
    display: block;
    border-left: 4px solid #f9ac5a;
    margin-top: 30px;
    margin-bottom: 30px;
    line-height: 115%;
    padding: 20px 20px 20px 40px;
    font-weight: 600;
    background-color: #fff8f1;
}
.blog-rich-text ol,
.blog-rich-text ul {
    margin-top: 0;
    margin-bottom: 10px;
}
.blog-rich-text li {
    margin-bottom: 10px;
    line-height: 1.45em;
}
.blog-rich-text ul ul {
    margin-top: 10px;
}
.blog-rich-text h2 {
    line-height: 1.15em;
}
.blog-table {
    width: 100%;
    max-width: 792px;
    margin: 0 auto 20px;
    border-color: #666;
    border-radius: 6px;
}
.blog-table td {
    padding: 10px;
    line-height: 1.35em;
    vertical-align: top;
    font-size: 15px;
    border: 1px solid #efefef;
}
.blog-table th {
    padding: 10px;
    font-weight: 700;
    background-color: #efefef;
}

/* HubSpot CTA */
.w-embed:has(.hs-cta-embed.full-width) {
    background-color: #f4f4f7;
    padding: 61px 0;
    margin: 30px 0;
}
.hs-cta-embed.full-width iframe,
.hubspot-cta {
    max-width: 792px;
    margin: 0 auto;
}
.hs-cta-embed.full-width {
    margin: auto;
}
.w-richtext-align-fullwidth {
    max-width: 792px !important;
    margin: 0 auto;
}
.w-richtext-figure-type-video {
    max-width: 792px !important;
    border-radius: 24px;
    margin: auto;
}

/* Modal */
#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(50, 50, 50, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Start with 0 opacity */
    transition: opacity 0.3s ease; /* Add transition for opacity */
    backdrop-filter: blur(3px);
}

#modal.show {
    opacity: 1; /* Show modal with full opacity */
}

#modal img {
    max-width: 90hw;
    max-height: 90vh;
    border-radius: 3px;
    display: block; /* Ensure the image is displayed as a block element */
    margin: 0 auto; /* Center the image horizontally */
}

#modal-caption {
    color: #fff; /* Set caption text color */
    margin-top: 10px; /* Add space between image and caption */
    text-align: center; /* Center the caption text */
    font-size: 18px;
    font-family: poppins;
    max-width: 90%;
    padding: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
    justify-content: center;
    align-items: center;
    margin-left: 5%;
    margin-right: 5%;
    border-radius: 3px;
}

/* Style for the close button */
#close {
    position: absolute;
    top: 2%;
    right: 2%;
    color: #fff;
    cursor: pointer;
    font-size: 4rem;
    font-weight: 100;
    color: #cea92f;
    text-shadow: 0px 0px #cea92f;
    font-family: roboto;
}

/* Change cursor to pointer when hovering over initial figure image */
.w-richtext-align-fullwidth.w-richtext-figure-type-image img {
    cursor: pointer;
}

/* Change cursor to pointer for entire body when modal is open */
body.modal-open {
    cursor: pointer;
}

/* Container and Base */
.cp-article {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 792px;
    margin: 0 auto;
    padding: 2rem;
}

/* Font Awesome Icons */
.cp-icon {
    font-family: "FONT AWESOME SHARP SOLID";
    margin-right: 0.5rem;
    color: #106eac;
}

/* Typography */
.cp-article h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #27245e;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid #ff642c;
    clear: both;
}

.cp-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #106eac;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cp-article h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #514e8f;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.cp-article p {
    margin-bottom: 1.5rem;
    color: #555;
}

/* SVG Figures */
.cp-figure {
    margin: 2rem 0;
    max-width: 300px;
}

.cp-figure-left {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.cp-figure-right {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.cp-figure-caption {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

/* Highlight Boxes */
.cp-highlight {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    clear: both;
}

.cp-highlight-primary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #1fab94;
    border-radius: 0 8px 8px 0;
}

.cp-highlight-secondary {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dd 100%);
    border-left: 4px solid #ff642c;
    border-radius: 0 8px 8px 0;
}

.cp-highlight-accent {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6edff 100%);
    border-left: 4px solid #106eac;
    border-radius: 0 8px 8px 0;
}

/* Card Layouts */
.cp-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
    clear: both;
}

.cp-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.cp-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cp-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Layout Variations */
.cp-layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin: 2rem 0;
}

.cp-layout-sidebar-reverse {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.cp-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #106eac;
}

.cp-card-header {
    margin-bottom: 1rem;
}

.cp-card h3,
.cp-card h4 {
    margin: 0 0 0.5rem 0;
}

/* Accent Cards */
.cp-card-accent {
    position: relative;
    overflow: hidden;
}

.cp-card-accent::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff642c 0%, #1fab94 50%, #106eac 100%);
}

/* Feature List with Background */
.cp-feature-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.cp-feature-list h3 {
    margin-top: 0;
}

/* Statistics */
.cp-stat {
    text-align: center;
    padding: 1rem;
}

.cp-stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #ff642c;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.cp-stat-label {
    color: #666;
    font-size: 1rem;
}

/* Lists */
.cp-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.cp-list li {
    padding: 0.75rem 0;
    position: relative;
}

/* Charts */
.cp-chart-container {
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.cp-chart-title {
    text-align: center;
    color: #27245e;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Sections */
.cp-section {
    margin: 3rem 0;
    padding: 2rem 0;
    border-bottom: 1px solid #e0e0e0;
    overflow: auto;
}

.cp-section:last-child {
    border-bottom: none;
}

/* FAQ Items */
.cp-faq-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cp-faq-item:hover {
    border-color: #106eac;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.cp-faq-question {
    font-weight: 600;
    color: #27245e;
    margin-bottom: 0.5rem;
}

/* Callout Box */
.cp-callout {
    background: #27245e;
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.cp-callout h3 {
    color: white;
    margin-top: 0;
}

.cp-callout p {
    color: rgba(255, 255, 255, 0.9);
}

/* Two Column Text */
.cp-columns {
    column-count: 2;
    column-gap: 2rem;
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cp-article {
        padding: 1rem;
    }

    .cp-grid-2,
    .cp-grid-3,
    .cp-grid-4 {
        grid-template-columns: 1fr;
    }

    .cp-layout-sidebar,
    .cp-layout-sidebar-reverse {
        grid-template-columns: 1fr;
    }

    .cp-figure-left,
    .cp-figure-right {
        float: none;
        margin: 2rem auto;
    }

    .cp-columns {
        column-count: 1;
    }

    .cp-chart-container {
        max-width: 100% !important;
    }

    .cp-article h2 {
        font-size: 1.5rem;
    }

    .cp-article h3 {
        font-size: 1.25rem;
    }
}

/* Utility Classes */
.cp-text-center {
    text-align: center;
}
.cp-mt-2 {
    margin-top: 2rem;
}
.cp-mb-2 {
    margin-bottom: 2rem;
}
.cp-w-50 {
    max-width: 50%;
}
.cp-w-60 {
    max-width: 60%;
}
.cp-w-70 {
    max-width: 70%;
}
.cp-w-80 {
    max-width: 80%;
}

/* Clear floats */
.cp-clear {
    clear: both;
}
