﻿/* ============================================================================
   Trang Audio (/pages/audio.html) va Podcast (/pages/podcast.html)
   Bo cuc soi theo https://danang.gov.vn/web/dng/podcasts :
   khoi trinh phat o tren, ben duoi la luoi the co anh dai dien.

   File nay duoc <link> ngay trong 2 view do nen nap sau cung, sua thang duoc
   (giong VideoStyle.css / GalleryStyle.css) - xem ghi chu css-moi-frontend-dat-o-dau.
   ============================================================================ */

/* Inter dam that: TCNNTrangchu.scss chi khai Inter-Regular nen font-weight 600/700
   la chu dam GIA. Duong dan tuyet doi vi file css nay nam o /Assets/custom/css/. */
@font-face {
    font-family: 'Inter';
    src: url('/GiaoDien/public/Font/Inter/Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/GiaoDien/public/Font/Inter/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

#audio {
    width: 1330px;
    max-width: 100%;
    margin: 0 auto;
}

    #audio .section-issue__header {
        margin: 34px 0 18px;
    }

/* ---------------------------------------------------------------- */
/* 1. Khoi dang phat                                                 */
/* ---------------------------------------------------------------- */
.audio-now {
    display: flex;
    align-items: stretch;
    gap: 24px;
    background: linear-gradient(135deg, #fdf2f2 0%, #f7f8fa 100%);
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 30px;
}

.audio-now__img {
    position: relative;
    flex: 0 0 260px;
    width: 260px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #e9ecef;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

    .audio-now__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.audio-now__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.audio-now__nhan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 12px;
}

.audio-now__title {
    font-family: 'Inter', 'RobotoB', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.audio-now__desc {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    text-align: justify;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------------------------------------------------------------- */
/* 2. Luoi the                                                       */
/* ---------------------------------------------------------------- */
.audio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px 20px;
    margin-bottom: 30px;
}

.audio-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

    .audio-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
        border-color: #e0e0e0;
    }

    /* The dang phat: vien do cho de nhan */
    .audio-card.dang-phat {
        border-color: #e53935;
        box-shadow: 0 6px 18px rgba(229, 57, 53, 0.22);
    }

.audio-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9ecef;
}

    .audio-card__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.45s ease;
    }

.audio-card:hover .audio-card__img img {
    transform: scale(1.06);
}

/* Nut phat ve bang CSS - khong dung file anh nen khoi lo duong dan tuong doi */
.audio-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    transition: 0.25s all ease-in-out;
    z-index: 2;
}

    .audio-card__play:after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -9px 0 0 -5px;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 9px 0 9px 15px;
        border-color: transparent transparent transparent #fff;
    }

.audio-card:hover .audio-card__play,
.audio-card.dang-phat .audio-card__play {
    background: #e53935;
    border-color: #fff;
}

.audio-card__body {
    padding: 14px 16px 16px;
}

.audio-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Inter', 'RobotoR', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #111;
    min-height: 4.5em;
    margin: 0;
}

.audio-card:hover .audio-card__title {
    color: #e53935;
}

.audio-card__date {
    margin-top: 8px;
    font-size: 13px;
    color: #76787a;
}

.audio-khongco {
    padding: 40px 0;
    text-align: center;
    color: #777;
    font-size: 16px;
}

/* ---------------------------------------------------------------- */
/* 3. Man hep                                                        */
/* ---------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .audio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {
    .audio-now {
        flex-direction: column;
    }

    .audio-now__img {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .audio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #audio .section-issue__header {
        margin-top: 18px;
    }
}

@media (max-width: 575.98px) {
    .audio-grid {
        grid-template-columns: 1fr;
    }

    .audio-now {
        padding: 16px;
    }
}

/* Trinh phat: dung thang the <audio> cua trinh duyet (khong con jPlayer).
   Khong to mau duoc ben trong the nay - moi trinh duyet ve mot kieu - nen chi
   chinh be rong, chieu cao va khung bao quanh. */
.audio-now__player {
    width: 100%;
    height: 44px;
    margin-top: auto;
    display: block;
    outline: none;
}

    .audio-now__player::-webkit-media-controls-panel {
        background-color: #fff;
    }

/* Luot nghe + nut tai xuong */
.audio-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 12px;
}

.audio-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #76787a;
}

    .audio-meta__item b {
        color: #111;
        font-weight: 600;
    }

.audio-meta__tai {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e53935;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    padding: 7px 18px;
    text-decoration: none;
    transition: all 0.25s ease;
}

    .audio-meta__tai:hover {
        background: #c62828;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    }

.audio-card__date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.audio-card__views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
/* Nut phat trong khoi "Dang phat".
   .audio-card__play dinh vi tuyet doi theo the cha - .audio-now__img da co
   position: relative nen dung lai duoc nguyen xi, chi can to do va dua len
   tren anh (anh khong co position nen mac dinh nam duoi). */
.audio-now__img .audio-card__play {
    background: #e53935;
    border-color: #fff;
    z-index: 3;
}

/* Bai chua co anh: o van la khoi xam co nut phat o giua, khong trong tron */
.audio-now__img img[hidden] {
    display: none !important;
}