/* =============================================================================
   AYAL TOURS AND TRAVEL — SAFARI CARDS (GLOBAL)
   Used on: Homepage, Destination pages, Safari archive, Related safaris
   Built by Vanquish Brand Design | vanquish.co.ke

   Markup is rendered by ayal_safari_card_markup() in functions.php — this
   file styles that fixed structure only, it does not add new elements.
   100% token-driven: every colour/font traces to var(--ayal-*)/var(--font-*).
   ============================================================================= */

.ayal-safari-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    margin-bottom: var(--space-48);
}

.ayal-safari-card {
    background: var(--ayal-white);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ayal-safari-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Card image — tall editorial crop, no rounded corners (sharp/architectural
   per the A&K-direct direction) */
.ayal-safari-card__image {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--ayal-ivory-2);
}

.ayal-safari-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slower) var(--ease);
    display: block;
}

.ayal-safari-card:hover .ayal-safari-card__image img {
    transform: scale(1.05);
}

/* Days badge — circular "seal", set into the bottom-right corner of the image */
.ayal-safari-card__badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ayal-green);
    color: var(--ayal-ivory);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: var(--shadow-lg);
}

.ayal-safari-card__badge-days {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: var(--weight-regular);
}

.ayal-safari-card__badge-label {
    font-family: var(--font-body);
    font-size: 8px;
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.82;
}

/* Card content — 4 Sep 2026: was padding-top only, leaving the dests line,
   title, excerpt and footer flush against the card's left/right/bottom
   edges with no breathing room. Sibling card components elsewhere on the
   site (.ayal-destinations__card-content, .ayal-vehicle-card__content)
   both pad on every side; this now matches that convention. */
.ayal-safari-card__content {
    padding: var(--space-24);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ayal-safari-card__dests {
    font-family: var(--font-body);
    /* 4 Sep 2026: dropped from the shared --text-micro (11px) to 10px per
       Victor, scoped to this element rather than the token itself since
       --text-micro is reused all over the site (badges, eyebrows, meta
       text on several other templates). */
    font-size: 10px;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--ayal-charcoal-3);
    margin-bottom: var(--space-8);
}

.ayal-safari-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: var(--weight-regular);
    color: var(--ayal-charcoal);
    margin-bottom: var(--space-12);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
}

.ayal-safari-card__excerpt {
    font-size: var(--text-body-sm);
    line-height: var(--leading-relaxed);
    color: var(--ayal-charcoal-2);
    flex-grow: 1;
    margin-bottom: var(--space-20);
}

/* Card footer */
.ayal-safari-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-16);
    border-top: 1px solid var(--ayal-border);
    margin-top: auto;
}

.ayal-safari-card__price-label {
    font-family: var(--font-body);
    font-size: var(--text-micro);
    color: var(--ayal-charcoal-3);
    display: block;
}

.ayal-safari-card__price-amount {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: var(--weight-regular);
    color: var(--ayal-charcoal);
    line-height: 1;
    display: block;
    margin-top: 2px;
}

/* View Safari button — 4 Sep 2026: rebuilt from a bare text link into a
   bordered box per Victor's ATE reference (image: outlined "VIEW SAFARI"
   button on their safari cards), filling solid brand green on hover —
   just without ATE's pill/rounded shape, since every other button on the
   site commits to sharp corners as a deliberate identity choice. Scoped to
   this card footer only — .ayal-btn--text elsewhere on the site (Vehicles,
   Destinations, Safaris archive intro, etc.) keeps its plain underline-
   arrow text-link look; nothing else changes. */
.ayal-safari-card__footer .ayal-btn--text {
    color: var(--ayal-green);
    font-size: var(--text-micro);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    background: transparent;
    border: 1.5px solid var(--ayal-green);
    padding: 9px 16px;
    text-decoration: none;
    transition:
        background-color var(--duration-base) var(--ease),
        color             var(--duration-base) var(--ease),
        border-color      var(--duration-base) var(--ease);
}

.ayal-safari-card__footer .ayal-btn--text:hover {
    background-color: var(--ayal-green);
    color: var(--ayal-white);
    border-color: var(--ayal-green);
}

/* Grid CTA */
.ayal-safari-grid__cta {
    text-align: center;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1023px) {
    .ayal-safari-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .ayal-safari-grid {
        grid-template-columns: 1fr;
    }

    .ayal-safari-card__badge {
        width: 48px;
        height: 48px;
    }
}
