/* ==================================================== */
/* Schede Archivio (Archive Items)                     */
/* ==================================================== */

/* Stile per la scheda (contenitore individuale) */
.pd-archive-item {
    text-align: center;
    padding: 0px;
    background: #f4f4f4;
    transition: transform 0.3s ease;
    margin-top: 30px;
}

.pd-archive-item h2 {
    font-size: 21px;
    line-height: 23px;
    padding-top: 10px;
    text-align: left;
    color: #274665;
}

.pd-archive-item:hover {
    transform: scale(1.05);
}

/* Regole per rimuovere l'effetto hover se richiesto */
.pd-archive-item.no-hover,
.pd-archive-item.no-hover:hover {
    transform: none !important;
    box-shadow: none !important;
    transition: none !important;
    cursor: default;
}


/* ==================================================== */
/* TABELLA SCHEDA TEMPLATE                              */
/* ==================================================== */

.pd_scheda_tbl {

}

.pd_scheda_tbl_row {
    display: flex;
    flex-direction: row;
}

.pd_scheda_tbl_cell {
    flex: 1; 
    padding: 4px 8px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start; 
    justify-content: flex-start;
    
}

.pd_scheda_tbl_cell {
    border-bottom: 1px solid #a1bee0;
    padding: 0px;
}

.pd_scheda_tbl_label {
    font-family: monospace;
    text-transform: uppercase;
    background-color: #f8f8f8;
    color: #274665;
    font-size: 16px;
    text-align: left;
}

.pd_scheda_tbl_content {
    font-family: monospace;
    background-color: #f8f8f8;
    line-height: normal;
    text-align: left;
}

/* ==================================================== */
/* ICONA PER IMMAGINE MANCANTE                          */
/* ==================================================== */

.pd-placeholder-icon {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    border: 1px solid #ddd;
    font-size: 100%;
}

.pd-placeholder-icon::before {
    font-size: 5vw;
}

/* ==================================================== */
/* Galleria Media (Gallery / Video Gallery)            */
/* ==================================================== */

.pd-gallery,
.pd-video-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Stile per ogni elemento della galleria */
.pd-gallery-item {
    width: var(--thumb-width);
    height: var(--thumb-height);
    transition: transform 0.2s ease;
}

.pd-gallery-item:hover {
    transform: scale(1.05);
}

/* ==================================================== */
/* Bottone "Torna alla Griglia"                       */
/* ==================================================== */

.pd-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.pd-button-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #a1bee0;
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.pd-button-icon:hover {
    background-color: #a1bee0;
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
}

.pd-pdf-button {
    background-color: #28a745;
}

.pd-pdf-button:hover {
    background-color: #218838;
}

.pd-icon::before {
    display: block;
    font-size: 1.2em;
    line-height: 1;
}

.pd-back-button .pd-icon::before {
    content: "←";
}

.pd-pdf-button .pd-icon::before {
    content: "📄";
}

/* Tooltip compatto */
.pd-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(-6px);
    z-index: 10;
}

.pd-button-icon:hover .pd-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}


/* ==================================================== */
/* Stile Contenuto Scheda                               */
/* ==================================================== */

.pd-scheda_tbl {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    font-family: "Segoe UI", sans-serif;
    font-size: 16px;
    background-color: #fff;
}

.pd-scheda_tbl_row {
    display: table-row;
}

.pd-scheda_tbl_cell {
    display: table-cell;
    padding: 12px 16px;
    vertical-align: middle;
    /* solo verticale, NON centrato orizzontalmente */
    border-bottom: 1px solid #e6e6e6;
}

.pd-scheda_tbl_row:last-child .pd-scheda_tbl_cell {
    border-bottom: none;
    /* niente bordo all'ultima riga */
}

.pd-scheda_tbl_label {
    font-weight: 600;
    background-color: #f4f4f4;
    color: #333;
    width: 35%;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid #ddd;
}

.pd-scheda_tbl_content {
    width: 65%;
    color: #222;
    text-align: justify;
    word-wrap: break-word;
}

/* ==================================================== */
/* Layout Template Scheda con Sidebar Sinistra/Destra  */
/* ==================================================== */

.pd-archive-wrapper {
    display: flex;
    gap: 1rem;
}

.pd-scheda-sidebar-left,
.pd-scheda-sidebar-right {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

.pd-scheda-main-content {
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
}

.pd-scheda-sidebar-left {
    margin-right: 0.5rem;
}

.pd-scheda-sidebar-right {
    margin-left: 0.5rem;
}