﻿/* ====== Layout base ====== */
.videoTrailerBackground {
    position: relative;
    width: 100%;
    height: 52vw;
    max-height: 560px;
    overflow: hidden;
    background: #000;
}

.videoPlayer, .yt-bg-holder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-Overlay {
    position: relative;
    margin-top: -560px;
    height: 0;
}

.video-page {
    background: #0a0a0a;
    padding-top: 8rem!important; /* spinge il contenuto in basso */
}

/* Overlay wrapper */
.video-hero-overlay {
    position: relative;
    z-index: 2;
    padding-top: 48px;
    padding-bottom: 40px;
    background: linear-gradient(180deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.85) 55%, rgba(0,0,0,1) 100%);
}

@media (max-width: 992px) {
    .video-hero-overlay {
        padding-top: 36px;
    }
}

/* Titolo + meta */
.video-title-wrap .kicker {
    color: #bdb7ff;
    font-weight: 600;
    margin-bottom: .25rem;
}

.video-title {
    color: #fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    margin: 0 0 .5rem 0;
}

.video-sub {
    color: rgba(255,255,255,.75);
    max-width: 60ch;
    margin: 0 0 1rem 0;
}

.video-meta-groups {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}

.meta-chip {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    padding: .35rem .7rem;
}

    .meta-chip .meta-label {
        color: rgba(255,255,255,.65);
        font-size: .85rem;
    }

    .meta-chip .meta-value {
        color: #fff;
        font-weight: 700;
    }

    .meta-chip.flags img {
        height: 18px;
        width: auto;
        border-radius: 2px;
        margin-left: .35rem;
    }

/* Aside card */
.card-dark {
    background: rgba(20,20,20,.85);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    backdrop-filter: blur(6px);
}

.video-aside {
    color: #fff;
}

    .video-aside .aside-head .teacher {
        font-weight: 700;
        margin-bottom: .35rem;
    }

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}

.pill {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: .25rem .6rem;
    font-size: .8rem;
    color: rgba(255,255,255,.85);
}

.aside-desc {
    color: rgba(255,255,255,.75);
    margin: 0 0 .75rem 0;
}

.aside-cta .btn {
    width: 100%;
}

.aside-foot {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: .6rem;
    margin-top: .6rem;
}

.text-dim {
    color: rgba(255,255,255,.6);
}

/* Player frame */
.video-player-frame {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

/* About block */
.about-block {
    margin-top: 24px;
}

.section-title {
    color: #fff;
    font-size: 1.25rem;
    margin: 0 0 .75rem;
}

.about-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: start;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 10px;
}

.about-text h4 {
    color: #fff;
    margin: 0 0 .35rem;
}

.about-text p {
    color: rgba(255,255,255,.8);
}

/* Sidebar: altre card */
.widget-sidebar-box.card-dark {
    position: sticky;
    top: 90px;
}

.popular-post-box + .popular-post-box {
    margin-top: 12px;
}

.popular-post-thumb img {
    width: 100px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.popular-post-content {
    margin-left: 10px;
}

    .popular-post-content .courseName {
        color: #fff;
        text-decoration: none;
        display: block;
        line-height: 1.2;
    }

        .popular-post-content .courseName:hover {
            text-decoration: underline;
        }

    .popular-post-content .type {
        color: rgba(255,255,255,.6);
        font-size: .85rem;
        margin-top: .25rem;
    }

/* Bottoni */
.btn-primary {
    background: #7c3aed;
    border: none;
}

    .btn-primary:hover {
        filter: brightness(1.06);
        box-shadow: 0 10px 26px rgba(124,58,237,.45);
    }

.btn-xl {
    padding: .85rem 1.25rem;
    font-weight: 700;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Utilities */
.text-primary-50 {
    color: #a58eff;
}

/* ===== Video Card Right Column ===== */
.video-hero-card .instructor-name {
    color: #b0b0b0; /* più scuro */
    font-weight: 500;
    font-size: 0.85rem; /* leggermente più piccolo */
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.video-hero-card .course-title {
    font-size: 1.75rem; /* +1pt rispetto a prima */
    font-weight: 600; /* meno grassetto */
    color: #fff;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.video-hero-card .duration-badge {
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 1rem; /* più grande di 2pt rispetto a badge normali */
    font-weight: 600;
    padding: 0;
}

.video-hero-card p.text-muted.small.mb-3 {
    color: #fff !important; /* descrizione bianca */
}

    .video-hero-card p.text-muted.small.mb-3:last-of-type {
        color: #999 !important; /* data di caricamento in grigio */
    }

/* Bottone */
.video-hero-card .btn-pill-primary,
.video-hero-card .btn {
    background: #7c3aed;
    color: #fff;
    border-radius: 999px;
    height: 42px;
    line-height: 42px;
    border: none;
    padding: 0 20px;
    box-shadow: 0 10px 34px rgba(124,58,237,.4), inset 0 -2px 0 rgba(0,0,0,.35);
    transition: all .2s ease;
}

    .video-hero-card .btn:hover {
        background: #fff;
        color: #0a0a0a;
        box-shadow: 0 12px 40px rgba(255,255,255,.25);
    }

/* Footer card: data + bottone */
.video-card-footer {
    margin-top: auto;
}

    .video-card-footer .upload-date {
        color: #999;
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        text-align: left;
    }

/* video corrente */
.video-current-item {
    background: transparent !important; /* niente sfondo grigio */
    padding: 0 !important;
    align-items: flex-start; /* <-- allinea in alto */
    gap: 1.5rem;
}

.video-current-thumb {
    width: 420px;
    height: 236px; /* proporzione 16:9 più precisa */
    object-fit: cover;
    object-position: top center; /* <-- qui il trucco */
    border-radius: 8px;
}


.video-current-desc {
    color: #fff; /* descrizione bianca */
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === Instructor section (About) === */
.instructor-section {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}

    .instructor-section::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 100%;
        background: #111;
        z-index: -1;
        border-top: 1px solid rgba(255,255,255,.04);
        border-bottom: 1px solid rgba(255,255,255,.04);
    }

.instructor-photo {
    width: 100%;
    max-width: 360px;
    height: auto;
    object-fit: cover;
}

.instructor-bio {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* proporzione 30/70 */
@media (min-width: 992px) {
    .instructor-section .col-lg-4 {
        flex: 0 0 30%;
        max-width: 30%;
    }

    .instructor-section .col-lg-8 {
        flex: 0 0 70%;
        max-width: 70%;
    }
}

/* sezione Recent uploads */
.recent-uploads {
    margin-top: auto;
    padding-top:14rem;
}

.recent-title {
    color: #fff;
    font-weight: 600; /* leggermente grassetto */
}

.recent-uploads-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.recent-item {
    flex: 1 1 calc(25% - 0.75rem);
    min-width: 120px;
}

.recent-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
}

.recent-item span {
    color: #fff; /* titoli bianchi */
    font-weight: 500;
    font-size: 0.75rem;
}

.recent-item img {
    width: 200px;
    height: 120px;
    object-fit: cover;
    transition: transform .3s ease;
}

.recent-item:hover img {
    transform: scale(1.05);
}

.recent-item span {
    font-size: 0.9rem;
}


/* forza la riga della sezione instructor ad avere le due colonne allineate in basso */
.instructor-section .row.align-items-start {
    align-items: stretch!important; /* invece di start */
}

/* la colonna di destra diventa un flex verticale */
.instructor-section .col-lg-8 {
    display: flex;
    flex-direction: column;
}

/* la bio resta in alto */
.instructor-section .instructor-bio {
    margin-bottom: 1.5rem;
}

/* i recent uploads scivolano in fondo */
.instructor-section .recent-uploads {
    margin-top: auto;
}

/* i 4 elementi restano in riga */
.instructor-section .recent-uploads-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.instructor-section .recent-item {
    flex: 0 0 calc(25% - 0.75rem);
}

.related-thumb-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.related-thumb {
    transition: transform .25s ease;
    border-radius: 8px;
}

.related-thumb-link:hover .related-thumb {
    transform: scale(1.04);
}

.video-current-item a.text-white:hover h4 {
    text-decoration: none !important;
}

/* Bottone "Subscribed" */
.btn-subscribed {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.75)!important; /* contorno più visibile */
    color: #fff !important;
    font-weight: 500;
    cursor: default;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    transition: none !important;
    outline: none !important;
    filter: none !important;
}

    /* icona spunta */
    .btn-subscribed i {
        color: #fff !important;
        font-size: 0.9rem;
    }

    /* Rimuove ogni hover, bagliore, bordo colorato */
    .btn-subscribed:hover,
    .btn-subscribed:focus,
    .btn-subscribed:active {
        background: transparent !important;
        color: #fff !important;
        border-color: rgba(255, 255, 255, 0.6) !important;
        box-shadow: none !important;
        outline: none !important;
        filter: none !important;
    }

.video-current--locked {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Effetto zoom solo se attivo */
.video-current--active .video-current-thumb {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-current--active:hover .video-current-thumb {
    transform: scale(1.03); /* aumento più evidente */
    box-shadow: 0 8px 26px rgba(255, 255, 255, 0.15);
}

.video-current--locked {
    opacity: 0.55;
    pointer-events: auto; /* ci serve per l'hover */
}

    .video-current--locked .locked-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: radial-gradient(circle, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.8) 60%);
        opacity: 0;
        transition: opacity .2s ease;
        pointer-events: none; /* così finché non si vede non blocca */
    }

    .video-current--locked:hover {
        opacity: 1;
    }

        .video-current--locked:hover .locked-overlay {
            opacity: 1;
            pointer-events: auto;
        }

.locked-btn {
    background: #7c3aed;
    color: #fff;
    border-radius: 999px;
    padding: 0.65rem 1.6rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: none;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(124, 58, 237, .45);
    font-weight: 500;
    white-space: nowrap;
}

    .locked-btn:hover {
        background: #fff;
        color: #0a0a0a;
    }
/* overlay blocco player per livestream */
.locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35); /* ← leggero nero trasparente */
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 5;
}

.addToCart {
    background: #7c3aed; /* viola base */
    color: #fff; /* testo bianco */
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 10px 30px rgba(124,58,237,.3);
    transition: all 0.25s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

    .addToCart:hover {
        background: #fff!important; /* sfondo bianco */
        color: #7c3aed!important; /* testo viola */
        border-color: #7c3aed!important; /* bordo viola */
        box-shadow: 0 0 20px rgba(124,58,237,.4);
        transform: scale(1.05);
    }

        .addToCart:hover i {
            color: #7c3aed; /* anche l’icona diventa viola */
        }



.video-hero-media:hover .locked-overlay {
    opacity: 1;
    pointer-events: auto;
}

.locked-overlay--center {
    text-align: center;
}


/* Responsiveness */
@media (max-width: 991.98px) {
    .about-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1200px) {
    .video-hero .video-col-left {
        flex: 0 0 70%;
        max-width: 70%;
    }

    .video-hero .video-col-right {
        flex: 0 0 30%;
        max-width: 30%;
    }
}


/* ====== COURSE PAGE – RESPONSIVE LIST ITEM (Videos + Related) ====== */

/* Desktop/tablet: puoi anche lasciare il layout orizzontale com'è adesso */

/* Mobile: stack verticalmente thumb + testo */
@media (max-width: 767.98px) {

    .video-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

        .video-list-item .thumb-wrap {
            flex: 0 0 auto;
            width: 100%;
            max-width: 100%;
        }

        .video-list-item .video-current-thumb,
        .video-list-item .related-thumb,
        .video-list-item img {
            width: 100%;
            height: auto;
            max-height: 230px;
            object-fit: cover;
            border-radius: 8px;
        }

        .video-list-item .flex-grow-1 {
            width: 100%;
            margin-top: .5rem;
        }

        /* Assicuriamoci che i testi possano andare a capo */
        .video-current-desc,
        .video-list-item p,
        .video-list-item h4,
        .video-list-item h6,
        .video-list-item small {
            white-space: normal;
        }
}

/* ====== COURSE PAGE – RECENT UPLOADS GRID ====== */

.recent-uploads-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

    /* Thumb */
    .recent-uploads-grid .recent-thumb {
        width: 100%;
        height: auto;
        max-height: 120px;
        object-fit: cover;
        border-radius: 8px;
        display: block;
    }

    /* Testo sotto la thumb */
    .recent-uploads-grid .recent-item span {
        color: rgba(255,255,255,.85);
        white-space: normal;
        line-height: 1.3;
    }

/* Mobile molto stretto: 1 colonna sola */
@media (max-width: 575.98px) {
    .recent-uploads-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .video-current--locked .locked-overlay {
        align-items: flex-end; /* il bottone si posiziona verso il basso */
        padding: .75rem;
    }

    .video-current--locked .locked-btn {
        width: 100%;
        text-align: center;
    }
}

