/* fitness-videos.css - Ads Showcase Style */

:root {
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.fitness-section {
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: var(--color-bg);
}

.fitness-grid {
    display: grid;
    gap: var(--spacing-xl);
    grid-template-columns: 1fr;
    margin-bottom: var(--spacing-2xl);
}

@media (min-width: 640px) {
    .fitness-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fitness-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ad Card UI */
.ad-card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ad-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.ad-poster-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    /* Portrait like Reels */
    overflow: hidden;
    background: #0f172a;
}

.card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ad-card:hover .card-poster {
    transform: scale(1.05);
}

.ad-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.duration-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 5;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 4;
}

.ad-card:hover .play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-card:hover .play-icon {
    transform: scale(1.1);
}

/* Bottom Content Overlay */
.card-ad-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    color: white;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-caption {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-cta-btn {
    margin-top: 10px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-cta-btn:hover {
    background: #d97706;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.cta-container {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* Modal UI - Viewport Optimized */
.vkf-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
}

.vkf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .75);
}

.vkf-modal-panel {
    position: relative;
    width: min(980px, 94vw);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: #0b0b0b;
    z-index: 10;
}

.vkf-modal-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .55);
}

.vkf-close {
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    color: #fff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vkf-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vkf-video-wrap {
    flex: 1 1 auto;
    min-height: 0;
    /* CRITICAL: allows flex child to shrink and prevents cropping */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
    padding: 10px;
}

.vkf-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* ensures no top/bottom crop */
    background: #000;
    border-radius: 12px;
}

.vkf-modal-footer {
    flex: 0 0 auto;
    padding: 16px 18px 18px;
    background: #111;
    color: #fff;
}

.vkf-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.vkf-caption {
    margin: 0 0 14px;
    color: #cbd5e1;
    line-height: 1.5;
}

.vkf-cta {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    color: #fff;
    transition: transform 0.2s;
}

.vkf-cta:hover {
    transform: scale(1.05);
}

.vkf-mute-toggle {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    border: 0;
    border-radius: 999px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

.vkf-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vkf-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.vkf-prev {
    left: 10px;
}

.vkf-next {
    right: 10px;
}

@media (max-width: 640px) {
    .vkf-modal-panel {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Promo Banner Modal - Exact Mockup Style */
.vkf-promo-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vkf-promo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
}

.vkf-promo-panel {
    position: relative;
    width: min(980px, 94vw);
    max-height: 92vh;
    background: #0b0b0b;
    border-radius: 18px;
    overflow: auto;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* subtle border */
}

/* Close button (top right corner) */
.vkf-promo-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    color: #fff;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vkf-promo-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vkf-promo-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 16px;
}

.vkf-promo-media {
    position: relative;
    width: 240px;
    /* fixed width like target mockup */
    max-width: 70vw;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    cursor: pointer;
}

.vkf-promo-poster {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Perfect play button centering */
.vkf-promo-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    border-radius: 999px;
    border: 0;
    background: rgba(25, 197, 181, 0.95);
    /* EXACT Teal from mockup */
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.vkf-promo-play:hover {
    background: #19c5b5;
    transform: translate(-50%, -50%) scale(1.1);
}

.vkf-promo-content {
    width: min(860px, 100%);
    text-align: left;
    color: white;
}

.vkf-promo-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(25, 197, 181, 0.12);
    color: #19c5b5;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.vkf-promo-title {
    margin: 0 0 6px;
    line-height: 1.15;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #19c5b5;
    /* Target Teal */
}

.vkf-promo-caption {
    margin: 0 0 14px;
    opacity: 0.9;
    line-height: 1.5;
    font-size: 1rem;
    color: #9fb2c0;
}

.vkf-promo-cta {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f5a623;
    /* Target Orange */
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vkf-promo-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 166, 35, 0.3);
}

.vkf-promo-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vkf-promo-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9fb2c0;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.vkf-promo-close-link {
    background: transparent;
    border: 0;
    color: #9fb2c0;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px;
}

.vkf-promo-close-link:hover {
    color: #fff;
}

@media (max-width: 480px) {
    .vkf-promo-body {
        padding: 24px 18px 16px;
    }

    .vkf-promo-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}