/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== HERO SECTION ===== */
.hero {
    background: white;
    border-radius: 20px;
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.hero-logo {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.hero h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: #666;
    font-size: 1.3em;
    font-weight: 500;
}

/* ===== DESCRIZIONE LABORATORIO ===== */
.lab-description {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.lab-description .intro {
    font-size: 1.15em;
    color: #444;
    margin-bottom: 25px;
    text-align: justify;
}

.lab-description > p {
    color: #555;
    margin-bottom: 20px;
}

/* ===== STEPS GRID ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.step-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 15px;
    padding: 25px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.step-emoji {
    font-size: 2.5em;
    display: block;
    margin-bottom: 15px;
}

.step-card h3 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.step-card p {
    color: #666;
    font-size: 0.95em;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    color: white;
}

.experience-section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.experience-section p {
    margin-bottom: 15px;
}

.benefits-list {
    list-style: none;
    padding-left: 0;
}

.benefits-list li {
    padding: 8px 0 8px 30px;
    position: relative;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #90EE90;
    font-weight: bold;
    font-size: 1.2em;
}

.school-intro {
    color: #555;
    text-align: justify;
    margin: 20px 0;
}

.motto {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
    margin-top: 20px;
}

/* ===== LABS CTA SECTION ===== */
.labs-cta-section {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    text-align: center;
}

.btn-view-labs-big {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 25px 80px;
    border-radius: 50px;
    font-size: 1.8em;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-view-labs-big:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5);
}

/* ===== LABORATORI PAGE ===== */
.lab-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.lab-section h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.lab-section .lab-desc {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.lab-subsection {
    margin-bottom: 30px;
}

.lab-subsection h3 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.photo-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.photo-thumb:hover {
    transform: scale(1.05);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.work-thumb {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.work-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ===== SCHOOLS SECTION ===== */
.schools-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.schools-section h2 {
    text-align: center;
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.schools-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.school-card {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.school-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.school-preview {
    display: flex;
    height: 150px;
    overflow: hidden;
    background: white;
}

.school-preview .preview-img {
    flex: 1;
    object-fit: contain;
    padding: 10px;
    background: white;
    border-right: 1px solid #eee;
}

.school-preview .preview-img:last-child {
    border-right: none;
}

.school-info {
    padding: 20px;
    text-align: center;
}

.school-info h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 5px;
}

.school-location {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.project-count {
    color: #888;
    font-size: 0.9em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* ===== FOOTER ===== */
footer {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: #666;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ===== PAGINE SCUOLE - HEADER ===== */
.page-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #f8f9ff;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.school-logo {
    max-width: 120px;
    margin-bottom: 15px;
}

.page-header h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 5px;
}

.page-header .subtitle {
    color: #666;
    font-size: 1em;
    margin-bottom: 5px;
}

.page-header .school-name {
    color: #667eea;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-header .lab-description-text {
    color: #888;
    font-style: italic;
}

/* ===== SLIDESHOW ===== */
.slideshow-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.slideshow-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.slideshow-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    background: #f8f9fa;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.slide img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.slideshow-btn:hover {
    background: #764ba2;
    transform: translateY(-50%) scale(1.1);
}

.slideshow-btn.prev {
    left: 15px;
}

.slideshow-btn.next {
    right: 15px;
}

.slideshow-dots {
    text-align: center;
    padding: 20px 0 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    display: inline-block;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active, .dot:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.2);
}

.slideshow-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.slideshow-placeholder span {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

/* ===== GRIGLIA PROGETTI ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 10px;
}

.card-title {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-slogan {
    font-style: italic;
    color: #667eea;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.card-authors {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.5;
}

.card-authors strong {
    color: #333;
}

.card-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.btn-detail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s ease;
    width: 100%;
    font-weight: bold;
}

.btn-detail:hover {
    transform: scale(1.05);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 35px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 20px;
}

.modal-title {
    font-size: 2em;
    color: #333;
    margin-bottom: 15px;
}

.modal-slogan {
    font-style: italic;
    color: #667eea;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.modal-authors {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.modal-description {
    color: #555;
    font-size: 1.1em;
    line-height: 1.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero-logo {
        width: 100%;
    }

    .hero h1 {
        font-size: 1.8em;
    }

    .hero-subtitle {
        font-size: 1.1em;
    }

    .lab-description {
        padding: 25px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .schools-section {
        padding: 25px;
    }

    .schools-grid {
        grid-template-columns: 1fr;
    }

    .school-preview {
        height: 120px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
        padding: 25px;
    }

    .slideshow-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .slideshow-btn.prev {
        left: 10px;
    }

    .slideshow-btn.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5em;
    }

    .hero-subtitle {
        font-size: 1em;
    }

    .step-emoji {
        font-size: 2em;
    }

    .schools-section h2 {
        font-size: 1.5em;
    }

    .school-preview .preview-img {
        display: none;
    }

    .school-preview .preview-img:first-child {
        display: block;
        width: 100%;
    }

    .page-header h1 {
        font-size: 1.5em;
    }
}
