/*FONTS MAPPA*/
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&display=swap');

/*CORPO MAPPA*/
body {
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mind-map-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 750px; /*Ex: 750*/
    margin: 200px auto; /*Ex: 40px auto */
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.central-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 90px;
    background-color: #ff9933;
    border: 2px solid #e68a00;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 10px;
    box-sizing: border-box;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: none;
}

.central-box .title {
    margin: 0;
    font-size: 1.9em;

    font-family: "Dosis", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

.central-box .desc {
    margin: 5px 0 0;
    font-size: 1.05em;

    font-family: "Dancing Script", cursive;
    font-optical-sizing: auto;
    font-weight: 400px;
    font-style: normal;
}

.materia-box {
    position: absolute;
    width: 320px;
    height: 80px;
    background-color: white;
    border: 1px solid #cceeff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    z-index: 5;
    cursor: pointer;
}

.materia-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.materia-icon-img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 3px;
}

.icon-wrapper span {
    font-size: 0.7em;
    color: #666;
}

.text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    height: 100%;
}

.materia-box .title {
    margin: 0;
    color: #007bff;
    line-height: 1.2;
    text-align: left;

    font-family: "Dosis", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300px;
    font-size: 30px;
    font-style: normal;
}

.materia-box .desc {
    margin: 3px 0 0;
    font-size: 1.25em;
    color: #555;
    text-align: left;

    font-family: "Dancing Script", cursive;
    font-optical-sizing: auto;
    font-weight: 400px;
    font-style: normal;
}

.connection-line {
    position: absolute;
    background-color: #007bff;
    height: 2px;
    transform-origin: left center;
    z-index: 1;
}

.connection-line::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #007bff;
}


/* MOBILE (Ex 900px)*/
@media (max-width: 1279px) {
    .mind-map-container {
        height: auto;
        padding: 0px;
        margin: 20px auto;
        flex-direction: column;
        display: flex;
        align-items: center;
        gap: 20px;
        border: none;
        box-shadow: none;
    }

    .central-box {
        position: static;
        transform: none;
        margin-bottom: 20px;
        width: 80%;
        height: auto;
    }

    .materia-box {
        position: static;
        width: 90%;
        margin: 0 auto;
        height: auto;
        min-height: 80px;
    }

    .connection-line {
        display: none; /* Nascone i collegamenti nello stile per telefoni */
    }
}