/* ==========================================================================
   Example cards — shared by the homepage Examples section and the
   All Examples page (home/examples-list.php). Markup:
   application/views/front/home/partials/example-card.php

   Plain values on purpose: the All Examples page uses the regular site
   template, so it does not have the homepage's --hv2-* variables.
   ========================================================================== */

.ex-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1040px;
    margin: 36px auto 0;
    text-align: left;
}

/* fewer than 3 cards: same card width as a full row, centred */
.ex-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 686px;
}

.ex-grid--1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 331px;
}

/* every card in a row is the same height, the link always sits at the bottom */
.ex-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e3e7f3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(30, 40, 110, .08);
    transition: box-shadow .2s ease, transform .2s ease;
}

.ex-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(30, 40, 110, .14);
}

/* wide picture across the top, cropped to fill, never stretched */
.ex-card__media {
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #e7ebf7;
}

.ex-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* no picture: the blue placeholder with the page icon */
.ex-card__media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1d14f0;
}

.ex-card__media--empty img {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.ex-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 18px 20px 20px;
    font-family: 'Inter', 'Raleway', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.ex-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #0c1352;
    overflow-wrap: anywhere;
}

/* one short line of description (wraps to a second line at most) */
.ex-card__line {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: #5b6185;
}

/* room for 4 bullets is kept even when a card has fewer, so all cards match */
.ex-card__bullets {
    min-height: calc(4 * 1.5em + 3 * 4px);
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
    color: #33395e;
}

.ex-card__bullets li {
    position: relative;
    margin: 0 0 4px;
    padding-left: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ex-card__bullets li::before {
    content: '';
    position: absolute;
    top: .6em;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f5a42e;
}

.ex-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1d14f0 !important;
    text-decoration: none !important;
}

.ex-card__link svg {
    width: 16px;
    height: 16px;
    transition: transform .2s ease;
}

.ex-card__link:hover svg {
    transform: translateX(3px);
}

.ex-card__link:focus-visible {
    outline: 2px solid #1d14f0;
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- buttons: "See More Examples" and "Get 4 Free Promotions Now" --- */
.ex-more {
    margin-top: 32px;
    text-align: center;
}

.ex-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 30px;
    border-radius: 999px;
    background: #1d14f0;
    color: #fff !important;
    font-family: 'Inter', 'Raleway', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(29, 20, 240, .25);
    transition: background-color .2s ease, transform .2s ease;
}

.ex-btn:hover {
    background: #1209c4;
    transform: translateY(-1px);
}

.ex-btn:focus-visible {
    outline: 3px solid rgba(29, 20, 240, .35);
    outline-offset: 3px;
}

.ex-btn svg {
    width: 18px;
    height: 18px;
}

/* --- All Examples page --- */
.ex-page {
    padding: 44px 0 70px;
    background: #fff;
}

.ex-page__empty {
    margin: 30px 0 0;
    text-align: center;
    color: #5b6185;
}

/* tablets: 2 across */
@media (max-width: 899px) {
    .ex-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* phones: 1 per row */
@media (max-width: 599px) {
    .ex-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        max-width: 420px;
    }

    .ex-btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}
