/*
 * Guide (lead magnet) pages and newsletter page — class hooks for the
 * existing blocks. Each class is set from the block's "Additional CSS class"
 * field in the editor, so the same look works on every guide page without
 * page-id selectors (ids differ between local and live).
 *
 *   section-pad           Row        vertical padding for a coloured section
 *   guide-eyebrow         Heading    (tag Label) lime pill above the title
 *   guide-cover           HTML/Script the printed-test cover (see markup in docs)
 *   iconlist-squares      Icon List  (marker Numero) small blue square bullets
 *   guide-form-card       Column     white rounded card around the HubSpot form
 *   guide-card            Column     horizontal link card: thumb + texts
 *   guide-thumb           HTML/Script coloured thumb with the test number
 *   numbered-card         Column     white bordered card with serif number
 *
 * Blog "Guide" band (blog page, before Contact Us):
 *   guide-band            Row        navy band wrapper (with section-pad)
 *   guide-band-eyebrow    Heading    (Label) inner <span> = lime pill, rest plain text
 *   guide-band-panel      Column     cream panel with title, intro and label
 *   guide-band-cut        Heading    (Label) scissors icon before the inner <span>
 *   guide-band-tests      Row        cards row: no gap, dotted top border
 *   guide-test-card       Column     tear-off test card (+ --torn: rotated, desktop)
 *   guide-test-tile       HTML/Script coloured cover with label, number, pixels
 */

/* -- Sections -- */

.section-pad {
    padding-bottom: 96px;
    padding-top: 80px;
}

/* -- Eyebrow pill -- */

.guide-eyebrow span {
    background-color: var(--color-lime-50);
    border-radius: 999px;
    display: inline-block;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    text-transform: uppercase;
}

/* -- Test cover -- */

.guide-cover {
    background-color: #fff;
    border-top: 2px dashed var(--color-taupe-50);
    box-shadow: 0 18px 40px rgb(21 32 55 / 0.12);
    margin: 8px auto 0;
    max-width: 214px;
    padding: 12px 12px 26px;
    transform: rotate(-3deg);
}

.guide-cover__sheet {
    background-color: var(--guide-color, var(--color-lime-50));
    color: var(--color-navy-80);
    height: 230px;
    padding: 18px 16px;
    position: relative;
}

.guide-cover__tag {
    background-color: var(--color-navy-80);
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 4px 7px;
}

.guide-cover__title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    margin: 14px 0 0;
    max-width: 140px;
}

.guide-cover__num,
.guide-thumb__num {
    bottom: 10px;
    font-family: var(--font-secondary);
    font-size: 54px;
    font-style: italic;
    left: 16px;
    line-height: 1;
    position: absolute;
}

.guide-cover__px {
    bottom: 8px;
    fill: var(--color-blue-50);
    position: absolute;
    right: 8px;
}

/* -- Bullet list with small blue squares -- */

.iconlist-squares .iconlist-marker {
    background-color: var(--color-blue-50);
    border-radius: 0;
    flex: 0 0 8px;
    font-size: 0;
    height: 8px;
    margin-top: 7px;
    width: 8px;
}

/* -- Form card -- */

.guide-form-card {
    background-color: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgb(21 32 55 / 0.08);
    min-height: 420px;
    padding: 34px 32px 36px;
}

.guide-form-card iframe {
    display: block;
    width: 100%;
}

/* -- Related test cards (thumb left, texts right) -- */

.guide-card {
    background-color: var(--color-quartz-50);
    border-radius: 4px;
    border-top: 2px dashed var(--color-ice-60);
    color: var(--color-navy-80);
    padding: 14px;
    position: relative;
}

.guide-card > .relative {
    align-content: start;
    column-gap: 22px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    /* Last row takes the leftover height so the button sits at the bottom. */
    grid-template-rows: auto auto 1fr;
    row-gap: 10px;
}

.guide-card > .relative > :first-child {
    grid-row: 1 / span 3;
}

.guide-card > .relative > :not(:first-child) {
    grid-column: 2;
}

.guide-card > .relative > :nth-child(2) {
    padding-top: 4px;
}

/* The design uses a text link here; with the taller pill button the space
 * above it is set explicitly (~38px from the title, as in the design). */
.guide-card > .relative > :last-child {
    align-self: end;
    padding-top: 28px;
}

/* Category label */
.guide-card > .relative > :nth-child(2) span {
    font-size: 11px;
    letter-spacing: 0.1em;
    line-height: 1.3;
}

/* Test title */
.guide-card h3 {
    font-size: 18px;
    line-height: 1.25;
}

.guide-thumb {
    background-color: var(--guide-color, var(--color-lime-50));
    border-radius: 3px;
    height: 100%;
    min-height: 138px;
    position: relative;
    /* Explicit width: the HTML/Script wrapper (mx-auto) shrinks to fit in the grid cell. */
    width: 118px;
}

.guide-thumb__num {
    bottom: 6px;
    font-size: 52px;
    left: 12px;
}

/* -- Blog "Guide" band: cream panel + three tear-off test cards -- */

/* Heading (Label): the inner <span> becomes the lime pill, the rest stays plain text.
 * The label tag renders its own outer <span>, hence "span span". */
.guide-band-eyebrow > div > span {
    font-size: 15px;
    line-height: 1.6;
}

.guide-band-eyebrow span span {
    background-color: var(--color-lime-50);
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    margin-right: 14px;
    padding: 6px 14px;
}

.guide-band-panel {
    background-color: var(--color-quartz-50);
    padding: 56px 56px 36px;
}

.guide-band-panel h2 {
    max-width: 900px;
}

.guide-band-panel p {
    max-width: 700px;
}

/* "Strappa il test che ti serve": scissors icon before the label. */
.guide-band-cut span span::before {
    background-color: currentColor;
    content: "";
    display: inline-block;
    height: 18px;
    margin-right: 10px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M8.1 8.1 20 20M8.1 15.9 20 4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M8.1 8.1 20 20M8.1 15.9 20 4'/%3E%3C/svg%3E") center / contain no-repeat;
    vertical-align: -4px;
    width: 18px;
}

.guide-band-cut span span {
    letter-spacing: 0.1em;
}

/* The Row block turns gap "0" into its default, so the gap is reset here;
 * stretch keeps the cards the same height. */
.guide-band-tests .grid {
    align-items: stretch;
    border-top: 2px dotted var(--color-navy-80);
    gap: 0;
}

.guide-test-card {
    background-color: var(--color-quartz-50);
    border-left: 1px dashed var(--color-quartz-70);
    margin-bottom: 14px;
    padding: 18px 18px 26px;
    position: relative;
}

/* Torn bottom edge: a row of downward teeth in the card colour. */
.guide-test-card::after {
    background-color: var(--color-quartz-50);
    bottom: -12px;
    content: "";
    height: 12px;
    left: 0;
    -webkit-mask: conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) 0 0 / 24px 100% repeat-x;
    mask: conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) 0 0 / 24px 100% repeat-x;
    position: absolute;
    right: 0;
}

/* The last card looks half torn off. Desktop only: on one column it would overflow. */
@media (min-width: 1024px) {
    .guide-test-card--torn {
        filter: drop-shadow(0 10px 18px rgb(0 0 0 / 0.25));
        transform: rotate(3deg) translate(10px, 4px);
        transform-origin: top left;
    }
}

.guide-test-card > .relative > :not(:first-child) {
    padding: 0 12px;
}

.guide-test-tile {
    background-color: var(--guide-color, var(--color-lime-50));
    color: var(--color-navy-80);
    height: 200px;
    margin-bottom: 26px;
    padding: 20px;
    position: relative;
}

.guide-test-tile__label {
    background-color: var(--color-navy-80);
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 6px 10px;
}

.guide-test-tile__num {
    bottom: 12px;
    font-family: var(--font-secondary);
    font-size: 76px;
    font-style: italic;
    left: 20px;
    line-height: 1;
    position: absolute;
}

.guide-test-tile__px {
    bottom: 0;
    fill: var(--color-blue-50);
    position: absolute;
    right: 0;
}

.guide-test-tile__px .guide-test-tile__hole {
    fill: var(--guide-color, var(--color-lime-50));
}

.guide-test-card h3 {
    font-size: 22px;
    line-height: 1.3;
}

@media (max-width: 767px) {
    .guide-band-panel {
        padding: 36px 24px 28px;
    }
}

/* -- Numbered cards (newsletter "Cosa trovi in ogni numero") -- */

.numbered-card {
    background-color: #fff;
    border: 1px solid var(--color-ice-40);
    border-radius: 16px;
    padding: 32px 28px 36px;
}

.numbered-card .numbered-card__num span {
    font-family: var(--font-secondary);
    font-style: italic;
    font-weight: 400;
}
