/* =============================================
   BENEFICIOS SINDICALES
   ============================================= */

.benef-section { padding: 40px 0 50px; }

.benef-header { text-align: center; margin-bottom: 36px; }
.benef-header-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: #f0faf2; border-radius: 50%; margin-bottom: 14px; }
.benef-header-icon i { font-size: 28px; color: #0B5C21; }
.benef-header h1 { font-family: 'Lato', sans-serif; font-size: 30px; font-weight: 700; color: #1a1a1a; margin: 0 0 8px 0; }
.benef-header p { font-size: 15px; color: #666; margin: 0 auto; max-width: 600px; }

/* Buscador + filtros */
.benef-toolbar {
    max-width: 700px;
    margin: 0 auto 32px;
}

.benef-search {
    position: relative;
    margin-bottom: 16px;
}

.benef-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.benef-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.benef-search input:focus {
    outline: none;
    border-color: #0B5C21;
    box-shadow: 0 0 0 3px rgba(11,92,33,0.1);
}

.benef-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.benef-filter-btn {
    padding: 8px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.benef-filter-btn:hover { border-color: #0B5C21; color: #0B5C21; }
.benef-filter-btn.active { background: #0B5C21; color: #fff; border-color: #0B5C21; }

.benef-no-results {
    text-align: center;
    padding: 50px 20px;
    color: #888;
    display: none;
}

.benef-no-results i { font-size: 40px; color: #ddd; display: block; margin-bottom: 10px; }

/* =====================
   GRILLA DE BENEFICIOS
   ===================== */

.benef-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.benef-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.benef-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.07);
}

.benef-card.hidden { display: none; }

/* Imagen */
.benef-card-img {
    overflow: hidden;
    background: #f0faf2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benef-card-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s;
}

.benef-card:hover .benef-card-img img { transform: scale(1.04); }

.benef-card-img.no-img {
    background: linear-gradient(135deg, #f0faf2, #e8f5ea);
}

.benef-card-img.no-img i {
    font-size: 40px;
    color: #c8e6cc;
}

/* Badge de descuento */
.benef-discount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #0B5C21;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* Cuerpo */
.benef-card-body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.benef-card-title {
    font-family: 'Lato', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.benef-card-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #0B5C21;
    margin: 0 0 10px 0;
}

.benef-card-text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 14px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Categoría tags */
.benef-card-cats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.benef-cat-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #666;
}

/* Modal detalle */
.benef-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 20px;
}

.benef-modal.active { opacity: 1; pointer-events: all; }

.benef-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.benef-modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.benef-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.benef-modal-close:hover { background: rgba(0,0,0,0.12); color: #333; }

.benef-modal-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.benef-modal-body {
    padding: 28px 32px 32px;
}

.benef-modal-body h2 {
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
}

.benef-modal-body h3 {
    font-size: 16px;
    color: #0B5C21;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.benef-modal-body .benef-modal-text {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
    white-space: pre-line;
}

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

@media (max-width: 1100px) {
    .benef-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .benef-section { padding: 24px 0 36px; }
    .benef-header h1 { font-size: 22px; }
    .benef-grid { grid-template-columns: 1fr; gap: 16px; }
    .benef-filter-btn { padding: 6px 12px; font-size: 12px; }
    .benef-filters { gap: 6px; }
    .benef-card-title { font-size: 15px; }

    .benef-modal-body { padding: 20px; }
    .benef-modal-body h2 { font-size: 20px; }
}

@media (min-width: 1600px) {
    .benef-grid { grid-template-columns: repeat(4, 1fr); }
}
