/* --- CONTAINER FIX (La gabbia che tiene tutto insieme) --- */
.cl-single-course-wrapper,
.ast-container,
.entry-content {
    overflow: visible !important;
    /* Impedisce che l'hero venga tagliato ai lati */
}
.cl-single-course-wrapper .tutor-container {
    width: 100vw;
    max-width: 2560px;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    /*left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;*/
}

/* --- HERO SECTION --- */
.cl-course-hero {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

/* Overlay per leggere meglio il testo */
.cl-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.cl-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
    padding: 0 20px;
}

.cl-course-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin: 0 0 15px 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.cl-hero-badge {
    background: #27ae60;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* --- GRID LAYOUT (50% - 30% - 20%) --- */
.cl-course-grid {
    display: grid;
    grid-template-columns: 5fr 3fr 2fr;
    gap: 30px;
    align-items: start;
}

/* --- WIDGETS & BOXES --- */
.cl-section-card,
.cl-widget-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.cl-section-title,
.cl-widget-box h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5f5f5;
    color: #222;
}

/* --- PROGRESS BAR CUSTOM --- */
.cl-progress-wrapper {
    margin-bottom: 10px;
}

.cl-progress-track {
    background: #eee;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.cl-progress-fill {
    height: 100%;
    background: #27ae60;
    /* Verde */
    border-radius: 10px;
}

.cl-progress-text {
    font-size: 12px;
    color: #666;
    text-align: right;
    display: block;
}

/* --- BOX HEADER (Titolo + Bottone affiancati) --- */
.cl-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* Rimuoviamo il bordo dal titolo h3 perché ora è gestito dal wrapper padre */
.cl-box-header .cl-section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    margin-top: 0;
}

/* Stile del pulsante "Vai all'Area" piccolo nel box */
.cl-btn-section-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #0a2838;
    background: #f5c140;
    padding: 5px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.cl-btn-section-link:hover {
    background: #0a2838;
    color: white;
}

/* --- RECIPE LIST STYLES (Colonna 2) --- */
.cl-recipe-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cl-recipe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.cl-recipe-item:last-child {
    border-bottom: none;
}

.cl-recipe-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cl-recipe-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.cl-recipe-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    line-height: 1.3;
}

.cl-recipe-btn-small {
    background: #fffef6;
    color: #0a2838;
    padding: 2px 6px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #0a2838;
    white-space: nowrap;
    transition: all 0.2s;
}

.cl-recipe-btn-small:hover {
    background: #0a2838;
    color: white;
    border-color: #0a2838;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .cl-course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cl-course-title {
        font-size: 2.2rem;
    }

    .cl-course-hero {
        height: 250px;
    }
}


/* --- HERO UPDATES --- */
/* Wrapper per tenere Titolo e Pulsante vicini */
.cl-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    /* Spazio tra titolo e bottone */
    flex-wrap: wrap;
    /* Su mobile va a capo se serve */
    margin-bottom: 15px;
}

.cl-course-title {
    margin: 0 !important;
    /* Rimuoviamo margine perché lo gestisce il wrapper */
}

