/**
 * Categories block — curated card grid rendered by CategoriesBlockCell.
 *
 * Drop-target for the GrapesJS Dynamic Content > Categories block. The
 * card layout intentionally mirrors the "Packages for Every Traveller"
 * mock: a per-card accent colour drives the top border, title, icon,
 * and CTA button; the inline background-image is washed back with a
 * white gradient so the title stays readable.
 */

.th2-categories-block.th2-section { padding: 56px 0 40px; }

.th2-categories-block .th2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.th2-categories-block .th2-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
}

.th2-categories-block .th2-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.th2-categories-block .th2-cat-card {
    position: relative;
    background-color: #f8fafc;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* padding-box keeps the inline gradient/photo from bleeding over the
       coloured top border so the per-card accent strip is visible. */
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
    transition: transform .15s ease, box-shadow .15s ease;
}
.th2-categories-block .th2-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15,23,42,0.12);
}

/* Body wraps head + desc so the foot can sit at the bottom as a sibling.
   The body grows to fill, pushing the foot down naturally — keeps the
   foot extendable to a full-bleed strip in the footered variant. */
.th2-categories-block .th2-cat-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.th2-categories-block .th2-cat-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.th2-categories-block .th2-cat-card-icon {
    font-size: 1.25rem;
    line-height: 1;
}
.th2-categories-block .th2-cat-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.th2-categories-block .th2-cat-card-desc {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0 0 16px;
    flex: 1;
}

.th2-categories-block .th2-cat-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}
.th2-categories-block .th2-cat-card-price {
    color: #1a202c;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}
.th2-categories-block .th2-cat-card-price strong {
    color: #1a202c;
    font-size: 1.05rem;
    margin: 0 2px;
}
.th2-categories-block .th2-cat-card-price-unit { color: #334155; }

/* Price + button share the same rounded-rect shape so the two read as a
   matched pair. The inline style supplies the background + foreground;
   children inherit so the chosen colour stays consistent. */
.th2-categories-block .th2-cat-card-price--pill {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
}
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price--pill {
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.28);
}
.th2-categories-block .th2-cat-card-price--pill strong,
.th2-categories-block .th2-cat-card-price--pill .th2-cat-card-price-unit {
    color: inherit;
}

.th2-categories-block .th2-cat-card-btn {
    /* Default text colour; the template overrides per-card via inline style
       so a white CTA picks dark text and a green CTA stays white. */
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.th2-categories-block .th2-cat-card-btn:hover {
    /* No colour override — keep the inline-derived foreground on hover so
       white pills stay readable instead of flashing to invisible white-on-white. */
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15,23,42,0.22);
}

/* ------- Bold variant ------- */
/* Image shows through, dark gradient at bottom = white text on photo. */
.th2-categories-block .th2-cat-card--bold {
    min-height: 280px;
    padding: 20px 22px 18px;
}
.th2-categories-block .th2-cat-card--bold .th2-cat-card-desc {
    color: #334155;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price,
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price strong,
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price-unit {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}
/* When a per-card pill colour is set, drop the bold variant's white-on-dark
   override so the inline pill background + auto foreground take over. */
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price--pill,
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price--pill strong,
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price--pill .th2-cat-card-price-unit {
    text-shadow: none;
}
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price--pill strong,
.th2-categories-block .th2-cat-card--bold .th2-cat-card-price--pill .th2-cat-card-price-unit {
    color: inherit;
}
.th2-categories-block .th2-cat-card--bold .th2-cat-card-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.28);
}

/* ------- Footered variant ------- */
/* Splits the card into a top image area (body) and a tinted footer strip
   (foot) that carries the price + button. The card itself loses its inner
   padding so the foot can sit edge-to-edge; the body takes over the spacing. */
.th2-categories-block .th2-cat-card--bold.th2-cat-card--footered {
    padding: 0;
    min-height: 320px;
}
.th2-categories-block .th2-cat-card--footered .th2-cat-card-body {
    padding: 22px 22px 16px;
}
.th2-categories-block .th2-cat-card--footered .th2-cat-card-foot {
    padding: 14px 22px;
    margin-top: 0;
    /* background colour comes from the inline accent tint */
}
/* Footer strip is light, so undo bold's white-on-dark price text. */
.th2-categories-block .th2-cat-card--bold.th2-cat-card--footered .th2-cat-card-price,
.th2-categories-block .th2-cat-card--bold.th2-cat-card--footered .th2-cat-card-price strong,
.th2-categories-block .th2-cat-card--bold.th2-cat-card--footered .th2-cat-card-price-unit {
    color: #1a202c;
    text-shadow: none;
}
.th2-categories-block .th2-cat-card--bold.th2-cat-card--footered .th2-cat-card-price-unit {
    color: #475569;
}
.th2-categories-block .th2-cat-card--footered .th2-cat-card-price strong {
    font-size: 1.15rem;
    /* inline style sets the accent colour on the bold number */
}

@media (max-width: 991.98px) {
    .th2-categories-block .th2-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575.98px) {
    .th2-categories-block .th2-cat-grid {
        grid-template-columns: 1fr;
    }
    .th2-categories-block .th2-cat-card { min-height: 200px; }
}
