body {
    margin: 0;
    padding: 0;
}

p {
    font-size: 20px;
}

.container {
    max-width: 70%;
    padding: 0;
    margin: 0 auto;
}

#nav-bar {
    background-color: #e9ecef;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

nav.navbar {
    display: flex;
    justify-content: center;
    /* Centra orizzontalmente */
    align-items: center;
    /* Centra verticalmente */
    height: 60px;
    /* Imposta un'altezza per il navbar */
}

nav.navbar .navbar-brand {
    display: flex;
    align-items: center;
    /* Centra verticalmente l'immagine */
}

#slideshow {
    background-color: #e9ecef !important;
    width: 100%;
    height: 200px;
    overflow-x: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 4px 0;
}

.arrow-icon {
    font-size: 20px;
    color: black;
    cursor: pointer;
}

#month-year-info {
    margin: auto !important;
}

#cover-right {
    min-height: 500px;
    height: 100%;
    width: 100%;
    position: relative;
    border: 1px solid #ddd;
    margin: 10px 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

#cover-right svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

#cover-right text {
    pointer-events: auto;
}

/* Stili per la riga divisa a metà */
#description {
    display: flex;
    justify-content: center;
    width: 100%;
}

#description .row {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

#description .col-md-6 {
    flex: 1;
    width: 50%;
    padding: 15px;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#cover-left {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.cover-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
}

.cover-image img.img-fluid {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Nuove regole per le immagini nella sezione destra */
#coloranalysis .container img {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
}

#coloranalysis .container {
    text-align: center;
    margin-bottom: 30px;
}

#coloranalysis .container p {
    margin-bottom: 15px;
    font-weight: bold;
}

/* Stile per il contenitore delle immagini */
#coloranalysis .col-md-12 {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Stile per il contenitore della word cloud */
#wordcloud-container {
    width: 100%;
    height: 100%;
    min-height: 350px;
    /* o quanto vuoi */
    position: relative;
}

#wordcloud-container svg {
    display: block;
    width: 100%;
    height: 100%;
    /* L'SVG occupa tutto lo spazio del contenitore */
}

#wordcloud-container text {
    cursor: pointer;
    transition: fill 0.2s;
}

#wordcloud-container text:hover {
    fill: #fb5607 !important;
}

.wordcloud-tooltip {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 6px;
    pointer-events: none;
    font-size: 15px;
    color: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    visibility: hidden;
    z-index: 10000;
}

.slideshow-image {
    width: 5px;
    height: 150px;
    /* o l'altezza che preferisci */
    object-fit: cover;
    transition: width 0.3s;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
}

.slideshow-image:hover {
    width: 100px;
    z-index: 10;
}

.graph-tooltip {
    z-index: 10000;
    pointer-events: none;
}

#textanalysis {
    max-width: 100% !important;
    width: 100%;
}

#graph {
    width: 1400px;
    max-width: 95%;
    height: 1000px;
    min-height: 800px;
    display: block;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    position: relative;
}

.wordcloud-tooltip {
    z-index: 1000;
}

#image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    /* Flex centering */
    display: flex;
}

#TitlesInGraph {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.titles-container {
    width: 100%;
}

.titles-header {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fb5607;
    margin-bottom: 10px;
    text-align: center;
}

.titles-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.titles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.title-item {
    padding: 12px 15px;
    background-color: #fff;
    border-left: 4px solid #4361ee;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-item:hover {
    background-color: #f0f0f0;
    border-left-color: #fb5607;
    transform: translateX(3px);
}

.title-count-badge {
    background-color: #fb5607;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 10px;
    min-width: 24px;
    text-align: center;
}

/* Etichette Sankey sempre nere */
#sankey-diagram text {
    fill: #111 !important;
}

#sankey-diagram svg {
    overflow: visible !important;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

#timeline-words {
    display: flex;
    /* Usa Flexbox per centrare */
    justify-content: center;
    /* Centra orizzontalmente */
    align-items: center;
    /* Centra verticalmente */
    flex-direction: column;
    /* Posiziona gli elementi in colonna */
}

#timeline-words svg {
    display: block;
    /* Assicurati che la SVG sia trattata come blocco */
    border: 1px solid red;
    /* Aggiungi un bordo per debug */
    height: 750px;
}

#heatmap-dropdown {
    display: block;
    margin: 0 auto;
    /* Centra il menu */
}



footer.footer p {
    font-size: 0.85rem;
    /* Riduce la dimensione del testo */
    color: #666;
    /* Opzionale: modifica il colore */
}