/* Course Info Plugin Styles */

.courseinfo-container {
    padding: 20px 0;
}

.page-title {
    color: #343a40;
    font-weight: 600;
    margin-bottom: 0;
}

/* Course Image */
.course-image-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-main-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

/* Course Badges */
.course-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.course-badge,
.course-status {
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 20px;
    font-weight: 500;
}

/* Course Title */
.course-main-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 20px;
}

/* Main Content */
.course-main-content {
    padding-right: 30px;
}

.course-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-content {
    line-height: 1.6;
    color: #555;
}

/* Obiettivi Formativi - Stile con checkmarks verdi */
.course-section h3.section-title {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.course-section h3.section-title i {
    margin-right: 10px;
    color: #013a63;
}

/* Fallback per browser che non supportano :has() */
.obiettivi-list {
    list-style: none !important;
    padding-left: 0 !important;
}

.obiettivi-list li {
    position: relative;
    padding-left: 40px !important;
    margin-bottom: 15px !important;
    line-height: 1.6;
}

.obiettivi-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Stile per Contenuti Principali - Lista con box grigi */
.contenuti-list {
    list-style: none !important;
    padding-left: 0 !important;
    counter-reset: contenuto-counter;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.contenuti-list li {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    counter-increment: contenuto-counter;
    position: relative;
    padding-left: 70px;
    margin-bottom: 0 !important;
    line-height: 1.6;
}

.contenuti-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contenuti-list li:before {
    content: counter(contenuto-counter);
    position: absolute;
    left: 20px;
    top: 20px;
    width: 35px;
    height: 35px;
    background: #013a63;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Sezioni senza bordi per obiettivi */
.course-section.no-border {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Price Section */
.price-section {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #013a63 0%, #096aaf 100%);
    border-radius: 12px;
    color: white;
}

.price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.price-note {
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 5px;
}

/* Sticky Sidebar */
.course-info-sticky {
    position: sticky;
    top: 80px;
}

.course-info-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.course-info-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

.course-info-card .card-body {
    padding: 25px;
}

/* Info Items */
.course-info-list {
    margin-bottom: 0;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.info-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 1.1em;
    color: #013a63;
}

.info-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95em;
}

.info-value {
    color: #666;
    font-size: 0.95em;
    font-weight: 500;
    text-align: right;
}

.price-item .info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
}

/* Action Buttons */
.course-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 20px;
}

.course-actions .btn-primary {
    background: linear-gradient(135deg, #013a63 0%, #096aaf 100%);
    border: none;
}

.course-actions .btn-outline-secondary {
    border: 2px solid #ddd;
    color: #666;
}

/* Contact Info */
.contact-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.contact-info h5 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.contact-item {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.contact-item strong {
    color: #2c3e50;
}

/* Course Search Form */
.course-search-form {
    margin-bottom: 0;
}

.course-search-form .input-group {
    margin-bottom: 10px;
}

/* Category Filters */
.category-filters {
    margin-bottom: 20px;
}

.category-filters .btn {
    margin-bottom: 5px;
    border-radius: 20px;
}

/* Course Cards for List */
/* .course-card {
    transition:
        transform 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    background: white;
} */
.course-card {
    background: #fff;
    border-radius: 15px;
    /* padding: 2rem; */
    height: 100%;
    box-shadow: 0 4px 15px rgb(0 0 0 / 0.08);
    transition: all 0.3s ease;
    border: none !important;
}

/* .course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
} */
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(1, 58, 99, 0.15);
}

.course-image {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.course-header {
    margin-bottom: 15px;
}

.course-category-badge {
    padding: 6px 12px;
    font-size: 0.8em;
    border-radius: 20px;
    font-weight: 500;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.course-subtitle {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-height: calc(1.4em * 2);
}

.course-meta {
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}

.meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item i {
    color: #013a63;
    width: 16px;
}

.course-footer {
    padding-top: 15px;
}

.course-price {
    text-align: center;
}

.btn-block {
    width: 100%;
    /* padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    background: #013A63;
    border: none;
    color: white; */
}

/* .btn-block:hover {
    background: #096aaf;
    color: white;
} */

/* Upcoming Courses Block - New styles for homepage */
.upcoming-courses-block {
    padding: 60px 0;
}

.block-header {
    max-width: 600px;
    margin: 0 auto;
}

.block-badge .badge {
    font-size: 0.9rem;
    border-radius: 25px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.block-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.block-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
}

.upcoming-courses-grid {
    max-width: 1200px;
    margin: 0 auto;
}

/* Course item legacy styles (for old block template if still used) */
.course-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.course-item:hover {
    background: #e9ecef;
}

.course-item:last-child {
    margin-bottom: 0 !important;
}

.course-thumb {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.course-name a {
    color: #343a40;
    font-weight: 600;
}

.course-name a:hover {
    color: #013a63;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .upcoming-courses-block {
        padding: 40px 20px;
    }

    .block-title {
        font-size: 2rem;
    }

    .block-subtitle {
        font-size: 1rem;
    }

    .course-main-content {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .course-info-sticky {
        position: relative;
        top: auto;
    }

    .course-item .col-md-3,
    .course-item .col-md-9 {
        margin-bottom: 10px;
    }

    .category-filters .btn {
        margin-bottom: 10px;
        width: 100%;
    }

    .course-search-form {
        margin-bottom: 20px;
    }
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}
.prossimi-corsi-badge {
    background-color: rgb(248, 201, 113, 0.4);
    color: #013a63;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgb(248, 201, 113, 0.2);
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Button styles consistent with Space theme */
/* .btn-primary {
    border-radius: 6px;
    background: #013A63;
    border-color: #013A63;
}

.btn-primary:hover {
    background: #096aaf;
    border-color: #096aaf;
} */

/* .btn-outline-primary {
    border-radius: 6px;
    color: #013A63;
    border-color: #013A63;
}

.btn-outline-primary:hover {
    background: #013A63;
    border-color: #013A63;
    color: white;
} */

/* Alert styles */
.alert {
    border-radius: 8px;
}

/* Card header styles */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Hide Dashboard from breadcrumb */
.breadcrumb .breadcrumb-item:first-child {
    display: none;
}

/* Hide separator after hidden Dashboard */
.breadcrumb .breadcrumb-item:nth-child(2)::before {
    display: none;
}
