/**
 * Styles for the "Guide Boxes" component (Components/guide_boxes).
 * Scoped under .guide-box* throughout. The card look deliberately mirrors
 * .benefit-boxes-section .box-holder / img.icons in
 * css/ModularPageBuilderBaseStyles.css (copied here, not shared, so editing
 * one can never change the other).
 */

.guide-boxes-section {
    padding-top: 70px;
    padding-bottom: 70px;
}

@media (max-width: 1280px) {
    .guide-boxes-section {
        padding-top: 50px;
        padding-bottom: 50px;
    }
}

/* ---------- Title block: centred H2 with a "See all guides >" link under it ---------- */

/* Gap under the title block: 40px large / 30px small / 20px mobile (spec). */
.guide-boxes-header {
    text-align: center;
    margin-bottom: 40px;
}

.guide-boxes-heading {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    padding-bottom: 0 !important;
    margin-bottom: 8px !important;
}

.guide-boxes-see-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9375em;
    color: var(--color-dark-teal);
    text-decoration: none;
}

.guide-boxes-see-all:hover {
    text-decoration: underline;
    color: var(--color-dark-teal);
}

.guide-boxes-empty {
    text-align: center;
    color: var(--color-grey);
}

@media (max-width: 1280px) {
    .guide-boxes-header { margin-bottom: 30px; }
}

@media (max-width: 767px) {
    .guide-boxes-header { margin-bottom: 20px; }
}

/* ---------- Grid: 3 across, 2 on tablet, 1 on mobile ---------- */

/* padding-top is the 27px the circular icon overhangs each card's top edge,
   so the spec'd gap under the title block is measured to the icon, not the card. */
.guide-boxes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 30px;
    row-gap: 56px;
    padding-top: 27px;
}

@media (max-width: 1024px) {
    .guide-boxes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .guide-boxes-grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 45px;
    }
}

/* ---------- Box ---------- */

/* Whole tile is one link. Rest state has a white 2px border so hover can swap
   that border to the rainbow gradient without the box changing size. */
.guide-box {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px;
    border: 2px solid var(--color-white);
    border-radius: 20px;
    background: var(--color-white);
    box-shadow: 0 0 20px rgb(0 0 0 / 8%);
    color: var(--color-off-black);
    text-decoration: none;
    transition: box-shadow 0.2s ease;
}

@media (max-width: 1280px) {
    .guide-box { padding: 30px; }
}

/* Rainbow hover — same palette and blurred-glow recipe as .btn-rainbow in
   ModularPageBuilderBaseStyles.css (gradient border + soft coloured halo). */
.guide-box::before {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(90deg, #67D1CE, #FFC424, #E22B7F);
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.guide-box:hover,
.guide-box:focus-visible {
    border-color: transparent;
    background-image: linear-gradient(var(--color-white), var(--color-white)), linear-gradient(90deg, #67D1CE, #FFC424, #E22B7F);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    text-decoration: none;
    color: var(--color-off-black);
    outline: none;
}

.guide-box:hover::before,
.guide-box:focus-visible::before {
    opacity: 0.55;
}

/* Circular icon overhanging the top-left corner (as .benefit-boxes-section img.icons). */
.guide-box .guide-box-icon {
    position: absolute;
    top: -29px; /* 27px overhang + the 2px border */
    left: 0;
    width: 66px;
    height: 66px;
    padding: 13px;
    border: 1px solid var(--color-teal);
    border-radius: 999px;
    background: var(--color-white);
    object-fit: contain;
}

.guide-box .guide-box-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.15em !important;
    line-height: 1.35 !important;
    padding: 28px 0 0 !important;
    margin: 0 0 12px;
    color: var(--color-off-black);
}

.guide-box--no-icon .guide-box-title {
    padding-top: 0 !important;
}

.guide-box .guide-box-text {
    margin: 0 0 20px;
    font-size: 0.875em;
    line-height: 1.5;
    color: #5f5f5f;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-box .guide-box-cta {
    margin-top: auto;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.875em;
    color: var(--color-dark-teal);
}
