/* Rank Math blocks share one visual language on the storefront and in Gutenberg. */
.rsh-rankmath-section,
.rsh-content-module {
    margin: clamp(30px, 5vw, 54px) 0;
}

.rsh-rankmath-section > .wp-block-heading:first-child,
.rsh-rankmath-section > h2:first-child,
.rsh-rankmath-heading,
.rsh-content-module > .wp-block-heading:first-child,
.rsh-content-module > h2:first-child,
.rsh-content-module__title {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rsh-green, #0066d7);
    color: var(--rsh-green-dark, #001229);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
}

#rank-math-faq,
.wp-block-rank-math-faq-block {
    display: grid;
    margin: 28px 0;
    gap: 12px;
}

#rank-math-faq .rank-math-list,
.wp-block-rank-math-faq-block .rank-math-list {
    display: grid;
    gap: 12px;
}

#rank-math-faq .rank-math-list-item,
.wp-block-rank-math-faq-block .rank-math-list-item {
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rsh-border, #d9e1ee);
    border-radius: 12px;
    background: var(--rsh-surface, #fff);
    box-shadow: var(--rsh-shadow-soft, 0 8px 24px rgba(0, 18, 41, .07));
}

#rank-math-faq .rank-math-list-item .rank-math-question,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-question {
    margin: 0;
    padding: 16px 18px;
    border-left: 4px solid var(--rsh-green, #0066d7);
    background: var(--rsh-surface-muted, #f3f7ff);
    color: var(--rsh-green-dark, #001229);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}

#rank-math-faq[data-rsh-rankmath-accordion="true"] .rank-math-question,
.wp-block-rank-math-faq-block[data-rsh-rankmath-accordion="true"] .rank-math-question {
    padding: 0;
}

#rank-math-faq .rank-math-question .rsh-rankmath-faq__button,
.wp-block-rank-math-faq-block .rank-math-question .rsh-rankmath-faq__button {
    display: flex;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 15px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}

#rank-math-faq .rank-math-question .rsh-rankmath-faq__button:hover,
.wp-block-rank-math-faq-block .rank-math-question .rsh-rankmath-faq__button:hover {
    background: rgba(0, 102, 215, .06);
}

#rank-math-faq .rank-math-question .rsh-rankmath-faq__button:focus-visible,
.wp-block-rank-math-faq-block .rank-math-question .rsh-rankmath-faq__button:focus-visible {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    outline: 3px solid rgba(0, 102, 215, .3);
    outline-offset: -4px;
}

#rank-math-faq .rsh-rankmath-faq__indicator,
.wp-block-rank-math-faq-block .rsh-rankmath-faq__indicator {
    display: grid;
    width: 30px;
    min-width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--rsh-surface, #fff);
    color: var(--rsh-green, #0066d7);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 0 0 1px var(--rsh-border, #d9e1ee);
    transition: transform 160ms ease, color 160ms ease, background 160ms ease;
}

#rank-math-faq .rank-math-question .rsh-rankmath-faq__button[aria-expanded="true"] .rsh-rankmath-faq__indicator,
.wp-block-rank-math-faq-block .rank-math-question .rsh-rankmath-faq__button[aria-expanded="true"] .rsh-rankmath-faq__indicator {
    transform: rotate(45deg);
    background: var(--rsh-green, #0066d7);
    color: #fff;
}

#rank-math-faq .rsh-rankmath-faq__panel[hidden],
.wp-block-rank-math-faq-block .rsh-rankmath-faq__panel[hidden] {
    display: none;
}

#rank-math-faq .rank-math-list-item .rank-math-answer,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer {
    padding: 16px 18px 18px;
    border-top: 1px solid var(--rsh-border, #d9e1ee);
    color: var(--rsh-text-muted, #66718a);
    line-height: 1.7;
}

#rank-math-faq .rank-math-list-item .rank-math-answer > :first-child,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer > :first-child {
    margin-top: 0;
}

#rank-math-faq .rank-math-list-item .rank-math-answer > :last-child,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer > :last-child {
    margin-bottom: 0;
}

#rank-math-faq .rank-math-list-item .rank-math-answer a,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer a,
.wp-block-rank-math-toc-block a {
    color: var(--rsh-green, #0066d7);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

#rank-math-faq .rank-math-list-item .rank-math-answer a:hover,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer a:hover,
.wp-block-rank-math-toc-block a:hover {
    color: var(--rs-blue-hover, #0055b5);
}

#rank-math-faq .rank-math-list-item .rank-math-answer a:focus-visible,
.wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer a:focus-visible,
.wp-block-rank-math-toc-block a:focus-visible {
    border-radius: 3px;
    outline: 3px solid rgba(0, 102, 215, .28);
    outline-offset: 3px;
}

.wp-block-rank-math-toc-block {
    margin: 30px 0;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid var(--rsh-border, #d9e1ee);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--rsh-surface-muted, #f3f7ff), var(--rsh-surface, #fff));
    box-shadow: var(--rsh-shadow-soft, 0 8px 24px rgba(0, 18, 41, .07));
}

.wp-block-rank-math-toc-block > h2,
.wp-block-rank-math-toc-block > h3 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rsh-border, #d9e1ee);
    color: var(--rsh-green-dark, #001229);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.25;
}

.wp-block-rank-math-toc-block nav,
.wp-block-rank-math-toc-block > ul,
.wp-block-rank-math-toc-block > ol {
    margin: 0;
}

.wp-block-rank-math-toc-block ul,
.wp-block-rank-math-toc-block ol {
    display: grid;
    padding-left: 1.35rem;
    gap: 8px;
}

.wp-block-rank-math-toc-block li {
    margin: 0;
    color: var(--rsh-text-muted, #66718a);
    line-height: 1.5;
}

.wp-block-rank-math-toc-block li::marker {
    color: var(--rsh-green, #0066d7);
    font-weight: 800;
}

.wp-block-rank-math-toc-block li > ul,
.wp-block-rank-math-toc-block li > ol {
    margin-top: 8px;
    padding-left: 1.1rem;
    border-left: 1px solid var(--rsh-border, #d9e1ee);
}

.rsh-prose h2[id],
.rsh-prose h3[id],
.rsh-prose h4[id],
.rsh-article-content h2[id],
.rsh-article-content h3[id],
.rsh-article-content h4[id] {
    scroll-margin-top: 120px;
}

/* Optional class for a core Table block saved together with a real H2. */
.wp-block-table.rsh-content-table {
    display: block;
    max-width: 100%;
    margin: 28px 0;
    overflow-x: auto;
    border: 1px solid var(--rsh-border, #d9e1ee);
    border-radius: 12px;
    background: var(--rsh-surface, #fff);
    box-shadow: var(--rsh-shadow-soft, 0 8px 24px rgba(0, 18, 41, .07));
}

.wp-block-table.rsh-content-table table {
    display: table;
    width: 100%;
    min-width: 620px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
}

.wp-block-table.rsh-content-table th,
.wp-block-table.rsh-content-table td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--rsh-border, #d9e1ee);
    text-align: left;
    vertical-align: top;
}

.wp-block-table.rsh-content-table thead th {
    background: var(--rsh-green-dark, #001229);
    color: #fff;
    font-weight: 800;
}

.wp-block-table.rsh-content-table tbody tr:nth-child(even) {
    background: var(--rsh-surface-soft, #f0f4fa);
}

.wp-block-table.rsh-content-table figcaption {
    margin: 0;
    padding: 10px 14px;
    background: var(--rsh-surface-muted, #f3f7ff);
    color: var(--rsh-text-muted, #66718a);
    font-size: .78rem;
    text-align: left;
}

@media (max-width: 620px) {
    .rsh-rankmath-section,
    .rsh-content-module {
        margin: 26px 0;
    }

    #rank-math-faq .rank-math-list-item .rank-math-question,
    #rank-math-faq .rank-math-list-item .rank-math-answer,
    .wp-block-rank-math-faq-block .rank-math-list-item .rank-math-question,
    .wp-block-rank-math-faq-block .rank-math-list-item .rank-math-answer {
        padding: 14px;
    }

    #rank-math-faq .rank-math-question .rsh-rankmath-faq__button,
    .wp-block-rank-math-faq-block .rank-math-question .rsh-rankmath-faq__button {
        min-height: 50px;
        padding: 14px;
        gap: 12px;
    }

    .wp-block-rank-math-toc-block {
        padding: 16px;
        border-radius: 12px;
    }

    .wp-block-rank-math-toc-block ul,
    .wp-block-rank-math-toc-block ol {
        padding-left: 1.15rem;
    }

    .wp-block-table.rsh-content-table table {
        min-width: 560px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #rank-math-faq .rsh-rankmath-faq__indicator,
    .wp-block-rank-math-faq-block .rsh-rankmath-faq__indicator {
        transition: none;
    }
}
