/* v5 feature block (includes/v5FeatureBlock.php). Loaded once per page via
   v5_feature_block_assets(). All rules are scoped under .v5-fb so it can sit
   on any page, v5 or legacy, without touching anything else. */

.v5-fb {
    /* Change --v5-fb-font here to restyle the whole block's typeface. */
    --v5-fb-font: 'Inter', system-ui, sans-serif;
    --v5-fb-ink: #232122;
    --v5-fb-gray: #575556;
    width: 100%;
    /* Set per block by the 'background' option (inline --v5-fb-bg); this is the default. */
    background: var(--v5-fb-bg, #f5f9fd);
    font-family: var(--v5-fb-font);
    overflow-x: clip;
}

.v5-fb,
.v5-fb *,
.v5-fb *::before,
.v5-fb *::after {
    box-sizing: border-box;
}

/* 1264 = the mockup's 1200px card + 32px side padding. The mockup uses
   content-box (so its max-width:1200px excludes padding); this block is
   border-box throughout, so the padding has to be added to the cap here or
   the card comes out 64px narrower than the design. */
.v5-fb-inner {
    max-width: 1264px;
    margin: 0 auto;
    padding: 100px 32px;
}

.v5-fb-frame {
    position: relative;
}

.v5-fb-glow {
    position: absolute;
    inset: -30px;
    background:
        radial-gradient(circle at 15% 10%, rgba(36, 145, 235, 0.10), transparent 55%),
        radial-gradient(circle at 90% 90%, rgba(251, 176, 54, 0.12), transparent 55%);
    filter: blur(30px);
    z-index: 0;
    pointer-events: none;
}

.v5-fb-card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 48px;
    padding: 88px 64px;
    box-shadow: 0 40px 90px rgba(35, 32, 31, 0.08);
}

.v5-fb .v5-fb-heading {
    max-width: 520px;
    margin: 0 0 56px;
    font-family: var(--v5-fb-font);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-transform: none;
    color: var(--v5-fb-ink);
}

.v5-fb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 64px;
    row-gap: 56px;
}

.v5-fb-icon {
    /* an <img> of a tile-style icon file (action/icon-ideas/round3): the file
       already is the rounded coloured tile, so this only sets its size */
    display: block;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
}

.v5-fb .v5-fb-item h3 {
    margin: 0 0 12px;
    font-family: var(--v5-fb-font);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
    text-transform: none;
    color: var(--v5-fb-ink);
}

.v5-fb .v5-fb-item p {
    margin: 0 0 18px;
    font-family: var(--v5-fb-font);
    font-size: 18px;
    line-height: 1.65;
    color: var(--v5-fb-gray);
}

/* width/height attributes on the <img>/<video> give the browser the aspect
   ratio up front, so with height:auto the space is reserved before load. */
.v5-fb-media {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ececec;
    border-radius: 12px;
}

/* The poster and the video can differ in shape by a couple of percent; cover
   keeps the pinned box filled with no bars instead of letterboxing. */
video.v5-fb-media {
    object-fit: cover;
}

.v5-fb-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 64px;
}

.v5-fb .v5-fb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 14px 32px;
    border-radius: 999px;
    font-family: var(--v5-fb-font);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.v5-fb .v5-fb-btn-primary,
.v5-fb .v5-fb-btn-primary:visited {
    background: var(--orange-cta, #fbb03b);
    color: #ffffff !important;
}

.v5-fb .v5-fb-btn-primary:hover,
.v5-fb .v5-fb-btn-primary:focus {
    background: var(--orange-hover, #ffc15e);
}

.v5-fb .v5-fb-btn-secondary,
.v5-fb .v5-fb-btn-secondary:visited {
    background: transparent;
    color: #2491eb !important;
    border: 2px solid #2491eb;
}

.v5-fb .v5-fb-btn-secondary:hover,
.v5-fb .v5-fb-btn-secondary:focus {
    background: #f3f8fe;
}

@media (max-width: 900px) {
    .v5-fb-inner { padding: 64px 20px; }
    .v5-fb-card { padding: 56px 32px; border-radius: 32px; }
    .v5-fb .v5-fb-heading { margin-bottom: 40px; font-size: 34px; }
    .v5-fb-grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
    .v5-fb .v5-fb-item h3 { font-size: 24px; }
    .v5-fb .v5-fb-item p { font-size: 17px; }
    .v5-fb-actions { margin-top: 48px; }
}

@media (max-width: 520px) {
    .v5-fb-inner { padding: 48px 16px; }
    .v5-fb-glow { inset: -16px; }
    .v5-fb-card { padding: 40px 22px; border-radius: 28px; }
    .v5-fb .v5-fb-heading { font-size: 30px; }
}

/* ==========================================================================
   Style: cards  (v5_feature_block_render_cards)
   Eyebrow + centred heading + intro, then a grid of icon cards. Values are
   from the "solutions" section of the v5 design mockup (index3.html).
   Uses its own class names (v5-fb-head, v5-fb-tile, ...) rather than the
   showcase ones so the two styles can't affect each other.
   ========================================================================== */

.v5-fb--cards .v5-fb-inner {
    padding-top: 108px;
    padding-bottom: 108px;
}

/* The header's type scale, colours and 680px width are mirrored by
   .v5-page-heading (with its .v5-accent-bar) in v5custom.css so page headings
   and block headers look like one family. If you change one, change the other. */
.v5-fb-head {
    max-width: 680px;
    margin: 0 auto 60px;
    text-align: center;
}

.v5-fb .v5-fb-eyebrow {
    margin: 0 0 14px;
    font-family: var(--v5-fb-font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2491eb;
}

.v5-fb .v5-fb-title {
    margin: 0 0 16px;
    font-family: var(--v5-fb-font);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--v5-fb-ink);
}

.v5-fb .v5-fb-intro {
    margin: 0;
    font-family: var(--v5-fb-font);
    font-size: 18px;
    line-height: 1.6;
    color: var(--v5-fb-gray);
}

.v5-fb-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.v5-fb-tile {
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 34px 28px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.v5-fb-tile:hover {
    box-shadow: 0 16px 40px rgba(35, 32, 31, 0.10);
    transform: translateY(-3px);
}

.v5-fb-tile .v5-fb-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 22px;
}

.v5-fb .v5-fb-tile h3 {
    margin: 0 0 12px;
    font-family: var(--v5-fb-font);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.6; /* the mockup sets none, so its h3 inherits the page's 1.6 */
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--v5-fb-ink);
}

.v5-fb .v5-fb-tile p {
    margin: 0;
    font-family: var(--v5-fb-font);
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--v5-fb-gray);
}

/* Added automatically when the block's 'background' is dark (see
   v5_feature_block_background()). Only the heading and intro need it: they sit
   straight on the section colour, while the cards and the showcase card are
   white and keep their own dark text. */
.v5-fb--dark .v5-fb-title { color: #ffffff; }
.v5-fb--dark .v5-fb-intro { color: rgba(255, 255, 255, 0.72); }

@media (prefers-reduced-motion: reduce) {
    .v5-fb-tile { transition: none; }
    .v5-fb-tile:hover { transform: none; }
}

@media (max-width: 900px) {
    .v5-fb--cards .v5-fb-inner { padding-top: 72px; padding-bottom: 72px; }
    .v5-fb-head { margin-bottom: 44px; }
    .v5-fb .v5-fb-title { font-size: 34px; }
    .v5-fb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .v5-fb--cards .v5-fb-inner { padding-top: 56px; padding-bottom: 56px; }
    .v5-fb .v5-fb-title { font-size: 30px; }
    .v5-fb-tiles { grid-template-columns: minmax(0, 1fr); }
}
