/* CV Player detail page (matched to Figma) */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Instrument Sans', sans-serif;
    background: #f9faf7 !important;
    color: #212121 !important;
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
}

.content {
    max-width: 1069px;
    margin: 0 auto;
    padding: 12.5px 26px 80px;
    display: flex;
    flex-direction: column;
    gap: 42px;
}

.hero-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    width: 100%;
    margin: 80px auto 0;
}

.back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    text-decoration: none;
    padding: 8px;
    background-color: #ECECEC;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.back-arrow:hover {
    background-color: #D8D8D8;
}

.back-arrow img {
    width: 16px;
    height: 16px;
    display: block;
}

.hero-media {
    width: 100%;
    border: 1px solid #E3E3E3;
    border-radius: 12px;
    padding: 4px;
    touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but handle horizontal swipes */
    -webkit-user-select: none;
    user-select: none;
}

.media-carousel {
    position: relative;
    width: 100%;
    height: 396px;
    border-radius: 8px;
    overflow: hidden;
    touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but handle horizontal swipes */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.carousel-item:first-child {
    opacity: 1;
    z-index: 1;
}

.hero-image,
.hero-video,
.hero-iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: none; /* Hidden for testing video load speed */
}

.carousel-item .hero-video {
    position: relative;
    z-index: 1;
}

.hero-iframe {
    border: none;
    background: #fff;
}

.hero-video {
    background: #000;
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.indicator-dot.active {
    background-color: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

.hero-details {
    display: flex;
    flex-direction: column;
    gap: 42px;
}

.hero-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 600px;
}

.hero-title {
    font-weight: 600;
    font-size: 18px;
    color: #212121;
}

.hero-desc {
    font-weight: 400;
    font-size: 12px;
    color: #000;
    max-width: 600px;
    line-height: 1.4;
}

.chip-button {
    background: #000;
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.chip-button:hover {
    background-color: #333;
}

.info-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    align-items: stretch;
}

.info-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.info-divider {
    width: 1px;
    background: #E3E3E3;
    flex: 0 0 1px;
    align-self: stretch;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #000;
}

.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.info-text {
    font-size: 14px;
}

.explore {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.explore-title {
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -0.36px;
    color: #212121;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.explore-card {
    border: 1px solid #c2c2c2;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.explore-image {
    border-radius: 8px;
    overflow: hidden;
    height: 244px;
    position: relative;
}

.explore-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.explore-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.explore-name {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
}

.explore-tags {
    display: flex;
    gap: 10px;
}

.tag-icon {
    background: #eaeaea;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
}

.tag-icon img {
    max-width: 24px;
    max-height: 24px;
}

@media (max-width: 768px) {
    .content {
        padding: 16px 26px 80px;
    }
    
    .media-carousel {
        height: 336px;
    }
    
    .hero-image,
    .hero-video,
    .hero-iframe {
        height: 336px;
    }
    
    .explore-grid { grid-template-columns: 1fr; }
    .hero-body { align-items: flex-start; }

    .chip-button {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .info-row {
        flex-direction: column;
        gap: 0;
    }
    
    .info-divider {
        width: 100%;
        height: 1px;
        margin: 16px 0;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 16px 26px 80px;
    }
    
    .hero-desc { font-size: 12px; }
    .explore-title { font-size: 28px; }
}

.footer-transition {
    width: 100%;
    height: 43px;
    background-color: #f9faf7;
    border-radius: 0 0 16px 16px;
}
