/* Reset base */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: #333;
    background-color: #f4f9ff;
}

.container {
    width: 85%;
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
}

/* Header */
header {
    background: #0077b6; /* Un blu cielo profondo */
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

/* Navigazione */
nav {
    background: #0096c7;
    color: #fff;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

nav li {
    display: inline;
    margin: 0 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* Layout Main (Griglia) */
main {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.content {
    flex: 3;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
}

.sidebar {
    flex: 1;
    padding: 20px;
    background: #e1f1ff;
    margin-left: 20px;
    border-radius: 10px;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

/* Responsive */
@media(max-width: 768px) {
    main {
        flex-direction: column;
    }
    .sidebar {
        margin-left: 0;
        margin-top: 20px;
    }
}

.scheda-corso {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.scheda-corso:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.corso-header {
    background: #0077b6;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.corso-header h3 { margin: 0; font-size: 1.4rem; }

.tag {
    background: #caf0f8;
    color: #03045e;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.corso-body {
    padding: 20px;
}

.box-logistica {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px dashed #0096c7;
}

/* Stile per la tendina */
.approfondimento-corso {
    margin-top: 10px;
    border-top: 1px solid #cce5ff;
    padding-top: 10px;
}

.approfondimento-corso summary {
    font-weight: bold;
    color: #0077b6;
    cursor: pointer;
    list-style: none; /* Rimuove la freccetta standard su alcuni browser */
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.approfondimento-corso summary:hover {
    color: #0096c7;
}

/* Aggiungiamo una freccetta personalizzata prima del testo */
.approfondimento-corso summary::before {
    content: "▶ ";
    font-size: 0.8rem;
    margin-right: 10px;
    transition: transform 0.3s;
}

/* Ruota la freccetta quando la tendina è aperta */
.approfondimento-corso[open] summary::before {
    transform: rotate(90deg);
}

.dettaglio-nascosto {
    background: #fdfdfd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 3px solid #0077b6;
    animation: slideDown 0.4s ease-out; /* Animazione di apertura */
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dettaglio-nascosto ul {
    margin: 0;
    padding-left: 20px;
}

.dettaglio-nascosto li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}


.header-flex {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo a sinistra */
.logo {
    width: 120px;
    height: auto;
}

/* Testo */
.header-text {
    text-align: left;
}

/* per mobile */
@media(max-width: 768px) {
    .header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-text {
        text-align: center;
    }

    .logo {
        width: 90px;
    }
}

#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;

    width: 60px;
    height: 60px;

    background: #0077b6;
    border-radius: 50%;
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 999;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;

    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    transform: scale(1.1);
    background: #0096c7;
}

/* Freccia */
.arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    border-left: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(135deg);
}

/* Cerchio progresso */
.progress-ring {
    position: absolute;
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke: #f4f9ff;
    opacity: 0.9;
    stroke-dasharray: 163;
    stroke-dashoffset: 163;
    transition: stroke-dashoffset 0.2s linear;
}

@media(max-width: 768px) {
    #backToTop {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
}

#backToTop:hover .progress-ring__circle {
    stroke: #48cae4;
}

.locandina-img {
    width: 100%;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}


