/* =============================================
   ESCALA SALARIAL - Convenios y Salarios
   ============================================= */

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

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

/* =====================
   ESCALAS VIGENTES (destacadas arriba)
   ===================== */

.escala-vigentes { margin-bottom: 40px; }

.escala-vigente-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0B5C21;
    margin-bottom: 20px;
}

.escala-vigente-label i {
    width: 32px;
    height: 32px;
    background: #0B5C21;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.escala-vigente-card {
    background: linear-gradient(135deg, #f0faf2 0%, #e8f5ea 100%);
    border: 2px solid #0B5C21;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 16px;
}

.escala-vigente-title {
    font-family: 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0B5C21;
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.escala-vigente-title .badge-vig {
    padding: 3px 12px;
    background: #0B5C21;
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.escala-archivos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.escala-archivo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #dde9df;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.escala-archivo:hover {
    border-color: #0B5C21;
    box-shadow: 0 4px 12px rgba(11,92,33,0.1);
    transform: translateY(-2px);
}

.escala-archivo-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: #fef2f2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.escala-archivo-icon i { font-size: 18px; color: #c33; }

.escala-archivo-info { flex: 1; min-width: 0; }
.escala-archivo-name { font-size: 14px; font-weight: 600; color: #1a1a1a; margin: 0; line-height: 1.3; }
.escala-archivo-desc { font-size: 12px; color: #888; margin: 2px 0 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.escala-archivo-dl { color: #0B5C21; font-size: 16px; flex-shrink: 0; }

/* =====================
   ACORDEÓN HISTÓRICO
   ===================== */

.escala-historico-label {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-top: 10px;
    border-top: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.escala-historico-label i { color: #888; }

.escala-acordeon { display: flex; flex-direction: column; gap: 10px; max-width: 100%; }

.escala-grupo {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.escala-grupo:hover { border-color: #c8e6cc; }
.escala-grupo.open { border-color: #0B5C21; box-shadow: 0 4px 16px rgba(11,92,33,0.06); }

.escala-grupo-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.escala-grupo-header:hover { background: #f8fdf9; }

.escala-grupo-icon {
    width: 40px; height: 40px; min-width: 40px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}

.escala-grupo.open .escala-grupo-icon { background: #0B5C21; }
.escala-grupo-icon i { font-size: 16px; color: #888; transition: color 0.2s; }
.escala-grupo.open .escala-grupo-icon i { color: #fff; }

.escala-grupo-titulo {
    flex: 1;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.escala-grupo-cant { font-size: 12px; color: #888; flex-shrink: 0; }

.escala-grupo-arrow { color: #ccc; font-size: 14px; transition: transform 0.3s, color 0.2s; }
.escala-grupo.open .escala-grupo-arrow { transform: rotate(180deg); color: #0B5C21; }

.escala-grupo-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.escala-grupo.open .escala-grupo-body { max-height: 2000px; }

.escala-grupo-content {
    padding: 4px 20px 20px;
    border-top: 1px solid #f0f0f0;
}

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

@media (max-width: 768px) {
    .escala-header h1 { font-size: 24px; }
    .escala-vigente-card { padding: 20px; }
    .escala-vigente-title { font-size: 17px; }
    .escala-archivos-grid { grid-template-columns: 1fr; }
    .escala-grupo-header { padding: 14px 16px; }
    .escala-grupo-titulo { font-size: 14px; }
    .escala-grupo-content { padding: 4px 16px 16px; }
}

@media (max-width: 560px) {
    .escala-section { padding: 24px 0 36px; }
    .escala-header h1 { font-size: 20px; }
    .escala-vigente-title { font-size: 15px; flex-wrap: wrap; }
    .escala-archivo { padding: 12px 14px; gap: 10px; }
    .escala-archivo-icon { width: 36px; height: 36px; min-width: 36px; }
    .escala-archivo-name { font-size: 13px; }
}
