/* ==================== BANDI - GRIGLIA ==================== */

.bandi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.bandi-grid .bacheca-empty--grid {
    grid-column: 1 / -1;
}

/* ==================== BANDI - DISCLAIMER ==================== */

.bandi-disclaimer {
    background: #FFF3CD;
    border: 3px solid var(--black);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 5px 5px 0 0 var(--black);
}

.bandi-disclaimer__icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.bandi-disclaimer__title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: #856404;
    margin: 0 0 6px 0;
}

.bandi-disclaimer__text {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.6;
    color: #856404;
    margin: 0;
}

/* ==================== BANDI - CARD ==================== */

.bandi-card {
    background: #fff;
    border: 3px solid var(--black);
    border-radius: 16px;
    box-shadow: 5px 5px 0 0 var(--black);
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.bandi-card--scaduto {
    opacity: 0.6;
}

.bandi-card__header {
    background: var(--color-verde);
    border-bottom: 3px solid var(--black);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bandi-card__header--scaduto {
    background: #f5f5f5;
}

.bandi-card__ente {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--black);
}

.bandi-card__badge {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    flex-shrink: 0;
}

.bandi-card__badge--aperto { background: #28a745; }
.bandi-card__badge--scaduto { background: #dc3545; }

.bandi-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bandi-card__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: var(--black);
}

.bandi-card__desc {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--black);
    margin: 0 0 1.5rem 0;
    flex: 1;
}

.bandi-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: auto;
    border-top: 2px solid rgba(0,0,0,0.1);
}

.bandi-card__footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bandi-card__date {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

.bandi-card__date--scaduto {
    color: #dc3545;
}

.bandi-card__footer-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bandi-card__stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    opacity: 0.7;
    cursor: default;
}

.bandi-card__stat svg {
    width: 14px;
    height: 14px;
}

.bandi-card__stat--like,
.bandi-card__stat--save {
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.bandi-card__stat--liked {
    color: #e25555;
    opacity: 1;
}

.bandi-card__stat--liked svg {
    fill: #e25555;
    stroke: #e25555;
}

.bandi-card__stat--saved {
    color: var(--black);
    opacity: 1;
}

/* ==================== BANDO - MODALE ==================== */

.bando-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    background: #fff;
    border: 3px solid var(--black);
    border-radius: 16px;
    z-index: 9999;
    box-shadow: 5px 5px 0 0 var(--black);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bando-modal::-webkit-scrollbar { display: none; }

.bando-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 2px solid var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--black);
    z-index: 10;
}

.bando-modal__close:hover {
    opacity: 0.7;
}

.bando-modal__header {
    background: var(--color-verde);
    border-bottom: 3px solid var(--black);
    padding: 2rem 2.5rem;
    border-radius: 13px 13px 0 0;
}

.bando-modal__ente {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.bando-modal__title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0;
    padding-right: 40px;
}

.bando-modal__body {
    padding: 2.5rem;
}

.bando-modal__info-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 2rem;
}

.bando-modal__info-box {
    flex: 1;
    background: #f5f5f5;
    border: 3px solid var(--black);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.bando-modal__info-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 4px;
}

.bando-modal__info-value {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

.bando-modal__info-value--aperto { color: #28a745; }
.bando-modal__info-value--scaduto { color: #dc3545; }

.bando-modal__section {
    margin-bottom: 2rem;
}

.bando-modal__section-label {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-verde);
    margin: 0 0 1rem 0;
}

.bando-modal__desc {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin: 0;
    white-space: pre-line;
}

.bando-modal__disclaimer {
    background: #FFF3CD;
    border: 3px solid var(--black);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.bando-modal__disclaimer p {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.6;
    color: #856404;
    margin: 0;
}

.bando-modal__cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .bandi-disclaimer {
        box-shadow: 3px 3px 0 0 var(--black);
        padding: 1rem;
        gap: 10px;
    }

    .bandi-disclaimer__icon {
        width: 22px;
        height: 22px;
    }

    .bandi-disclaimer__title {
        font-size: 13px;
    }

    .bandi-disclaimer__text {
        font-size: 12px;
    }

    .bandi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bandi-card {
        box-shadow: 3px 3px 0 0 var(--black);
    }

    .bandi-card__header {
        padding: 0.75rem 1rem;
    }

    .bandi-card__ente {
        font-size: 12px;
    }

    .bandi-card__content {
        padding: 1rem;
    }

    .bandi-card__title {
        font-size: 16px;
        margin: 0 0 0.75rem 0;
    }

    .bandi-card__desc {
        font-size: 13px;
        margin: 0 0 1rem 0;
    }

    .bandi-card__footer {
        padding-top: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .bandi-card__date {
        font-size: 13px;
    }

    .bandi-card__stat {
        font-size: 12px;
    }

    .bando-modal {
        width: 95%;
        max-height: 85dvh;
    }

    .bando-modal__header {
        padding: 1.25rem 1rem;
    }

    .bando-modal__title {
        font-size: 20px;
    }

    .bando-modal__body {
        padding: 1.25rem;
    }

    .bando-modal__info-grid {
        flex-direction: column;
        gap: 12px;
    }

    .bando-modal__info-value {
        font-size: 14px;
    }

    .bando-modal__desc {
        font-size: 14px;
    }

    .bando-modal__disclaimer {
        padding: 0.75rem 1rem;
    }

    .bando-modal__disclaimer p {
        font-size: 12px;
    }

    .bando-modal__cta {
        font-size: 14px;
        padding: 12px 24px;
    }
}
