/*
 * ═══════════════════════════════════════════════════════════════════════════════
 * Lavisa Destinations Theme — SERVICE CARDS POLISH (3.1.18)
 * ═══════════════════════════════════════════════════════════════════════════════
 *
 * @file        assets/css/ldt-enhanced-service-cards-polish.css
 * @package     Lavisa_Destinations_Theme
 * @since       3.1.18
 * @depends     ALL prior enhanced CSS (loads after popups-polish at end)
 *
 * Targets the "Book {city} with Lavisa" service cards on a single
 * destination page (sections/single/section-services.php — Flights /
 * Hotels / Cars / Tours / Packages / Cruises / Transfers / Insurance /
 * Visa / Activities — each card with its own service color, icon, and
 * Book Now CTA + optional WhatsApp ask button).
 *
 * Bug user reported (3.1.17 screenshot): cards rendered horizontally
 * `[icon | body | actions]` inside a 2-column grid. With the WhatsApp
 * button forcing the actions column ~140px wide, body column gets
 * squeezed to ~50px on a typical 720px content area. Every word wraps
 * to its own line; the Book Now button overlaps the price. Unreadable
 * and unusable.
 *
 *   .ldt-services__grid { grid-template-columns: repeat(2, 1fr); }
 *   .ldt-service-card { display: flex; align-items: center; ... }
 *
 * Math: 350px card - 48px padding - 52px icon - 32px gap - 140px actions
 *       = 78px for body. Less when content is wider.
 *
 * Fix: switch the card to VERTICAL layout. Icon as small badge at top-
 * left, body full-width below, actions full-width at bottom (Book Now
 * + WhatsApp side-by-side at this width). No more squeezed body.
 *
 * Pure CSS override via cascade specificity using `body` prefix. The
 * partial's inline <style> is untouched (the partial stays byte-
 * identical to baseline).
 *
 * ═══════════════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════════════
 * 1. CARD CONTAINER — vertical layout instead of horizontal
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 22px 22px 20px !important;
    background: #ffffff !important;
    border: 1px solid var(--ldt-gray-200, #e5e7eb) !important;
    border-radius: 1rem !important;
    transition:
        box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 320ms cubic-bezier(0.22, 1, 0.36, 1) !important;
    position: relative;
    overflow: hidden;
}

/* Subtle accent stripe on the leading edge — uses the per-service color
 * via the data-attribute selector. Falls back to brand blue otherwise. */
body .ldt-service-card::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: 3px;
    background: var(--ldt-primary, #003580);
    opacity: 0.45;
    transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-service-card:hover {
        transform: translateY(-3px) !important;
        box-shadow:
            0 14px 30px rgba(0, 53, 128, 0.16),
            0 4px 8px rgba(0, 0, 0, 0.06) !important;
        border-color: rgba(0, 53, 128, 0.18) !important;
    }
    body .ldt-service-card:hover::after {
        opacity: 1;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 2. ICON — small badge at the top-left, brand-tinted background
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card__icon-wrap {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    flex-shrink: 0;
    align-self: flex-start;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

body .ldt-service-card__icon {
    font-size: 1.4rem !important;
    line-height: 1 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 3. BODY — full width (the actual fix for the wrapping bug)
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card__body {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
}

body .ldt-service-card__name {
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.015em !important;
    color: var(--ldt-dark, #1e293b) !important;
    margin: 0 0 6px !important;
}

body .ldt-service-card__desc {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    color: var(--ldt-gray-600, #6b7280) !important;
    margin: 0 0 10px !important;
    /* Allow natural wrapping — the bug was that body width was tiny.
     * With vertical layout body has full width, words flow normally. */
    word-break: normal !important;
    overflow-wrap: break-word;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 4. PRICE ROW — clean alignment
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card__price {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    margin: 8px 0 0 !important;
    flex-wrap: wrap;
}

body .ldt-service-card__price-from {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--ldt-gray-500, #94a3b8) !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body .ldt-service-card__price-amount {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em !important;
    /* color is set inline by PHP from $s_color — preserve it */
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 5. ACTIONS — full-width row at bottom of card
 *    Book Now + WhatsApp side-by-side when there's room, stack when narrow.
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card__actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: auto !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 6. CTA BUTTON — full-width primary, hover lift, polished
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card__cta {
    flex: 1 1 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 11px 18px !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    letter-spacing: -0.005em !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.10),
        0 0 0 1px rgba(255, 255, 255, 0.18) inset !important;
    transition:
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 320ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-service-card__cta:hover {
        transform: translateY(-1px);
        box-shadow:
            0 8px 20px rgba(0, 0, 0, 0.18),
            0 0 0 1px rgba(255, 255, 255, 0.30) inset !important;
        filter: brightness(1.06);
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 7. WHATSAPP secondary button — keeps brand green but compact
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card__whatsapp {
    flex: 0 1 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 11px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #128c7e !important;
    background: #e7f8f2 !important;
    border: 1px solid rgba(37, 211, 102, 0.25) !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition:
        background 220ms cubic-bezier(0.22, 1, 0.36, 1),
        color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (hover: hover) and (pointer: fine) {
    body .ldt-service-card__whatsapp:hover {
        background: #25d366 !important;
        color: #ffffff !important;
        border-color: #25d366 !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.40);
    }
}

body .ldt-service-card__whatsapp-icon {
    font-size: 13.5px !important;
    line-height: 1 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 8. FEATURED variant — accent border preserved, ribbon repositioned
 * ═══════════════════════════════════════════════════════════════════════════════ */

body .ldt-service-card--featured {
    border: 2px solid var(--ldt-accent, #ff8c00) !important;
}

body .ldt-service-card--featured::before {
    top: -10px !important;
    inset-inline-end: 16px !important;
    inset-inline-start: auto !important;
    background: linear-gradient(135deg, #ff9d1a 0%, #ff8c00 100%) !important;
    color: #ffffff !important;
    font-size: 10px !important;
    padding: 2px 10px !important;
    border-radius: 9999px !important;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.40);
    font-weight: 800;
    letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 9. GRID — keep 2 columns on desktop, but allow 3 on very wide screens
 * ═══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
    body .ldt-services__grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 10. NARROW CARDS — when the card itself is narrow, stack actions vertically
 *     This catches both the mobile case AND the case where the content area
 *     is tight (e.g. when a sidebar is present).
 * ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    body .ldt-service-card__actions {
        flex-direction: column !important;
    }

    body .ldt-service-card__cta,
    body .ldt-service-card__whatsapp {
        width: 100% !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
 * 11. REDUCED MOTION
 * ═══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    body .ldt-service-card,
    body .ldt-service-card::after,
    body .ldt-service-card__cta,
    body .ldt-service-card__whatsapp {
        transition: none !important;
    }

    body .ldt-service-card:hover,
    body .ldt-service-card__cta:hover,
    body .ldt-service-card__whatsapp:hover {
        transform: none !important;
    }
}


/* ─── END OF ldt-enhanced-service-cards-polish.css ────────────────────────── */
