/* Style per la pagina Comunicazioni - Tema Chiaro/Rosso MSL */

body {
    background: #F5F5F7;
    color: #111111;
}

.wrap {
    padding-bottom: 80px;
    max-width: 600px;
    margin: 0 auto;
}

/* Header & Back Button (stile galleria gadget/trailer) */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
    margin-bottom: 20px;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFF;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #111;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.95);
    background: #F9F9F9;
}

.header-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0px;
    color: #111;
}

/* Feed Container (Masonry Layout) */
.feed-container {
    width: 100%;
    padding: 0 20px;
    column-count: 2;
    column-gap: 12px;
}

/* Empty State / Loading */
.empty-state {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 15px;
    font-weight: 500;
}

/* Post Card (Tema Chiaro, Stile Home) */
.post-card {
    width: 100%;
    margin: 0 0 16px 0;
    break-inside: avoid;
    background: #FFF;
    border-radius: var(--r-small, 20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.post-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--r-small, 20px) var(--r-small, 20px) 0 0;
    overflow: hidden;
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-image-wrapper {
    position: relative;
    width: 100%;
}

.post-image {
    width: 100%;
    height: auto;
    display: block;
    background: #EEEEEE;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Lock Overlay per Comunicazioni protette */
.news-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.news-lock-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.news-lock-icon {
    width: 48px;
    height: 48px;
    background: #FA2A31;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #FFF;
    box-shadow: 0 4px 15px rgba(250, 42, 49, 0.5);
    margin-bottom: 8px;
}

.news-unlock-text {
    color: #FFF;
    font-weight: 800;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Post Details */
.post-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.post-date {
    color: #FA2A31;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.post-title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: #111;
    line-height: 1.2;
}

.post-content {
    margin: 2px 0 0 0;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge "NEW" per i nuovi post in evidenza */
.news-badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FA2A31;
    color: #FFF;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(250, 42, 49, 0.4);
    z-index: 15;
    letter-spacing: 0.5px;
}

/* Animazione lampeggiante morbida */
@keyframes pulse-soft {
    0% {
        box-shadow: 0 4px 15px rgba(250, 42, 49, 0.2);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 8px 25px rgba(250, 42, 49, 0.5);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 4px 15px rgba(250, 42, 49, 0.2);
        transform: scale(1);
    }
}

.post-card.pulse-highlight {
    animation: pulse-soft 2s infinite ease-in-out;
    border: 1px solid rgba(250, 42, 49, 0.3);
}

.post-content.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* Link Testuale "leggi" (Sostituisce il bottone rosso) */
.read-more-link {
    color: #FA2A31;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 2px;
}

/* Post Button (Rosso MSL ripristinato a richiesta) */
.post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 10px 14px;
    background: #FA2A31;
    color: #FFF;
    text-align: center;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(250, 42, 49, 0.3);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    border: none;
}

.post-btn:active {
    transform: scale(0.96);
}