/* ============================================================
   CMS Block Styles
   Supplements brand.css for CMS-rendered content blocks.
   CSS variables defined in brand.css are used throughout.
   ============================================================ */

/* ---- Rich Text ------------------------------------------- */
.cms-richtext {
    color: var(--gg-grey-dark);
}

.cms-richtext h1,
.cms-richtext h2,
.cms-richtext h3,
.cms-richtext h4,
.cms-richtext h5,
.cms-richtext h6 {
    font-family: var(--gg-font-heading);
    color: var(--gg-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.cms-richtext p {
    line-height: 1.75;
    margin-bottom: 1rem;
}

.cms-richtext ul,
.cms-richtext ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.cms-richtext li {
    line-height: 1.7;
    margin-bottom: 0.25rem;
}

.cms-richtext a {
    color: var(--gg-secondary);
    text-decoration: underline;
}

.cms-richtext a:hover {
    color: var(--gg-accent);
}

.cms-richtext blockquote {
    border-left: 4px solid var(--gg-accent);
    padding-left: 1.25rem;
    margin-left: 0;
    color: var(--gg-grey-medium);
    font-style: italic;
}

.cms-richtext hr {
    border-color: var(--gg-grey-lightest);
    margin: 2rem 0;
}

/* ---- FAQ Accordion --------------------------------------- */
.cms-faq .accordion-item {
    background-color: #fff;
    border: 1px solid var(--gg-grey-lightest);
    border-radius: 6px !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.cms-faq .accordion-button {
    background-color: #fff;
    color: var(--gg-primary);
    font-weight: 600;
    font-family: var(--gg-font-heading);
}

.cms-faq .accordion-button:not(.collapsed) {
    background-color: var(--gg-primary);
    color: var(--gg-accent);
    box-shadow: none;
}

.cms-faq .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(163, 255, 146, 0.25);
}

.cms-faq .accordion-button::after {
    filter: none;
}

.cms-faq .accordion-button:not(.collapsed)::after {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(60deg);
}

.cms-faq .accordion-body {
    color: var(--gg-grey-dark);
    line-height: 1.7;
}

/* ---- Testimonials ---------------------------------------- */
.cms-testimonials .cms-testimonial-card {
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(163, 255, 146, 0.2);
    border-radius: 8px;
    transition: border-color 0.2s, background-color 0.2s;
}

.cms-testimonials .cms-testimonial-card:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(163, 255, 146, 0.5);
}

.cms-testimonials .cms-testimonial-quote {
    color: var(--gg-grey-lightest);
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
}

.cms-testimonials .blockquote-footer {
    color: var(--gg-accent);
}

.cms-testimonials .blockquote-footer small {
    color: var(--gg-grey-light);
}

/* ---- Image with Text ------------------------------------- */
.cms-image-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cms-image-text p {
    line-height: 1.75;
    color: var(--gg-grey-dark);
}

/* ---- Pricing (CMS block wrapper) ------------------------- */
.cms-pricing .gg-card {
    transition: box-shadow 0.2s, transform 0.2s;
}

.cms-pricing .gg-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cms-pricing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 62rem;
    margin-inline: auto;
}

/* Matches the md breakpoint the cards used to stack at. */
@media (min-width: 768px) {
    .cms-pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    }
}

/* Fallback for browsers without subgrid: only the CTA is pinned to the bottom. */
.cms-pricing-grid .gg-card {
    display: flex;
    flex-direction: column;
}

/* Cards share the grid's row tracks so name, description, price, features and
   CTA line up across cards even when the copy wraps to a different number of
   lines. */
@supports (grid-template-rows: subgrid) {
    .cms-pricing-grid .gg-card {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 5;
        row-gap: 0;
    }
}

/* ---- Features (icon display) ----------------------------- */
.cms-feature-icon {
    margin-bottom: 0.5rem;
    color: var(--gg-accent);
}

.gg-feature-icon {
    width: 2rem;
    height: 2rem;
    fill: currentColor;
}

/* ---------- Video block ---------- */
.cms-video-frame {
    position: relative;
    background: var(--gg-grey-dark, #2b2f33);
    border-radius: 0.5rem;
    overflow: hidden;
}

.cms-video-player {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.cms-video-caption {
    font-family: var(--gg-font-body, inherit);
}

.cms-video-error {
    margin: 0;
    padding: 2rem 1rem;
    color: #fff;
    text-align: center;
}

/* ---------- Document block ---------- */
.cms-document-card {
    max-width: 48rem;
    overflow: hidden;
}

.cms-document-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 12rem;
    background: var(--gg-grey-light, #eef0f2);
}

.cms-document-cover img,
.cms-document-cover canvas {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.cms-document-viewer {
    background: var(--gg-grey-light, #eef0f2);
}

.cms-document-page {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
