/* === STILE BOLLETTINO UFFICIALE VINTAGE === */

@keyframes borderPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Struttura principale bollettino */
.bollettino-item {
    background: #ffffff;
    border: 3px solid #000;
    border-radius: 0;
    padding: 0;
    margin: 2rem 0;
    position: relative;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Times New Roman', serif;
}

.bollettino-item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    height: 8px;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #FF9800, #E91E63);
    border-radius: 0;
    animation: borderPulse 3s ease-in-out infinite;
}

/* === HEADER BOLLETTINO === */
.bollettino-header {
    background: #ffffff;
    border: none;
    border-bottom: 2px solid #000;
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    position: relative;
}

.bollettino-header::before {
    content: 'BOLLETTINO UFFICIALE';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: #000;
    padding: 0;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 3px;
    font-family: 'Arial', sans-serif;
    border: none;
}

.bollettino-header::after {
    content: 'ISTITUTO INTERDIMENSIONALE ONIRIKA';
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-family: 'Arial', sans-serif;
}

.bollettino-header h2 {
    color: #000;
    font-size: 1.4rem;
    margin: 2.5rem 0 1.5rem 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Arial Black', sans-serif;
    text-align: center;
    line-height: 1.3;
    padding: 0 1rem;
}

/* ID bollettino con animazione glitch */
.bollettino-id {
    color: #000;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 1rem;
    padding: 2px 6px;
    border: 1px solid #000;
    background: #f0f0f0;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.bollettino-id:hover {
    background: #000;
    color: #ffffff;
    text-shadow: none;
}

/* === META INFORMAZIONI === */
.bollettino-meta {
    background: #f8f8f8;
    border: 1px solid #ccc;
    border-left: none;
    border-right: none;
    padding: 1rem 2rem;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.meta-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-weight: normal;
}

.meta-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.collegamenti-count {
    color: #2196F3;
    font-weight: bold;
}

/* === CONTENUTO BOLLETTINO === */
.bollettino-contenuto {
    background: #ffffff;
    color: #000;
    padding: 2rem;
    margin: 0;
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
    position: relative;
    border: none;
    box-shadow: none;
}

.bollettino-contenuto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    bottom: 0;
    background-image:
        repeating-linear-gradient(transparent,
            transparent 1.7rem,
            #e0e0e0 1.7rem,
            #e0e0e0 1.72rem);
    pointer-events: none;
    opacity: 0.3;
}

.bollettino-contenuto p {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    text-indent: 2rem;
}

.bollettino-contenuto p:first-of-type {
    text-indent: 0;
}

.bollettino-contenuto p:first-of-type::first-letter {
    font-size: 3rem;
    font-weight: bold;
    float: left;
    line-height: 1;
    margin: 0.2rem 0.5rem 0 0;
    color: #000;
    font-family: 'Times New Roman', serif;
}

/* === RIFERIMENTI INTERDIMENSIONALI === */
.bollettino-collegamenti {
    background: #f8f8f8;
    border: none;
    border-top: 2px solid #000;
    border-radius: 0;
    padding: 2rem;
    margin: 0;
}

.bollettino-collegamenti h4 {
    color: #000;
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

/* Layout orizzontale per i gruppi di riferimenti */
.collegamenti-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: flex-start;
}

.collegamento-gruppo {
    flex: 0 1 auto;
    min-width: 150px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tipo-label {
    display: block;
    text-align: center;
    margin-bottom: 0.8rem;
    font-weight: bold;
    font-size: 0.85rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    line-height: 1.2;
}

.elementi-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.collegamento-link {
    background: #ffffff;
    color: #000;
    text-decoration: underline;
    padding: 0.3rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.8rem;
    font-family: 'Times New Roman', serif;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.collegamento-link:hover {
    background: #000;
    color: white;
    text-decoration: none;
    border-color: #000;
    transform: translateY(-1px);
}

/* === FINE TRASMISSIONE === */
.bollettino-transmission-end {
    background: #f0f0f0;
    border-top: 1px solid #ccc;
    text-align: center;
    margin: 0;
    padding: 1rem;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 3px;
}

/* === PAGINAZIONE === */
.bollettino-pagination {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid #333;
}

.pagination-info {
    text-align: center;
    color: #888;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    background: #333;
    color: #4CAF50;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.pagination-btn:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
}

.pagination-current {
    color: #4CAF50;
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* === STATI VUOTI === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px dashed #333;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-decoration {
    margin-top: 2rem;
    font-size: 3rem;
    color: #333;
    opacity: 0.5;
}

/* === STATISTICHE BOLLETTINO === */
.bollettino-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    justify-content: center;
}

.stats-item {
    color: #4CAF50;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .collegamenti-grid {
        gap: 1rem;
    }

    .collegamento-gruppo {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .bollettino-item {
        margin: 1rem -1rem;
        border-left: none;
        border-right: none;
    }

    .bollettino-header {
        padding: 1.5rem 1rem 1rem 1rem;
    }

    .bollettino-header h2 {
        font-size: 1.2rem;
        margin: 2rem 0 1rem 0;
        padding: 0 0.5rem;
    }

    .bollettino-id {
        font-size: 0.8rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        display: block;
        text-align: center;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .bollettino-contenuto {
        padding: 1.5rem 1rem;
    }

    .bollettino-collegamenti {
        padding: 1.5rem 1rem;
    }

    .collegamenti-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .collegamento-gruppo {
        flex: 1 1 100%;
        min-width: auto;
    }

    .bollettino-meta {
        grid-template-columns: 1fr;
        padding: 1rem;
        justify-items: center;
    }

    .bollettino-stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .pagination-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .bollettino-header h2 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .bollettino-header::before {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    .bollettino-header::after {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .tipo-label {
        font-size: 0.8rem;
    }

    .collegamento-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .bollettino-contenuto::before {
        left: 1rem;
        right: 1rem;
    }
}