/* ==========================================================================
   Single Horse V3 — all rules scoped to .single-horse-v3
   Gallery slider rules migrated here from render_hero_gallery() inline block
   ========================================================================== */

/* ── CTA Buttons ──────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-btn-enquire,
.single-horse-v3 .mist-v3-btn-pedigree {
    display: block;
    max-width: 90vw;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s, color .2s, opacity .2s, box-shadow .2s;
}

.single-horse-v3 .mist-v3-btn-enquire:hover {
    box-shadow: 0 4px 14px rgba(37,99,235,.45);
}

/* ── Header & CTA layout ──────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-header-centered {
    text-align: center;
    margin-top: 32px;
}
.single-horse-v3 .mist-v3-cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 40px;
}
.single-horse-v3 .entry-title {
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    text-align: center;
}
.single-horse-v3 .wrapper-horse-news-custom {
    margin-top: 40px;
}

/* ── Content area ─────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-content {
    margin-top: 32px;
}

.single-horse-v3 .mist-v3-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    position: relative;
}

.single-horse-v3 .mist-v3-tabs-bar::after {
    border-top: 1px solid #d9d9d9;
    content: "";
    display: block;
    visibility: visible;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
}

.single-horse-v3 .mist-v3-tabs-bar .et_pb_tabs_controls {
    flex: 0 1 auto;
    background-color: transparent;
}

.single-horse-v3 .mist-v3-tabs-bar .et_pb_tabs_controls::after {
    display: none;
}

.single-horse-v3 .mist-v3-tab-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.single-horse-v3 .mist-v3-tab-action-item {
    float: left;
    border-right: 1px solid #d9d9d9;
    font-weight: 600;
    position: relative;
    cursor: pointer;
    max-width: 100%;
    display: table;
    z-index: 11;
    line-height: 1.7em;
}

.single-horse-v3 .mist-v3-tab-action-item:last-child {
    border-right: none;
}

.single-horse-v3 .mist-v3-btn-custom-link {
    text-decoration: none;
    color: #666;
    padding: 4px 30px;
    line-height: inherit;
    display: table-cell;
    font-weight: 600;
}

.single-horse-v3 .mist-v3-btn-custom-link:hover {
    color: #666;
    opacity: .7;
}

@media screen and (max-width: 767px) {
    .single-horse-v3 .mist-v3-tabs-bar,
    .single-horse-v3 .mist-v3-tab-actions {
        display: block;
        width: 100%;
    }

    .single-horse-v3 .mist-v3-tab-action-item {
        float: none;
        display: block;
        border-bottom: 1px solid #d9d9d9;
        border-right: none;
    }

    .single-horse-v3 .mist-v3-btn-custom-link {
        display: flex;
        justify-content: center;
        width: 100%;
        text-align: center;
    }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-section {
    padding: 36px 0;
    border-top: 2px solid #f0f2f5;
    margin-top: 4px;
}
.single-horse-v3 .mist-v3-section:first-child {
    border-top: none;
    padding-top: 24px;
}
.single-horse-v3 .mist-v3-section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: none;
    margin: 0 0 20px;
    padding: 0 0 0 14px;
    border-left: 3px solid var(--main-color, #3b82f6);
    line-height: 1.3;
}
.single-horse-v3 .mist-v3-section-body {
    font-size: 15px;
    line-height: 1.7;
}

/* ── Information grid ─────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}
.single-horse-v3 .mist-v3-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f2f5;
}
.single-horse-v3 .mist-v3-info-row:last-child {
    border-bottom: none;
}
.single-horse-v3 .mist-v3-info-key {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #b0bec5;
    min-width: 68px;
}
.single-horse-v3 .mist-v3-info-val {
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
    line-height: 1.4;
}

/* ── Career block ─────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-career {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #f0f2f5;
}
.single-horse-v3 .mist-v3-career-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.single-horse-v3 .mist-v3-career-key {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #b0bec5;
    min-width: 68px;
}
.single-horse-v3 .mist-v3-career-val {
    font-size: 14px;
    font-weight: 600;
}
.single-horse-v3 .mist-v3-career-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}
.single-horse-v3 .mist-v3-career-sub span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f6f8fb;
    border: 1px solid #eaecf0;
    border-radius: 999px;
    padding: 5px 14px;
    color: #64748b;
    font-weight: 500;
}
.single-horse-v3 .mist-v3-career-sub strong {
    font-weight: 700;
}

/* ── Incentives ───────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-incentives-inner {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #f0f2f5;
}
.single-horse-v3 .mist-v3-incentives-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #b0bec5;
    margin-bottom: 10px;
}
.single-horse-v3 .mist-v3-incentives-block {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.single-horse-v3 .incentives-content {
    display: block;
    width: 100%;
}
.single-horse-v3 .incentives-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.single-horse-v3 .incentive-icon {
    width: auto;
    height: 36px;
    max-width: 50%;
    object-fit: contain;
}

/* ── Media tab ────────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-section--media .content-tab-horse-videos .content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.single-horse-v3 .mist-v3-section--media .content-tab-horse-videos .video-item {
    width: 100%;
    margin-bottom: 0;
}
.single-horse-v3 .mist-v3-section--media .content-tab-horse-videos .video-item video,
.single-horse-v3 .mist-v3-section--media .content-tab-horse-videos .video-item iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    border-radius: 8px;
}

/* ── Pedigree tab ─────────────────────────────────────────────────────────── */
.single-horse-v3 .mist-v3-section--pedigree .mist-v3-section-body {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.single-horse-v3 .mist-v3-section--pedigree .mist-v3-section-body::-webkit-scrollbar { width: 5px; height: 5px; }
.single-horse-v3 .mist-v3-section--pedigree .mist-v3-section-body::-webkit-scrollbar-track { background: transparent; }
.single-horse-v3 .mist-v3-section--pedigree .mist-v3-section-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.single-horse-v3 .mist-v3-section--pedigree .mist-v3-section-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Profile Stats Bar ────────────────────────────────────────────────────── */
.single-horse-v3 .mist-profile-stats {
    display: flex;
    align-items: stretch;
    justify-content: center;
    border-radius: 16px;
    margin: 0 0 32px;
    overflow: hidden;
}
.single-horse-v3 .mist-stat-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    text-align: center;
    min-width: 0;
    transition: background .25s ease;
}
.single-horse-v3 .mist-stat-col:hover {
    background: rgba(255, 255, 255, 0.04);
}
.single-horse-v3 .mist-stats-divider {
    width: 1px;
    margin: 20px 0;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.14) 30%, rgba(255,255,255,.14) 70%, transparent);
    flex-shrink: 0;
    align-self: stretch;
}
.single-horse-v3 .mist-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    color: rgba(200, 220, 255, 0.85);
    transition: background .25s ease, box-shadow .25s ease, transform .2s ease;
}
.single-horse-v3 .mist-stat-col:hover .mist-stat-icon {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}
.single-horse-v3 .mist-stat-icon svg { width: 20px; height: 20px; flex-shrink: 0; }
.single-horse-v3 .mist-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(140, 175, 230, 0.65);
    margin-bottom: 6px;
}
.single-horse-v3 .mist-stat-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    color: rgba(235, 242, 255, 0.95);
    word-break: break-word;
    line-height: 1.4;
}

/* ── Hero Gallery (migrated from inline render_hero_gallery style block) ──── */
.single-horse-v3 .mist-v3-hero-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.single-horse-v3 .mistable-hero-gallery {
    width: 100%;
    order: 1;
    max-width: 800px;
    margin: 0 auto 24px auto;
}
.single-horse-v3 #mist-main-slider {
    overflow: hidden;
}
.single-horse-v3 .mist-gallery-main-item {
    position: relative;
    height: 480px;
    background: #0a1628;
    border-radius: 12px;
    overflow: hidden;
}
.single-horse-v3 .mist-gallery-main-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.single-horse-v3 .mist-video-wrapper {
    width: 100%;
    height: 100%;
}
.single-horse-v3 .mist-video-wrapper iframe,
.single-horse-v3 .mist-video-wrapper .wp-video,
.single-horse-v3 .mist-video-wrapper video {
    width: 100% !important;
    height: 100% !important;
    border: none;
    object-fit: cover;
}
.single-horse-v3 .mist-video-wrapper .mejs-container,
.single-horse-v3 .mist-video-wrapper .mejs-inner {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
}
.single-horse-v3 .mist-gallery-main-item.mist-gallery-main-video { height: 480px; }

.single-horse-v3 .mist-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 36px 36px;
    background: linear-gradient(to top, rgba(4, 14, 40, .92) 0%, rgba(4, 14, 40, .55) 55%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .35s ease, transform .35s ease;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
    z-index: 2;
}
.single-horse-v3 .mist-gallery-main-item:hover .mist-gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}
.single-horse-v3 .mist-overlay-body {
    flex: 0 0 70%;
    min-width: 0;
}
.single-horse-v3 .mist-gallery-overlay h2 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6), 0 0 40px rgba(0, 0, 0, .4);
    margin: 0 0 10px;
}
.single-horse-v3 .mist-gallery-overlay .mist-sub-info,
.single-horse-v3 .mist-gallery-overlay .mist-price-info {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, .95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
    letter-spacing: .01em;
    display: block;
    border-top: 1px solid rgba(255, 255, 255, .25);
    padding-top: 8px;
    margin-top: 4px;
}
.single-horse-v3 .mist-gallery-overlay .mist-price-info {
    font-size: 22px;
    font-weight: 700;
    border-top: none;
    padding-top: 0;
    margin-top: 6px;
    color: #fff;
}
.single-horse-v3 .mist-gallery-overlay .mist-sub-info + .mist-price-info {
    padding-top: 8px;
    margin-top: 4px;
}
.single-horse-v3 .mist-overlay-logo-col {
    flex: 0 0 30%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-width: 0;
}

.single-horse-v3 #mist-main-slider .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
}
.single-horse-v3 #mist-main-slider .owl-nav button {
    pointer-events: auto;
    background: rgba(255, 255, 255, .25) !important;
    color: #fff !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.single-horse-v3 #mist-main-slider .owl-nav button:hover {
    background: rgba(0, 0, 0, .55) !important;
}
.single-horse-v3 #mist-main-slider .owl-dots { display: none; }
.single-horse-v3 #mist-thumb-slider { margin-top: 12px; }
.single-horse-v3 #mist-thumb-slider .owl-nav,
.single-horse-v3 #mist-thumb-slider .owl-dots { display: none; }

.single-horse-v3 .mist-gallery-thumb-item {
    position: relative;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}
.single-horse-v3 .mist-gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
    transition: opacity .2s;
    display: block;
}
.single-horse-v3 #mist-thumb-slider .owl-item.current .mist-gallery-thumb-item img,
.single-horse-v3 .mist-gallery-thumb-item:hover img { opacity: 1; }

.single-horse-v3 .mist-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .5);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    pointer-events: none;
    z-index: 10;
}
.single-horse-v3 .mist-thumb-video-content {
    width: 100%;
    height: 100%;
    opacity: .6;
    transition: opacity .2s;
    pointer-events: none;
    overflow: hidden;
}
.single-horse-v3 .mist-thumb-video-content video::-webkit-media-controls,
.single-horse-v3 .mist-thumb-video-content video::-webkit-media-controls-enclosure { display: none !important; }
.single-horse-v3 .mist-thumb-video-content .mejs-controls,
.single-horse-v3 .mist-thumb-video-content .mejs-layers,
.single-horse-v3 .mist-thumb-video-content .mejs-error,
.single-horse-v3 .mist-thumb-video-content .mejs-captions-button,
.single-horse-v3 .mist-thumb-video-content .mejs-overlay-loading,
.single-horse-v3 .mist-thumb-video-content .mejs-overlay-play,
.single-horse-v3 .mist-thumb-video-content .mejs-overlay-button,
.single-horse-v3 .mist-thumb-video-content .mejs-time-rail,
.single-horse-v3 .mist-thumb-video-content .mejs-playpause-button { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.single-horse-v3 .mist-thumb-video-content .mejs-container { background: transparent !important; border: none !important; }
.single-horse-v3 .mist-gallery-thumb-item:hover .mist-thumb-video-content,
.single-horse-v3 #mist-thumb-slider .owl-item.current .mist-thumb-video-content { opacity: 1; }
.single-horse-v3 .mist-thumb-video-content iframe,
.single-horse-v3 .mist-thumb-video-content .wp-video,
.single-horse-v3 .mist-thumb-video-content video,
.single-horse-v3 .mist-thumb-video-content .mejs-container { width: 100% !important; height: 100% !important; border: none; object-fit: cover; min-width: 0 !important; }
.single-horse-v3 .mist-thumb-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    background: transparent;
}

.single-horse-v3 .mist-hero-logo {
    display: block;
    order: 0;
    max-height: 80px;
    width: auto;
    max-width: 260px;
    margin-bottom: 16px;
    opacity: 1;
}

.single-horse-v3 .mist-overlay-logo {
    display: block;
    max-width: 100%;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.single-horse-v3 .mist-v3-header-centered .price {
    font-weight: 700;
    margin-top: 5px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .single-horse-v3 .mist-profile-stats {
        flex-wrap: wrap;
        border-radius: 14px;
    }
    .single-horse-v3 .mist-stat-col { flex: 0 0 50%; padding: 20px 12px; }
    .single-horse-v3 .mist-stats-divider { display: none; }

    .single-horse-v3 .mist-gallery-main-item,
    .single-horse-v3 .mist-gallery-main-item.mist-gallery-main-video {
        height: auto;
        max-height: 56.25vw;
        aspect-ratio: 16/9;
    }
    .single-horse-v3 .mist-gallery-main-item img {
        width: 100%;
        height: auto;
        max-height: 56.25vw;
        object-fit: cover;
    }
    .single-horse-v3 #mist-main-slider .owl-item,
    .single-horse-v3 #mist-thumb-slider .owl-item {
        overflow: hidden;
        min-height: 0;
    }
    .single-horse-v3 .mist-gallery-overlay {
        padding: 18px 18px 14px;
        flex-direction: row;
        align-items: flex-end;
        gap: 12px;
        opacity: 0;
        transform: translateY(10px);
    }
    .single-horse-v3 .mist-overlay-body { flex: 1 1 auto; min-width: 0; }
    .single-horse-v3 .mist-overlay-logo-col {
        flex: 0 0 110px;
        max-width: 110px;
        align-items: flex-end;
        justify-content: flex-end;
        min-width: 0;
    }
    .single-horse-v3 .mist-gallery-overlay h2 { font-size: 22px; line-height: 1.1; margin: 0 0 6px; }
    .single-horse-v3 .mist-hero-logo {
        position: static;
        top: auto;
        right: auto;
        height: 24px;
        width: auto;
        max-width: 220px;
        margin: 0 auto 12px;
    }
    .single-horse-v3 .mist-overlay-logo { max-height: 48px; max-width: 90px; width: 90px; }

    .single-horse-v3 .mist-gallery-overlay .mist-sub-info,
    .single-horse-v3 .mist-gallery-overlay .mist-price-info {
        font-size: 16px;
        margin-top: 2px;
        padding-top: 6px;
    }
    .single-horse-v3 .mist-gallery-thumb-item {
        height: auto;
        max-height: 56.25vw;
        aspect-ratio: 16/9;
    }
    .single-horse-v3 .mist-gallery-thumb-item img {
        height: auto;
        max-height: 56.25vw;
    }

    .single-horse-v3 .mist-gallery-main-item:hover .mist-gallery-overlay {
        opacity: 0;
        transform: translateY(10px);
    }

    .single-horse-v3 #mist-main-slider .owl-item.active .mist-gallery-overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .single-horse-v3 .mist-v3-info-grid { grid-template-columns: 1fr; }
    .single-horse-v3 .mist-v3-info-row:last-child { border-bottom: none; }
}
