/* ==========================================================
   Elaborati Scuola — Archive styles
   Estratti da archive-elaborati-scuola.php (Blocco A 2026)
   ========================================================== */

/* --- Background page --- */
body.post-type-archive-elaborati-scuola {
    background-image: url('../images/sfondo_bambini.svg');
    background-repeat: repeat;
    background-size: 500px;
    background-attachment: fixed;
}

/* --- Responsive intro text --- */
@media screen and (min-width: 768px) {
    .elaborati-intro h2 {
        font-size: 2.2em !important;
    }
    .elaborati-intro p {
        font-size: 1.3em !important;
    }
}

@media screen and (max-width: 767px) {
    .elaborati-intro h2 {
        font-size: 1.6em !important;
    }
    .elaborati-intro p {
        font-size: 1.1em !important;
    }
}

/* --- PDF link --- */
.elaborato-pdf-link {
    display: inline-block;
    color: #95405a;
    font-weight: bold;
    text-decoration: underline;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 4px;
    background-color: #fef3df;
    border-radius: 4px;
}

.elaborato-pdf-link:hover {
    color: #f9b233;
    background-color: #95405a;
    transform: translateY(-2px);
}

.elaborato-pdf-link::after {
    content: "";
    margin-left: 2px;
    font-weight: bold;
    font-size: 0.8em;
    color: #f9b233;
    vertical-align: middle;
}

/* --- Download modulo button --- */
.download-modulo-container {
    text-align: center;
    margin: 60px auto 40px;
}

.download-modulo-button {
    display: inline-block;
    background-color: #f9b233;
    color: #95405a !important;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: -4px 4px 0 0 #95405a;
    font-size: 1.2em;
    border: 2px solid #f9b233;
}

.download-modulo-button:hover {
    transform: translateY(-3px);
    box-shadow: -6px 6px 0 0 #95405a;
    background-color: #fef3df;
}

@media screen and (max-width: 767px) {
    .download-modulo-button {
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* --- Vincitori section --- */
.vincitori-section {
    max-width: 1000px;
    margin: 40px auto 60px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(149, 64, 90, 0.15);
    position: relative;
    overflow: hidden;
}

.vincitori-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, #f9b233, #95405a);
    border-radius: 6px 6px 0 0;
}

.vincitori-title {
    color: #95405a;
    text-align: center;
    font-size: 2.2em;
    margin: 20px 0 30px;
    position: relative;
}

.vincitori-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background-color: #f9b233;
    margin: 15px auto;
    border-radius: 2px;
}

/* --- Gallery --- */
.evento-gallery {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 25px 0 30px;
    flex-wrap: wrap;
}

.intro-gallery {
    max-width: 90%;
    margin: 25px auto 30px;
}

@media screen and (min-width: 992px) {
    .intro-gallery {
        max-width: 80%;
    }
    .gallery-image {
        height: 220px;
    }
}

.gallery-item {
    flex: 1;
    min-width: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

/* --- Premi principali --- */
.premi-principali {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.premio-item {
    flex: 1;
    min-width: 280px;
    display: flex;
    background-color: #fef9e5;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.premio-item:hover {
    transform: translateY(-3px);
}

.premio-badge {
    font-size: 2.2em;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premio-content {
    flex: 1;
}

/* Desktop: medaglia in alto centrata, testo centrato sotto */
@media screen and (min-width: 768px) {
    .premio-item {
        flex-direction: column;
        align-items: center;
        padding: 20px 15px;
    }
    .premio-badge {
        font-size: 3em;
        margin-right: 0;
        margin-bottom: 12px;
    }
    .premio-content {
        text-align: center;
    }
}

.premio-content h3 {
    color: #95405a;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.premio-content ul {
    padding-left: 0;
    list-style-type: none;
    margin: 0;
}

.premio-content li {
    margin-bottom: 5px;
    font-size: 0.95em;
    line-height: 1.4;
}

/* --- Menzioni speciali --- */
.menzioni-title {
    color: #95405a;
    text-align: center;
    font-size: 1.8em;
    margin: 30px 0;
}

.menzioni-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.menzione-item {
    flex: 1;
    min-width: 280px;
    background-color: #f8f8f8;
    border-left: 4px solid #f9b233;
    padding: 15px 20px;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.menzione-item h4 {
    color: #95405a;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.menzione-item ul {
    padding-left: 0;
    list-style-type: none;
    margin: 0;
}

.menzione-item li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

/* --- Altri premi --- */
.altri-premi {
    margin-bottom: 40px;
}

.altro-premio-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #95405a;
}

.altro-premio-item h3 {
    color: #95405a;
    margin-top: 0;
    font-size: 1.3em;
}

.altro-premio-item ul {
    padding-left: 0;
    list-style-type: none;
}

.altro-premio-item li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

/* --- Conclusione progetto --- */
.conclusione-progetto {
    background-color: #fef3df;
    border-radius: 10px;
    padding: 25px;
    position: relative;
}

.conclusione-progetto h3 {
    color: #95405a;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.conclusione-progetto p {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1em;
    line-height: 1.6;
}

.arrivederci {
    font-size: 1.3em !important;
    font-weight: bold;
    color: #95405a;
    text-align: center;
    margin: 30px 0;
}

.tutti-elaborati-title {
    text-align: center;
    color: #95405a;
    font-size: 1.3em;
    margin: 30px 0 10px;
}

/* --- Responsive vincitori / gallery --- */
@media screen and (max-width: 767px) {
    .evento-gallery {
        flex-direction: column;
    }
    .intro-gallery {
        max-width: 100%;
    }
    .gallery-item {
        margin-bottom: 15px;
    }
    .gallery-image {
        height: 180px;
    }
    .premi-principali {
        flex-direction: column;
    }
    .premio-item {
        margin-bottom: 15px;
    }
    .menzioni-grid {
        flex-direction: column;
    }
    .vincitori-title {
        font-size: 1.8em;
    }
    .menzioni-title {
        font-size: 1.5em;
    }
    .altro-premio-item h3 {
        font-size: 1.2em;
    }
    .tutti-elaborati-heading {
        font-size: 1.6em;
        margin-top: 40px;
        margin-bottom: 25px;
    }
    .tutti-elaborati-heading::before {
        width: 80px;
    }
    .tutti-elaborati-heading::after {
        width: 100px;
    }
}

/* --- Sezione "Tutti gli elaborati" heading --- */
.elaborati-section-container {
    max-width: 1000px;
    margin: 50px auto 20px;
    position: relative;
}

.elaborati-archivio-container {
    margin-top: 30px;
    position: relative;
}

.tutti-elaborati-heading {
    color: #95405a;
    text-align: center;
    font-size: 2.2em;
    margin: 70px auto 40px;
    position: relative;
    max-width: 90%;
    display: block;
    font-weight: bold;
}

.tutti-elaborati-heading::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background-color: #f9b233;
    margin: 15px auto;
    border-radius: 2px;
}

.tutti-elaborati-heading::before {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #95405a;
    margin: 0 auto 15px;
    border-radius: 2px;
}

/* --- Admin toggle bar (front-end, solo admin) --- */
.elaborati-admin-bar {
    max-width: 1000px;
    margin: 20px auto 0;
    padding: 10px 20px;
    background: #23282d;
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
}

.elaborati-admin-bar strong {
    color: #f9b233;
}

.elaborati-admin-bar code {
    color: #f9b233;
    background: rgba(255, 255, 255, 0.15);
}

.elaborati-admin-bar a {
    color: #00b9eb;
    text-decoration: underline;
}
