:root {
    --font-size-global: 14px;
    --font-size-title: 25px;
    --font-weight-title: 700;
    --font-size-status: 14px;
    --color-primary: #00AA4E;
    --color-secondary: #1d1d1b;
    --color-white: #ffffff;
    --color-bg-slide-content: rgba(0, 0, 0, 0.5);
    --color-title: #ffffff;
}

/* Layout di base */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .post-grid.responsive-layout {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 767px) {
    .post-grid.responsive-layout {
        grid-template-columns: 1fr;
    }
}

/* Card */
.post-item {
    position: relative;
    width: 100%;
    height: 300px;
    /* Rimuovi overflow: hidden; */
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
    background: #f5f5f5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;

    /* Effetto "sospeso" */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}


/* Immagine in copertura */
.post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.post-thumbnail a,
.post-thumbnail img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Overlay per la metà inferiore */
.post-content {
    position: absolute;
    top: 50%;
    /* metà card */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 15px;
    box-sizing: border-box;
    margin: 0;
    overflow: auto;
    transition: background-color 0.3s ease;
}

.post-content:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Data in alto a destra (fuori da .post-content) */
.post-date {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    /* sopra l'immagine */
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.post-date-icon {
    margin-right: 5px;
}

/* Categoria */
.post-category .post-tag {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 3px;
    margin-right: 8px;
    margin-bottom: 8px;
    white-space: nowrap;
}

/* Titolo più piccolo */
.post-heading a {
    color: #fff;
    text-transform: uppercase;
    /* Tutto in maiuscolo */
    text-decoration: none;
    font-weight: var(--font-weight-title);
    /* 700 */
    font-size: 0.9rem;
    line-height: 1.1;
    margin-bottom: 0.3em;
}

.post-heading a:hover {
    color: #fff;
    /* Resta bianco */
    text-decoration: underline;
    /* Sottolineatura */
}

/* Campo di filtraggio del titolo */
.title-filter-form {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.title-filter-form input[type="text"] {
    padding: 8px;
    width: 70%;
    max-width: 300px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.title-filter-form button {
    padding: 8px 16px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.title-filter-form button:hover {
    background-color: #34ae52;
}

/* Evidenziare testo cercato */
.highlight {
    background-color: yellow;
}

.post-filters {
    margin-bottom: 15px;
    text-align: center;
}

.post-filters button {
    background-color: var(--color-primary);
    color: #fff !important;
    border: none;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    /* assicuriamoci che di base non sia sottolineato */
}

.post-filters button:hover {
    background-color: #34ae52;
    color: #fff;
    text-decoration: underline;
    /* sottolinea il testo su hover */
}